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

Comparing branches/new_design/OOPSE-4/src/brains/MoleculeCreator.cpp (file contents):
Revision 1774 by tim, Tue Nov 23 23:12:23 2004 UTC vs.
Revision 1804 by tim, Tue Nov 30 19:58:25 2004 UTC

# Line 162 | Line 162 | Atom* MoleculeCreator::createAtom(ForceField* ff, Mole
162  
163      atomType =  ff->getAtomType(stamp->getType());
164  
165 <    if (bondType == NULL) {
165 >    if (atomType == NULL) {
166          sprintf(painCave.errMsg, "Can not find Matching Atom Type for[%s]",
167                     stamp->getType());
168  
# Line 176 | Line 176 | Atom* MoleculeCreator::createAtom(ForceField* ff, Mole
176          double phi;
177          double theta;
178          double psi;
179 +
180 +        DirectionalAtomType* dAtomType = dynamic_cast<DirectionalAtomType*>(atomType);
181 +        if (dAtomType == NULL) {
182 +            sprintf(painCave.errMsg, "Can not cast AtomType to DirectionalAtomType");
183 +
184 +            painCave.isFatal = 1;
185 +            simError();
186 +        }
187          
188 <        dAtom = new DirectionalAtom(atomType);
188 >        dAtom = new DirectionalAtom(dAtomType);
189  
190          // Directional Atoms have standard unit vectors which are oriented
191          // in space using the three Euler angles.  We assume the standard

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines