ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/brains/SimCreator.cpp
(Generate patch)

Comparing branches/development/src/brains/SimCreator.cpp (file contents):
Revision 1539 by gezelter, Fri Dec 31 18:31:56 2010 UTC vs.
Revision 1540 by gezelter, Mon Jan 17 21:34:36 2011 UTC

# Line 385 | Line 385 | namespace OpenMD {
385      
386      //create the molecules
387      createMolecules(info);
388    
388      
389      //allocate memory for DataStorage(circular reference, need to
390      //break it)
# Line 412 | Line 411 | namespace OpenMD {
411      
412      if (loadInitCoords)
413        loadCoordinates(info, mdFileName);    
415    
414      return info;
415    }
416    
# Line 797 | Line 795 | namespace OpenMD {
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 {
# Line 813 | Line 811 | namespace OpenMD {
811        painCave.isFatal = 1;
812        simError();
813      }
816    
814      //copy the current snapshot to previous snapshot
815      info->getSnapshotManager()->advance();
816    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines