| 385 |
|
|
| 386 |
|
//create the molecules |
| 387 |
|
createMolecules(info); |
| 388 |
– |
|
| 388 |
|
|
| 389 |
|
//allocate memory for DataStorage(circular reference, need to |
| 390 |
|
//break it) |
| 411 |
|
|
| 412 |
|
if (loadInitCoords) |
| 413 |
|
loadCoordinates(info, mdFileName); |
| 415 |
– |
|
| 414 |
|
return info; |
| 415 |
|
} |
| 416 |
|
|
| 795 |
|
|
| 796 |
|
void SimCreator::loadCoordinates(SimInfo* info, const std::string& mdFileName) { |
| 797 |
|
Globals* simParams; |
| 798 |
+ |
|
| 799 |
|
simParams = info->getSimParams(); |
| 800 |
|
|
| 802 |
– |
|
| 801 |
|
DumpReader reader(info, mdFileName); |
| 802 |
|
int nframes = reader.getNFrames(); |
| 803 |
< |
|
| 803 |
> |
|
| 804 |
|
if (nframes > 0) { |
| 805 |
|
reader.readFrame(nframes - 1); |
| 806 |
|
} else { |
| 811 |
|
painCave.isFatal = 1; |
| 812 |
|
simError(); |
| 813 |
|
} |
| 816 |
– |
|
| 814 |
|
//copy the current snapshot to previous snapshot |
| 815 |
|
info->getSnapshotManager()->advance(); |
| 816 |
|
} |