1 |
|
/* |
2 |
< |
* Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. |
2 |
> |
* Copyright (c) 2006 The University of Notre Dame. All Rights Reserved. |
3 |
|
* |
4 |
|
* The University of Notre Dame grants you ("Licensee") a |
5 |
|
* non-exclusive, royalty free, license to use, modify and |
53 |
|
#include "integrators/Integrator.hpp" |
54 |
|
#include "minimizers/MinimizerFactory.hpp" |
55 |
|
#include "minimizers/Minimizer.hpp" |
56 |
+ |
#include "restraints/ThermoIntegrationForceManager.hpp" |
57 |
+ |
|
58 |
|
using namespace oopse; |
59 |
|
|
60 |
|
int main(int argc,char* argv[]){ |
76 |
|
" | ____ ____ ____ _____ ______ The OpenSource, Object-oriented |\n" << |
77 |
|
" | / __ \\/ __ \\/ __ \\/ ___// ____/ Parallel Simulation Engine. |\n" << |
78 |
|
" | / / / / / / / /_/ /\\__ \\/ __/ |\n" << |
79 |
< |
" | / /_/ / /_/ / ____/___/ / /___ Copyright 2004-2005 by the |\n" << |
79 |
> |
" | / /_/ / /_/ / ____/___/ / /___ Copyright 2004-2006 by the |\n" << |
80 |
|
" | \\____/\\____/_/ /____/_____/ University of Notre Dame. |\n" << |
81 |
|
" | |\n" << |
82 |
|
" | version " << |
102 |
|
} |
103 |
|
#endif |
104 |
|
|
103 |
– |
#ifdef IS_MPI |
105 |
|
strcpy( checkPointMsg, "Successful number of arguments" ); |
106 |
< |
MPIcheckPoint(); |
106 |
< |
#endif |
106 |
> |
errorCheckPoint(); |
107 |
|
|
108 |
– |
|
109 |
– |
|
108 |
|
//register forcefields, integrators and minimizers |
109 |
|
registerAll(); |
110 |
|
|
136 |
|
//create Integrator |
137 |
|
|
138 |
|
Integrator* myIntegrator = IntegratorFactory::getInstance()->createIntegrator(toUpperCopy(simParams->getEnsemble()), info); |
139 |
< |
|
139 |
> |
|
140 |
|
if (myIntegrator == NULL) { |
141 |
|
sprintf(painCave.errMsg, "Integrator Factory can not create %s Integrator\n", |
142 |
|
simParams->getEnsemble().c_str()); |
145 |
|
} |
146 |
|
|
147 |
|
//Thermodynamic Integration Method |
148 |
< |
//ForceManager* fman = new ThermodynamicForceManager(info); |
149 |
< |
//myIntegrator->setForceManager(fman); |
148 |
> |
//set the force manager for thermodynamic integration if specified |
149 |
> |
if (simParams->getUseSolidThermInt() || simParams->getUseLiquidThermInt()){ |
150 |
> |
ForceManager* fman = new ThermoIntegrationForceManager(info); |
151 |
> |
myIntegrator->setForceManager(fman); |
152 |
> |
} |
153 |
|
|
153 |
– |
|
154 |
|
//Zconstraint-Method |
155 |
< |
if (simParams->haveNZconstraints()) { |
156 |
< |
info->setNZconstraint(simParams->getNZconstraints()); |
155 |
> |
if (simParams->getNZconsStamps() > 0) { |
156 |
> |
info->setNZconstraint(simParams->getNZconsStamps()); |
157 |
|
ForceManager* fman = new ZconstraintForceManager(info); |
158 |
|
myIntegrator->setForceManager(fman); |
159 |
|
} |
171 |
|
|
172 |
|
delete info; |
173 |
|
|
174 |
< |
#ifdef IS_MPI |
175 |
< |
strcpy( checkPointMsg, "Yoikes! It worked!" ); |
176 |
< |
MPIcheckPoint(); |
177 |
< |
|
174 |
> |
|
175 |
> |
strcpy( checkPointMsg, "Great googly moogly! It worked!" ); |
176 |
> |
errorCheckPoint(); |
177 |
> |
|
178 |
> |
#ifdef IS_MPI |
179 |
|
MPI_Finalize(); |
180 |
|
#endif |
181 |
|
|