| 45 |
|
#include "UseTheForce/DarkSide/sticky_interface.h" |
| 46 |
|
#include "UseTheForce/ForceFieldFactory.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" |
| 77 |
|
//The order of BondTypesSectionParser, BendTypesSectionParser and TorsionTypesSectionParser are |
| 78 |
|
//not important. |
| 79 |
|
spMan_.push_back(new OptionSectionParser(forceFieldOptions_)); |
| 80 |
+ |
spMan_.push_back(new BaseAtomTypesSectionParser()); |
| 81 |
|
spMan_.push_back(new AtomTypesSectionParser()); |
| 82 |
|
spMan_.push_back(new EAMAtomTypesSectionParser(forceFieldOptions_)); |
| 83 |
|
|
| 94 |
|
AtomType* at; |
| 95 |
|
|
| 96 |
|
for (at = atomTypeCont_.beginType(i); at != NULL; at = atomTypeCont_.nextType(i)) { |
| 97 |
+ |
// useBase sets the responsibilities, and these have to be done |
| 98 |
+ |
// after the atomTypes and Base types have all been scanned: |
| 99 |
+ |
|
| 100 |
+ |
std::vector<AtomType*> ayb = at->allYourBase(); |
| 101 |
+ |
if (ayb.size() > 1) { |
| 102 |
+ |
for (int j = ayb.size()-1; j > 0; j--) { |
| 103 |
+ |
|
| 104 |
+ |
ayb[j-1]->useBase(ayb[j]); |
| 105 |
+ |
|
| 106 |
+ |
} |
| 107 |
+ |
} |
| 108 |
|
at->makeFortranAtomType(); |
| 109 |
|
} |
| 110 |
|
|