30 |
|
#include "utils/simError.h" |
31 |
|
#include "brains/SimCreator.hpp" |
32 |
|
#include "brains/SimInfo.hpp" |
33 |
+ |
#include "constraints/ZconstraintForceManager.hpp" |
34 |
|
#include "integrators/IntegratorFactory.hpp" |
35 |
|
#include "integrators/IntegratorCreator.hpp" |
36 |
|
#include "integrators/Integrator.hpp" |
142 |
|
//create Integrator |
143 |
|
|
144 |
|
Integrator* myIntegrator = IntegratorFactory::getInstance()->createIntegrator(simParams->getEnsemble(), info); |
144 |
– |
|
145 |
– |
//Thermodynamic Integration Method |
146 |
– |
//ForceManager* fman = new ThermodynamicForceManager(info); |
147 |
– |
//myIntegrator->setForceManager(fman); |
145 |
|
|
149 |
– |
|
150 |
– |
//Zconstraint-Method |
151 |
– |
//ForceManager* fman = new ZconstraintForceManager(info); |
152 |
– |
//myIntegrator->setForceManager(fman); |
153 |
– |
|
146 |
|
if (myIntegrator == NULL) { |
147 |
|
sprintf(painCave.errMsg, "Integrator Factory can not create %s Integrator\n", |
148 |
|
simParams->getEnsemble()); |
149 |
|
painCave.isFatal = 1; |
150 |
|
simError(); |
151 |
|
} |
152 |
+ |
|
153 |
+ |
//Thermodynamic Integration Method |
154 |
+ |
//ForceManager* fman = new ThermodynamicForceManager(info); |
155 |
+ |
//myIntegrator->setForceManager(fman); |
156 |
+ |
|
157 |
+ |
|
158 |
+ |
//Zconstraint-Method |
159 |
+ |
if (simParams->haveZconstraints()) { |
160 |
+ |
info->setNZconstraint(simParams->getNzConstraints()); |
161 |
+ |
ForceManager* fman = new ZconstraintForceManager(info); |
162 |
+ |
myIntegrator->setForceManager(fman); |
163 |
+ |
} |
164 |
|
|
165 |
|
myIntegrator->integrate(); |
166 |
|
delete myIntegrator; |