/*
   * Load internal state from an archive.
   */
   void McSimulation::loadParameters(Serializable::IArchive &ar)
   {
      if (isInitialized_) {
         UTIL_THROW("Error: Called readParam when already initialized");
      }
      #ifdef UTIL_MPI
      if (hasIoCommunicator()) {
         UTIL_THROW("Error: Has a param communicator in loadParameters");
      }
      #endif

      Simulation::loadParameters(ar);
      loadParamComposite(ar, system());
      loadParamComposite(ar, *mcMoveManagerPtr_);
      loadParamComposite(ar, analyzerManager());
      loadParameter<int>(ar, "saveInterval", saveInterval_);
      if (saveInterval_ > 0) {
         loadParameter<std::string>(ar, "saveFileName", saveFileName_);
      }

      system().loadConfig(ar);
      ar >> iStep_;
      isValid();
      isInitialized_ = true;
   }
Example #2
0
 void System::loadTetherMaster(Serializable::IArchive &ar)
 {
    if (simulation().hasTether()) {
       tetherMasterPtr_ = new TetherMaster();
       loadParamComposite(ar, *tetherMasterPtr_);
    }
 }
Example #3
0
 void System::loadLinkMaster(Serializable::IArchive& ar)
 {
    if (simulation().nLinkType() > 0) {
       linkMasterPtr_ = new LinkMaster();
       loadParamComposite(ar, *linkMasterPtr_);
    }
 }
Example #4
0
 /*
 * Load EnergyEnsemble and BoundaryEnsemble.
 */
 void System::loadEnsembles(Serializable::IArchive& ar)
 {
    loadParamComposite(ar, *energyEnsemblePtr_);
    loadParamComposite(ar, *boundaryEnsemblePtr_);
 }