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" |
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{ |