| 45 |
|
#include "UseTheForce/ForceFieldFactory.hpp" |
| 46 |
|
#include "io/OptionSectionParser.hpp" |
| 47 |
|
#include "io/DirectionalAtomTypesSectionParser.hpp" |
| 48 |
+ |
#include "io/BaseAtomTypesSectionParser.hpp" |
| 49 |
|
#include "io/AtomTypesSectionParser.hpp" |
| 50 |
|
#include "io/LennardJonesAtomTypesSectionParser.hpp" |
| 51 |
|
#include "io/ChargeAtomTypesSectionParser.hpp" |
| 65 |
|
//set default force field filename |
| 66 |
|
setForceFieldFileName("Shapes.frc"); |
| 67 |
|
|
| 68 |
< |
//The ordering of section parsers is important |
| 68 |
> |
//The ordering of section parsers is important... |
| 69 |
> |
//OptionSectionParser must come first to set options for other parsers |
| 70 |
|
//DirectionalAtomTypesSectionParser should be before |
| 71 |
|
//AtomTypesSectionParser since these two section parsers will actually |
| 72 |
|
//create "real" AtomTypes (AtomTypesSectionParser will create AtomType |
| 80 |
|
//of BondTypesSectionParser, BendTypesSectionParser and |
| 81 |
|
//TorsionTypesSectionParser are not important. |
| 82 |
|
spMan_.push_back(new OptionSectionParser(forceFieldOptions_)); |
| 83 |
< |
spMan_.push_back(new ShapeAtomTypesSectionParser()); |
| 84 |
< |
spMan_.push_back(new DirectionalAtomTypesSectionParser()); |
| 83 |
> |
spMan_.push_back(new ShapeAtomTypesSectionParser(forceFieldOptions_)); |
| 84 |
> |
spMan_.push_back(new DirectionalAtomTypesSectionParser(forceFieldOptions_)); |
| 85 |
> |
spMan_.push_back(new BaseAtomTypesSectionParser()); |
| 86 |
|
spMan_.push_back(new AtomTypesSectionParser()); |
| 87 |
|
spMan_.push_back(new LennardJonesAtomTypesSectionParser(forceFieldOptions_)); |
| 88 |
< |
spMan_.push_back(new ChargeAtomTypesSectionParser()); |
| 89 |
< |
spMan_.push_back(new MultipoleAtomTypesSectionParser()); |
| 90 |
< |
spMan_.push_back(new StickyAtomTypesSectionParser()); |
| 91 |
< |
spMan_.push_back(new BondTypesSectionParser()); |
| 92 |
< |
spMan_.push_back(new BendTypesSectionParser()); |
| 93 |
< |
spMan_.push_back(new TorsionTypesSectionParser()); |
| 88 |
> |
spMan_.push_back(new ChargeAtomTypesSectionParser(forceFieldOptions_)); |
| 89 |
> |
spMan_.push_back(new MultipoleAtomTypesSectionParser(forceFieldOptions_)); |
| 90 |
> |
spMan_.push_back(new StickyAtomTypesSectionParser(forceFieldOptions_)); |
| 91 |
> |
spMan_.push_back(new BondTypesSectionParser(forceFieldOptions_)); |
| 92 |
> |
spMan_.push_back(new BendTypesSectionParser(forceFieldOptions_)); |
| 93 |
> |
spMan_.push_back(new TorsionTypesSectionParser(forceFieldOptions_)); |
| 94 |
|
|
| 95 |
|
} |
| 96 |
|
|
| 110 |
|
AtomType* at; |
| 111 |
|
|
| 112 |
|
for (at = atomTypeCont_.beginType(i); at != NULL; at = atomTypeCont_.nextType(i)) { |
| 113 |
+ |
// useBase sets the responsibilities, and these have to be done |
| 114 |
+ |
// after the atomTypes and Base types have all been scanned: |
| 115 |
+ |
|
| 116 |
+ |
std::vector<AtomType*> ayb = at->allYourBase(); |
| 117 |
+ |
if (ayb.size() > 1) { |
| 118 |
+ |
for (int j = ayb.size()-1; j > 0; j--) { |
| 119 |
+ |
|
| 120 |
+ |
ayb[j-1]->useBase(ayb[j]); |
| 121 |
+ |
|
| 122 |
+ |
} |
| 123 |
+ |
} |
| 124 |
|
at->makeFortranAtomType(); |
| 125 |
|
} |
| 126 |
|
|
| 135 |
|
} |
| 136 |
|
|
| 137 |
|
|
| 138 |
< |
// double SHAPES_FF::getRcutFromAtomType(AtomType* at){ |
| 138 |
> |
// RealType SHAPES_FF::getRcutFromAtomType(AtomType* at){ |
| 139 |
|
// } |
| 140 |
|
} //end namespace oopse |
| 141 |
|
|