# | Line 1 | Line 1 | |
---|---|---|
1 | < | /* |
1 | > | /* |
2 | * Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. | |
3 | * | |
4 | * The University of Notre Dame grants you ("Licensee") a | |
# | Line 73 | Line 73 | int main(int argc,char* argv[]){ | |
73 | " | ____ ____ ____ _____ ______ The OpenSource, Object-oriented |\n" << | |
74 | " | / __ \\/ __ \\/ __ \\/ ___// ____/ Parallel Simulation Engine. |\n" << | |
75 | " | / / / / / / / /_/ /\\__ \\/ __/ |\n" << | |
76 | < | " | / /_/ / /_/ / ____/___/ / /___ Copyright 2004 by the |\n" << |
76 | > | " | / /_/ / /_/ / ____/___/ / /___ Copyright 2004-2005 by the |\n" << |
77 | " | \\____/\\____/_/ /____/_____/ University of Notre Dame. |\n" << | |
78 | " | http://www.oopse.org |\n" << | |
79 | " | |\n" << | |
# | Line 83 | Line 83 | int main(int argc,char* argv[]){ | |
83 | " | Any published work resulting from the use of this code must cite the |\n" << | |
84 | " | following paper: M. A. Meineke, C. F. Vardeman II, T. Lin, |\n" << | |
85 | " | C. J. Fennell, and J. D. Gezelter, |\n" << | |
86 | < | " | J. Comp. Chem. XX, XXXX (2004). |\n" << |
86 | > | " | J. Comput. Chem. 26, pp. 252-271 (2005). |\n" << |
87 | " +----------------------------------------------------------------------+\n" << | |
88 | "\n"; | |
89 | ||
# | Line 103 | Line 103 | int main(int argc,char* argv[]){ | |
103 | ||
104 | ||
105 | ||
106 | < | //register forcefields, integrators and minimizers |
107 | < | registerAll(); |
106 | > | //register forcefields, integrators and minimizers |
107 | > | registerAll(); |
108 | ||
109 | < | //create simulation model |
110 | < | SimCreator creator; |
111 | < | SimInfo* info = creator.createSim(argv[1]); |
112 | < | Globals* simParams = info->getSimParams(); |
109 | > | //create simulation model |
110 | > | SimCreator creator; |
111 | > | SimInfo* info = creator.createSim(argv[1]); |
112 | > | Globals* simParams = info->getSimParams(); |
113 | ||
114 | < | if (simParams->haveMinimizer() && simParams->haveEnsemble()) { |
115 | < | sprintf(painCave.errMsg, "Minimizer keyword and Ensemble keyword can not exist together\n"); |
116 | < | painCave.isFatal = 1; |
117 | < | simError(); |
118 | < | } |
114 | > | if (simParams->haveMinimizer() && simParams->haveEnsemble()) { |
115 | > | sprintf(painCave.errMsg, "Minimizer keyword and Ensemble keyword can not exist together\n"); |
116 | > | painCave.isFatal = 1; |
117 | > | simError(); |
118 | > | } |
119 | ||
120 | < | if (simParams->haveMinimizer()) { |
121 | < | //create minimizer |
122 | < | Minimizer* myMinimizer = MinimizerFactory::getInstance()->createMinimizer(simParams->getMinimizer(), info); |
120 | > | if (simParams->haveMinimizer()) { |
121 | > | //create minimizer |
122 | > | Minimizer* myMinimizer = MinimizerFactory::getInstance()->createMinimizer(simParams->getMinimizer(), info); |
123 | ||
124 | < | if (myMinimizer == NULL) { |
125 | < | sprintf(painCave.errMsg, "Minimizer Factory can not create %s Minimizer\n", |
126 | < | simParams->getMinimizer()); |
127 | < | painCave.isFatal = 1; |
128 | < | simError(); |
129 | < | } |
124 | > | if (myMinimizer == NULL) { |
125 | > | sprintf(painCave.errMsg, "Minimizer Factory can not create %s Minimizer\n", |
126 | > | simParams->getMinimizer()); |
127 | > | painCave.isFatal = 1; |
128 | > | simError(); |
129 | > | } |
130 | ||
131 | < | myMinimizer->minimize(); |
132 | < | delete myMinimizer; |
133 | < | } else if (simParams->haveEnsemble()) { |
134 | < | //create Integrator |
131 | > | myMinimizer->minimize(); |
132 | > | delete myMinimizer; |
133 | > | } else if (simParams->haveEnsemble()) { |
134 | > | //create Integrator |
135 | ||
136 | < | Integrator* myIntegrator = IntegratorFactory::getInstance()->createIntegrator(simParams->getEnsemble(), info); |
136 | > | Integrator* myIntegrator = IntegratorFactory::getInstance()->createIntegrator(simParams->getEnsemble(), info); |
137 | ||
138 | < | if (myIntegrator == NULL) { |
139 | < | sprintf(painCave.errMsg, "Integrator Factory can not create %s Integrator\n", |
140 | < | simParams->getEnsemble()); |
141 | < | painCave.isFatal = 1; |
142 | < | simError(); |
143 | < | } |
138 | > | if (myIntegrator == NULL) { |
139 | > | sprintf(painCave.errMsg, "Integrator Factory can not create %s Integrator\n", |
140 | > | simParams->getEnsemble()); |
141 | > | painCave.isFatal = 1; |
142 | > | simError(); |
143 | > | } |
144 | ||
145 | < | //Thermodynamic Integration Method |
146 | < | //ForceManager* fman = new ThermodynamicForceManager(info); |
147 | < | //myIntegrator->setForceManager(fman); |
145 | > | //Thermodynamic Integration Method |
146 | > | //ForceManager* fman = new ThermodynamicForceManager(info); |
147 | > | //myIntegrator->setForceManager(fman); |
148 | ||
149 | ||
150 | < | //Zconstraint-Method |
151 | < | if (simParams->haveZconstraints()) { |
152 | < | info->setNZconstraint(simParams->getNzConstraints()); |
153 | < | ForceManager* fman = new ZconstraintForceManager(info); |
154 | < | myIntegrator->setForceManager(fman); |
155 | < | } |
150 | > | //Zconstraint-Method |
151 | > | if (simParams->haveZconstraints()) { |
152 | > | info->setNZconstraint(simParams->getNzConstraints()); |
153 | > | ForceManager* fman = new ZconstraintForceManager(info); |
154 | > | myIntegrator->setForceManager(fman); |
155 | > | } |
156 | ||
157 | < | myIntegrator->integrate(); |
158 | < | delete myIntegrator; |
159 | < | }else { |
160 | < | sprintf(painCave.errMsg, "Integrator Factory can not create %s Integrator\n", |
157 | > | myIntegrator->integrate(); |
158 | > | delete myIntegrator; |
159 | > | }else { |
160 | > | sprintf(painCave.errMsg, "Integrator Factory can not create %s Integrator\n", |
161 | simParams->getEnsemble()); | |
162 | < | painCave.isFatal = 1; |
163 | < | simError(); |
164 | < | } |
162 | > | painCave.isFatal = 1; |
163 | > | simError(); |
164 | > | } |
165 | ||
166 | ||
167 | ||
168 | < | delete info; |
168 | > | delete info; |
169 | ||
170 | #ifdef IS_MPI | |
171 | strcpy( checkPointMsg, "Oh what a lovely Tea Party!" ); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |