| 171 |
|
double currReset; |
| 172 |
|
|
| 173 |
|
int calcPot, calcStress; |
| 174 |
+ |
int i; |
| 175 |
+ |
int localIndex; |
| 176 |
|
|
| 177 |
+ |
#ifdef IS_MPI |
| 178 |
+ |
int which_node; |
| 179 |
+ |
#endif // is_mpi |
| 180 |
+ |
|
| 181 |
+ |
vector<StuntDouble*> particles; |
| 182 |
+ |
string inAngle; |
| 183 |
+ |
|
| 184 |
|
tStats = new Thermo(info); |
| 185 |
|
statOut = new StatWriter(info); |
| 186 |
|
dumpOut = new DumpWriter(info); |
| 187 |
|
|
| 188 |
+ |
if (info->useSolidThermInt && !info->useLiquidThermInt) { |
| 189 |
+ |
restOut = new RestraintWriter(info); |
| 190 |
+ |
initRestraints = new RestraintReader(info); |
| 191 |
+ |
} |
| 192 |
+ |
|
| 193 |
|
atoms = info->atoms; |
| 194 |
|
|
| 195 |
|
dt = info->dt; |
| 203 |
|
|
| 204 |
|
// initialize the retraints if necessary |
| 205 |
|
if (info->useSolidThermInt && !info->useLiquidThermInt) { |
| 206 |
< |
myFF->initRestraints(); |
| 206 |
> |
initRestraints->zeroZangle(); |
| 207 |
> |
inAngle = info->zAngleName + "_in"; |
| 208 |
> |
initRestraints->readZangle(inAngle.c_str()); |
| 209 |
> |
initRestraints->readIdealCrystal(); |
| 210 |
|
} |
| 211 |
|
|
| 212 |
|
// initialize the forces before the first step |
| 196 |
– |
|
| 213 |
|
calcForce(1, 1); |
| 214 |
|
|
| 215 |
|
//execute constraint algorithm to make sure at the very beginning the system is constrained |
| 233 |
|
|
| 234 |
|
dumpOut->writeDump(info->getTime()); |
| 235 |
|
statOut->writeStat(info->getTime()); |
| 236 |
+ |
restOut->writeZangle(info->getTime()); |
| 237 |
|
|
| 221 |
– |
|
| 238 |
|
#ifdef IS_MPI |
| 239 |
|
strcpy(checkPointMsg, "The integrator is ready to go."); |
| 240 |
|
MPIcheckPoint(); |
| 270 |
|
|
| 271 |
|
if (info->getTime() >= currSample){ |
| 272 |
|
dumpOut->writeDump(info->getTime()); |
| 273 |
+ |
// write a zAng file to coincide with each dump or eor file |
| 274 |
+ |
if (info->useSolidThermInt && !info->useLiquidThermInt) |
| 275 |
+ |
restOut->writeZangle(info->getTime()); |
| 276 |
|
currSample += sampleTime; |
| 277 |
|
} |
| 278 |
|
|
| 302 |
|
|
| 303 |
|
dumpOut->writeFinal(info->getTime()); |
| 304 |
|
|
| 305 |
< |
// dump out a file containing the omega values for the final configuration |
| 306 |
< |
if (info->useSolidThermInt && !info->useLiquidThermInt) |
| 307 |
< |
myFF->dumpzAngle(); |
| 308 |
< |
|
| 305 |
> |
// write the file containing the omega values of the final configuration |
| 306 |
> |
if (info->useSolidThermInt && !info->useLiquidThermInt){ |
| 307 |
> |
restOut->writeZangle(info->getTime()); |
| 308 |
> |
restOut->writeZangle(info->getTime(), inAngle.c_str()); |
| 309 |
> |
} |
| 310 |
|
|
| 311 |
|
delete dumpOut; |
| 312 |
|
delete statOut; |