ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/brains/MoleculeCreator.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-3.0/src/brains/MoleculeCreator.cpp (file contents):
Revision 1812 by tim, Tue Nov 30 20:50:47 2004 UTC vs.
Revision 1813 by tim, Wed Dec 1 17:38:32 2004 UTC

# Line 177 | Line 177 | Atom* MoleculeCreator::createAtom(ForceField* ff, Mole
177      }
178      
179      //below code still have some kind of hard-coding smell
180 <    if (stamp->haveOrientation()){
181 <        DirectionalAtom* dAtom;
182 <        double phi;
183 <        double theta;
184 <        double psi;
185 <
180 >    if (atomType->isDirectional()){
181 >    
182          DirectionalAtomType* dAtomType = dynamic_cast<DirectionalAtomType*>(atomType);
183 +        
184          if (dAtomType == NULL) {
185              sprintf(painCave.errMsg, "Can not cast AtomType to DirectionalAtomType");
186  
187              painCave.isFatal = 1;
188              simError();
189          }
193        
194        dAtom = new DirectionalAtom(dAtomType);
190  
191 <        // Directional Atoms have standard unit vectors which are oriented
192 <        // in space using the three Euler angles.  We assume the standard
198 <        // unit vector was originally along the z axis below.
199 <
200 <        phi = stamp->getEulerPhi() * M_PI / 180.0;
201 <        theta = stamp->getEulerTheta() * M_PI / 180.0;
202 <        psi = stamp->getEulerPsi()* M_PI / 180.0;
203 <
204 <        dAtom->setUnitFrameFromEuler(phi, theta, psi);
191 >        DirectionalAtom* dAtom;
192 >        dAtom = new DirectionalAtom(dAtomType);
193          atom = dAtom;    
194      }
195      else{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines