43 |
|
#include "brains/Snapshot.hpp" |
44 |
|
#include "integrators/Integrator.hpp" |
45 |
|
#include "integrators/DLM.hpp" |
46 |
< |
#include "integrators/FluctuatingChargeNVT.hpp" |
46 |
> |
#include "flucq/FluctuatingChargeNVT.hpp" |
47 |
|
#include "utils/simError.h" |
48 |
|
|
49 |
|
namespace OpenMD { |
73 |
|
painCave.isFatal = 1; |
74 |
|
simError(); |
75 |
|
} |
76 |
+ |
|
77 |
|
// set the status, sample, and thermal kick times |
78 |
|
if (simParams->haveSampleTime()){ |
79 |
|
sampleTime = simParams->getSampleTime(); |
82 |
|
sampleTime = simParams->getRunTime(); |
83 |
|
statusTime = sampleTime; |
84 |
|
} |
85 |
< |
|
85 |
> |
|
86 |
|
if (simParams->haveStatusTime()){ |
87 |
|
statusTime = simParams->getStatusTime(); |
88 |
|
} |
89 |
< |
|
89 |
> |
|
90 |
|
if (simParams->haveThermalTime()){ |
91 |
|
thermalTime = simParams->getThermalTime(); |
92 |
|
} else { |
93 |
|
thermalTime = simParams->getRunTime(); |
94 |
|
} |
95 |
< |
|
95 |
> |
|
96 |
|
if (!simParams->getUseInitalTime()) { |
97 |
|
currentSnapshot_->setTime(0.0); |
98 |
|
} |
99 |
< |
|
99 |
> |
|
100 |
|
if (simParams->haveResetTime()) { |
101 |
|
needReset = true; |
102 |
|
resetTime = simParams->getResetTime(); |
103 |
|
} |
104 |
< |
|
104 |
> |
|
105 |
|
// Create a default ForceManager: If the subclass wants to use |
106 |
|
// a different ForceManager, use setForceManager |
107 |
|
|
108 |
|
forceMan_ = new ForceManager(info); |
109 |
< |
|
109 |
> |
|
110 |
|
// check for the temperature set flag (velocity scaling) |
111 |
|
if (simParams->haveTempSet()) { |
112 |
|
needVelocityScaling = simParams->getTempSet(); |
122 |
|
|
123 |
|
} |
124 |
|
} |
125 |
< |
|
125 |
> |
|
126 |
|
// Create a default a velocitizer: If the subclass wants to use |
127 |
|
// a different velocitizer, use setVelocitizer |
128 |
|
velocitizer_ = new Velocitizer(info); |
129 |
< |
|
130 |
< |
if (simParams->haveUseRNEMD()) { |
131 |
< |
if (simParams->getUseRNEMD()) { |
129 |
> |
|
130 |
> |
if (simParams->getRNEMDParameters()->haveUseRNEMD()) { |
131 |
> |
if (simParams->getRNEMDParameters()->getUseRNEMD()) { |
132 |
|
// Create a default a RNEMD. |
133 |
|
rnemd_ = new RNEMD(info); |
134 |
< |
useRNEMD = simParams->getUseRNEMD(); |
135 |
< |
if (simParams->haveRNEMD_exchangeTime()) { |
136 |
< |
RNEMD_exchangeTime = simParams->getRNEMD_exchangeTime(); |
134 |
> |
useRNEMD = simParams->getRNEMDParameters()->getUseRNEMD(); |
135 |
> |
if (simParams->getRNEMDParameters()->haveExchangeTime()) { |
136 |
> |
RNEMD_exchangeTime = simParams->getRNEMDParameters()->getExchangeTime(); |
137 |
|
} |
138 |
|
} |
139 |
|
} |
140 |
< |
|
140 |
> |
|
141 |
|
rotAlgo_ = new DLM(); |
142 |
|
rattle_ = new Rattle(info); |
143 |
< |
flucQ_ = new FluctuatingChargeNVT(info); |
143 |
> |
forceMan_->initialize(); |
144 |
> |
flucQ_ = new FluctuatingChargeNVT(info, forceMan_); |
145 |
|
} |
146 |
|
|
147 |
|
Integrator::~Integrator(){ |