67 |
|
|
68 |
|
forceMan_->init(); |
69 |
|
|
70 |
< |
// remove center of mass drift velocity (in case we passed in a configuration |
71 |
< |
// that was drifting |
70 |
> |
// remove center of mass drift velocity (in case we passed in a |
71 |
> |
// configuration that was drifting) |
72 |
|
velocitizer_->removeComDrift(); |
73 |
|
|
74 |
|
// initialize the forces before the first step |
75 |
|
calcForce(true, true); |
76 |
|
|
77 |
< |
//execute constraint algorithm to make sure at the very beginning the system is constrained |
77 |
> |
// execute the constraint algorithm to make sure that the system is |
78 |
> |
// constrained at the very beginning |
79 |
|
if (info_->getNGlobalConstraints() > 0) { |
80 |
|
rattle->constraintA(); |
81 |
|
calcForce(true, true); |
82 |
< |
rattle->constraintB(); |
83 |
< |
info_->getSnapshotManager()->advance();//copy the current snapshot to previous snapshot |
82 |
> |
rattle->constraintB(); |
83 |
> |
//copy the current snapshot to previous snapshot |
84 |
> |
info_->getSnapshotManager()->advance(); |
85 |
|
} |
86 |
|
|
87 |
|
if (needVelocityScaling) { |
91 |
|
dumpWriter = createDumpWriter(); |
92 |
|
|
93 |
|
statWriter = createStatWriter(); |
94 |
< |
|
94 |
> |
|
95 |
> |
dumpWriter->writeDumpAndEor(); |
96 |
> |
|
97 |
|
if (simParams->getUseSolidThermInt()) { |
98 |
|
restWriter = createRestWriter(); |
99 |
< |
restWriter->writeZangle(); |
99 |
> |
restWriter->writeZAngFile(); |
100 |
|
} |
101 |
|
|
98 |
– |
dumpWriter->writeDumpAndEor(); |
99 |
– |
|
100 |
– |
|
102 |
|
//save statistics, before writeStat, we must save statistics |
103 |
|
thermo.saveStat(); |
104 |
|
saveConservedQuantity(); |
151 |
|
|
152 |
|
//increase time |
153 |
|
currentSnapshot_->increaseTime(dt); |
154 |
< |
|
154 |
> |
|
155 |
|
if (needVelocityScaling) { |
156 |
|
if (currentSnapshot_->getTime() >= currThermal) { |
157 |
|
velocitizer_->velocitize(targetScalingTemp); |
158 |
|
currThermal += thermalTime; |
159 |
|
} |
160 |
|
} |
161 |
< |
|
161 |
> |
|
162 |
|
if (currentSnapshot_->getTime() >= currSample) { |
163 |
|
dumpWriter->writeDumpAndEor(); |
164 |
< |
|
164 |
> |
|
165 |
|
if (simParams->getUseSolidThermInt()) |
166 |
< |
restWriter->writeZangle(); |
166 |
> |
restWriter->writeZAngFile(); |
167 |
|
|
168 |
|
currSample += sampleTime; |
169 |
|
} |
170 |
< |
|
170 |
> |
|
171 |
|
if (currentSnapshot_->getTime() >= currStatus) { |
172 |
|
//save statistics, before writeStat, we must save statistics |
173 |
|
thermo.saveStat(); |
191 |
|
dumpWriter->writeEor(); |
192 |
|
|
193 |
|
if (simParams->getUseSolidThermInt()) { |
194 |
< |
restWriter->writeZangle(); |
194 |
> |
// restWriter->writeZAngFile(); |
195 |
|
delete restWriter; |
196 |
|
restWriter = NULL; |
197 |
|
} |
232 |
|
mask.set(Stats::VHARM); |
233 |
|
} |
234 |
|
|
235 |
< |
if (simParams->havePrintPressureTensor() && simParams->getPrintPressureTensor()){ |
235 |
> |
if (simParams->havePrintPressureTensor() && |
236 |
> |
simParams->getPrintPressureTensor()){ |
237 |
|
mask.set(Stats::PRESSURE_TENSOR_X); |
238 |
|
mask.set(Stats::PRESSURE_TENSOR_Y); |
239 |
|
mask.set(Stats::PRESSURE_TENSOR_Z); |