45 |
|
#include "UseTheForce/DarkSide/sticky_interface.h" |
46 |
|
#include "UseTheForce/DarkSide/gb_interface.h" |
47 |
|
#include "UseTheForce/ForceFieldFactory.hpp" |
48 |
+ |
#include "io/BaseAtomTypesSectionParser.hpp" |
49 |
|
#include "io/DirectionalAtomTypesSectionParser.hpp" |
50 |
|
#include "io/AtomTypesSectionParser.hpp" |
51 |
|
#include "io/LennardJonesAtomTypesSectionParser.hpp" |
82 |
|
//BendTypesSectionParser and TorsionTypesSectionParser are not important. |
83 |
|
spMan_.push_back(new OptionSectionParser(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(forceFieldOptions_)); |
98 |
|
|
99 |
|
void DUFF::parse(const std::string& filename) { |
100 |
|
ifstrstream* ffStream; |
101 |
+ |
bool hasGBtypes; |
102 |
+ |
|
103 |
|
ffStream = openForceFieldFile(filename); |
104 |
|
|
105 |
|
spMan_.parse(*ffStream, *this); |
117 |
|
at->complete(); |
118 |
|
} |
119 |
|
|
120 |
+ |
hasGBtypes = false; |
121 |
+ |
for (at = atomTypeCont_.beginType(i); at != NULL; |
122 |
+ |
at = atomTypeCont_.nextType(i)) { |
123 |
+ |
if (at->isGayBerne()) |
124 |
+ |
hasGBtypes = true; |
125 |
+ |
} |
126 |
+ |
|
127 |
|
int isError = 0; |
128 |
|
|
129 |
+ |
if (hasGBtypes) { |
130 |
+ |
completeGBFF(&isError); |
131 |
+ |
} |
132 |
+ |
|
133 |
|
delete ffStream; |
134 |
|
|
135 |
|
} |