| 44 |
|
* |
| 45 |
|
* Created by Charles F. Vardeman II on 11/9/05. |
| 46 |
|
* @author Charles F. Vardeman II |
| 47 |
< |
* @version $Id: SC_FF.cpp,v 1.9 2006-01-13 21:57:48 chuckv Exp $ |
| 47 |
> |
* @version $Id: SC_FF.cpp,v 1.10 2008-07-16 02:07:09 gezelter Exp $ |
| 48 |
|
* |
| 49 |
|
*/ |
| 50 |
|
|
| 54 |
|
#include "UseTheForce/DarkSide/sticky_interface.h" |
| 55 |
|
#include "UseTheForce/DarkSide/suttonchen_interface.h" |
| 56 |
|
#include "UseTheForce/ForceFieldFactory.hpp" |
| 57 |
< |
#include "io/DirectionalAtomTypesSectionParser.hpp" |
| 57 |
> |
#include "io/OptionSectionParser.hpp" |
| 58 |
> |
#include "io/BaseAtomTypesSectionParser.hpp" |
| 59 |
|
#include "io/AtomTypesSectionParser.hpp" |
| 59 |
– |
#include "io/LennardJonesAtomTypesSectionParser.hpp" |
| 60 |
– |
#include "io/ChargeAtomTypesSectionParser.hpp" |
| 61 |
– |
#include "io/MultipoleAtomTypesSectionParser.hpp" |
| 62 |
– |
#include "io/EAMAtomTypesSectionParser.hpp" |
| 63 |
– |
#include "io/StickyAtomTypesSectionParser.hpp" |
| 64 |
– |
#include "io/BondTypesSectionParser.hpp" |
| 65 |
– |
#include "io/BendTypesSectionParser.hpp" |
| 66 |
– |
#include "io/TorsionTypesSectionParser.hpp" |
| 60 |
|
#include "io/SCAtomTypesSectionParser.hpp" |
| 68 |
– |
#include "io/OptionSectionParser.hpp" |
| 61 |
|
#include "UseTheForce/ForceFieldCreator.hpp" |
| 62 |
|
#include "utils/simError.h" |
| 63 |
|
namespace oopse { |
| 79 |
|
//The order of BondTypesSectionParser, BendTypesSectionParser and TorsionTypesSectionParser are |
| 80 |
|
//not important. |
| 81 |
|
spMan_.push_back(new OptionSectionParser(forceFieldOptions_)); |
| 82 |
+ |
spMan_.push_back(new BaseAtomTypesSectionParser()); |
| 83 |
|
spMan_.push_back(new AtomTypesSectionParser()); |
| 84 |
|
spMan_.push_back(new SCAtomTypesSectionParser(forceFieldOptions_)); |
| 85 |
|
|
| 97 |
|
// Set forcefield options |
| 98 |
|
|
| 99 |
|
for (at = atomTypeCont_.beginType(i); at != NULL; at = atomTypeCont_.nextType(i)) { |
| 100 |
+ |
// useBase sets the responsibilities, and these have to be done |
| 101 |
+ |
// after the atomTypes and Base types have all been scanned: |
| 102 |
+ |
|
| 103 |
+ |
std::vector<AtomType*> ayb = at->allYourBase(); |
| 104 |
+ |
if (ayb.size() > 1) { |
| 105 |
+ |
for (int j = ayb.size()-1; j > 0; j--) { |
| 106 |
+ |
|
| 107 |
+ |
ayb[j-1]->useBase(ayb[j]); |
| 108 |
+ |
|
| 109 |
+ |
} |
| 110 |
+ |
} |
| 111 |
|
at->makeFortranAtomType(); |
| 112 |
|
} |
| 113 |
|
|