ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/brains/MoleculeCreator.cpp
(Generate patch)

Comparing branches/development/src/brains/MoleculeCreator.cpp (file contents):
Revision 1665 by gezelter, Tue Nov 22 20:38:56 2011 UTC vs.
Revision 1710 by gezelter, Fri May 18 21:44:02 2012 UTC

# Line 55 | Line 55
55   #include "brains/MoleculeCreator.hpp"
56   #include "primitives/GhostBend.hpp"
57   #include "primitives/GhostTorsion.hpp"
58 < #include "types/DirectionalAtomType.hpp"
58 > #include "types/AtomType.hpp"
59   #include "types/FixedBondType.hpp"
60   #include "utils/simError.h"
61   #include "utils/StringUtils.hpp"
# Line 202 | Line 202 | namespace OpenMD {
202      
203      //below code still have some kind of hard-coding smell
204      if (atomType->isDirectional()){
205 <    
206 <      DirectionalAtomType* dAtomType = dynamic_cast<DirectionalAtomType*>(atomType);
207 <        
208 <      if (dAtomType == NULL) {
209 <        sprintf(painCave.errMsg, "Can not cast AtomType to DirectionalAtomType");
210 <
211 <        painCave.isFatal = 1;
212 <        simError();
213 <      }
214 <
215 <      DirectionalAtom* dAtom;
216 <      dAtom = new DirectionalAtom(dAtomType);
205 >      DirectionalAtom* dAtom;
206 >      dAtom = new DirectionalAtom(atomType);
207        atom = dAtom;    
208      }
209      else{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines