| 43 |
|
#include "UseTheForce/CLAYFF.hpp" |
| 44 |
|
#include "UseTheForce/DarkSide/lj_interface.h" |
| 45 |
|
#include "UseTheForce/ForceFieldFactory.hpp" |
| 46 |
+ |
#include "io/BaseAtomTypesSectionParser.hpp" |
| 47 |
|
#include "io/AtomTypesSectionParser.hpp" |
| 48 |
|
#include "io/LennardJonesAtomTypesSectionParser.hpp" |
| 49 |
|
#include "io/ChargeAtomTypesSectionParser.hpp" |
| 60 |
|
setForceFieldFileName("CLAYFF.frc"); |
| 61 |
|
|
| 62 |
|
spMan_.push_back(new OptionSectionParser(forceFieldOptions_)); |
| 63 |
+ |
spMan_.push_back(new BaseAtomTypesSectionParser()); |
| 64 |
|
spMan_.push_back(new AtomTypesSectionParser()); |
| 65 |
|
spMan_.push_back(new LennardJonesAtomTypesSectionParser(forceFieldOptions_)); |
| 66 |
< |
spMan_.push_back(new ChargeAtomTypesSectionParser()); |
| 67 |
< |
spMan_.push_back(new BondTypesSectionParser()); |
| 68 |
< |
spMan_.push_back(new BendTypesSectionParser()); |
| 66 |
> |
spMan_.push_back(new ChargeAtomTypesSectionParser(forceFieldOptions_)); |
| 67 |
> |
spMan_.push_back(new BondTypesSectionParser(forceFieldOptions_)); |
| 68 |
> |
spMan_.push_back(new BendTypesSectionParser(forceFieldOptions_)); |
| 69 |
|
|
| 70 |
|
} |
| 71 |
|
|
| 80 |
|
|
| 81 |
|
for (at = atomTypeCont_.beginType(i); at != NULL; |
| 82 |
|
at = atomTypeCont_.nextType(i)) { |
| 83 |
+ |
// useBase sets the responsibilities, and these have to be done |
| 84 |
+ |
// after the atomTypes and Base types have all been scanned: |
| 85 |
+ |
|
| 86 |
+ |
std::vector<AtomType*> ayb = at->allYourBase(); |
| 87 |
+ |
if (ayb.size() > 1) { |
| 88 |
+ |
for (int j = ayb.size()-1; j > 0; j--) { |
| 89 |
+ |
|
| 90 |
+ |
ayb[j-1]->useBase(ayb[j]); |
| 91 |
+ |
|
| 92 |
+ |
} |
| 93 |
+ |
} |
| 94 |
|
at->makeFortranAtomType(); |
| 95 |
|
} |
| 96 |
|
|