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.3 2005-11-16 21:37:43 chuckv Exp $ |
47 |
> |
* @version $Id: SC_FF.cpp,v 1.9 2006-01-13 21:57:48 chuckv Exp $ |
48 |
|
* |
49 |
|
*/ |
50 |
|
|
65 |
|
#include "io/BendTypesSectionParser.hpp" |
66 |
|
#include "io/TorsionTypesSectionParser.hpp" |
67 |
|
#include "io/SCAtomTypesSectionParser.hpp" |
68 |
+ |
#include "io/OptionSectionParser.hpp" |
69 |
|
#include "UseTheForce/ForceFieldCreator.hpp" |
70 |
|
#include "utils/simError.h" |
71 |
|
namespace oopse { |
73 |
|
SC_FF::SC_FF(){ |
74 |
|
|
75 |
|
//set default force field filename |
76 |
< |
setForceFieldFileName("SuttonChen.QSC.frc"); |
76 |
> |
setForceFieldFileName("SuttonChen.frc"); |
77 |
|
|
78 |
|
//the order of adding section parsers are important |
79 |
+ |
//OptionSectionParser must come first to set options for other parsers |
80 |
|
//DirectionalAtomTypesSectionParser should be added before AtomTypesSectionParser Since |
81 |
|
//These two section parsers will actually create "real" AtomTypes (AtomTypesSectionParser will create |
82 |
|
//AtomType and DirectionalAtomTypesSectionParser will creat DirectionalAtomType which is a subclass |
86 |
|
//Make sure they are added after DirectionalAtomTypesSectionParser and AtomTypesSectionParser. |
87 |
|
//The order of BondTypesSectionParser, BendTypesSectionParser and TorsionTypesSectionParser are |
88 |
|
//not important. |
89 |
< |
spMan_.push_back(new DirectionalAtomTypesSectionParser()); |
89 |
> |
spMan_.push_back(new OptionSectionParser(forceFieldOptions_)); |
90 |
|
spMan_.push_back(new AtomTypesSectionParser()); |
91 |
< |
spMan_.push_back(new SCAtomTypesSectionParser()); |
91 |
> |
spMan_.push_back(new SCAtomTypesSectionParser(forceFieldOptions_)); |
92 |
|
|
93 |
|
} |
94 |
|
|
101 |
|
ForceField::AtomTypeContainer::MapTypeIterator i; |
102 |
|
AtomType* at; |
103 |
|
|
104 |
+ |
// Set forcefield options |
105 |
+ |
|
106 |
|
for (at = atomTypeCont_.beginType(i); at != NULL; at = atomTypeCont_.nextType(i)) { |
107 |
|
at->makeFortranAtomType(); |
108 |
|
} |
109 |
|
|
110 |
+ |
|
111 |
|
for (at = atomTypeCont_.beginType(i); at != NULL; at = atomTypeCont_.nextType(i)) { |
112 |
|
at->complete(); |
113 |
|
} |