src/QMCDrivers/QMCDriverNew.cpp
/** process a <qmc/> element
 * @param cur xmlNode with qmc tag
 *
 * This function is called before QMCDriverNew::run and following actions are taken:
 * - Initialize basic data to execute run function.
 * -- distance tables
 * -- resize deltaR and drift with the number of particles
 * -- assign cur to qmcNode
 * - process input file
 *   -- putQMCInfo: <parameter/> s for generic QMC
 *   -- put : extra data by derived classes
 * - initialize branchEngine to accumulate energies
 * - initialize Estimators
 * - initialize Walkers
 */
process a  element
@param cur xmlNode with qmc tag

This function is called before QMCDriverNew::run and following actions are taken:
- Initialize basic data to execute run function.
distance tables
resize deltaR and drift with the number of particles
assign cur to qmcNode
- process input file
putQMCInfo:  s for generic QMC
put : extra data by derived classes
- initialize branchEngine to accumulate energies
- initialize Estimators
- initialize Walkers
process a element @param cur xmlNode with qmc tag This function is called before QMCDriverNew :: run and following actions are taken : - Initialize basic data to execute run function . distance tables resize deltaR and drift with the number of particles assign cur to qmcNode - process input file putQMCInfo : s for generic QMC put : extra data by derived classes - initialize branchEngine to accumulate energies - initialize Estimators - initialize Walkers
void QMCDriverNew::process(xmlNodePtr cur)
{
  app_log() << "  Regenerate random seeds." << std::endl;
  RandomNumberControl::make_seeds();
  setupWalkers();
  if (!branch_engine_)
  {
    branch_engine_ = new SimpleFixedNodeBranch(qmcdriver_input_.get_tau(), population_.get_num_global_walkers());
  }
  estimator_manager_ = branch_engine_->getEstimatorManager();
  if (!estimator_manager_)
  {
    estimator_manager_ = new EstimatorManagerBase(myComm);
    branch_engine_->setEstimatorManager(estimator_manager_);
    branch_engine_->read(h5_file_root_);
  }
  if (!drift_modifier_)
    drift_modifier_.reset(createDriftModifier(qmcdriver_input_));
  branch_engine_->put(cur);
  estimator_manager_->put(H, cur);
  crowds_.resize(num_crowds_);
  for(int i = 0; i < num_crowds_; ++i)
  {
    crowds_[i].reset(new Crowd(*estimator_manager_));
  }
  auto crowd_start = crowds_.begin();
  auto crowd_end   = crowds_.end();
  std::for_each(crowd_start,
                crowd_end,
                [this](std::unique_ptr<Crowd>& crowd) { crowd->reserve(walkers_per_crowd_); });
  population_.distributeWalkers(crowd_start, crowd_end, walkers_per_crowd_);
  createRngsStepContexts();
  branch_engine_->start(root_name_);
  branch_engine_->write(root_name_);
  branch_engine_->advanceQMCCounter();
}
void QMCDriverNew :: process ( xmlNodePtr cur ) { app_log ( ) << " " << std :: endl ; RandomNumberControl :: make_seeds ( ) ; setupWalkers ( ) ; if ( ! branch_engine_ ) { branch_engine_ = new SimpleFixedNodeBranch ( qmcdriver_input_ . get_tau ( ) , population_ . get_num_global_walkers ( ) ) ; } estimator_manager_ = branch_engine_ -> getEstimatorManager ( ) ; if ( ! estimator_manager_ ) { estimator_manager_ = new EstimatorManagerBase ( myComm ) ; branch_engine_ -> setEstimatorManager ( estimator_manager_ ) ; branch_engine_ -> read ( h5_file_root_ ) ; } if ( ! drift_modifier_ ) drift_modifier_ . reset ( createDriftModifier ( qmcdriver_input_ ) ) ; branch_engine_ -> put ( cur ) ; estimator_manager_ -> put ( H , cur ) ; crowds_ . resize ( num_crowds_ ) ; for ( int i = 0 ; i < num_crowds_ ; ++ i ) { crowds_ [ i ] . reset ( new Crowd ( * estimator_manager_ ) ) ; } auto crowd_start = crowds_ . begin ( ) ; auto crowd_end = crowds_ . end ( ) ; std :: for_each ( crowd_start , crowd_end , [ this ] ( std :: unique_ptr < Crowd > & crowd ) { crowd -> reserve ( walkers_per_crowd_ ) ; } ) ; population_ . distributeWalkers ( crowd_start , crowd_end , walkers_per_crowd_ ) ; createRngsStepContexts ( ) ; branch_engine_ -> start ( root_name_ ) ; branch_engine_ -> write ( root_name_ ) ; branch_engine_ -> advanceQMCCounter ( ) ; }
process a <qmc/> element
 @param cur xmlNode with qmc tag
process a <qmc / > element @param cur xmlNode with qmc tag
// if (qmcdriver_input_.get_reset_random() || RandomNumberControl) // { // if seeds are not made then neither are the children. So when MoveContexts are created a segfault occurs. // For now it is unclear whether get_reset_random should always be true on the first run or what. // } // If you really want to persist the MCPopulation it is not the business of QMCDriver to reset it. // It could tell it we are starting a new section but shouldn't be pulling internal strings. //int numCopies = (H1.empty()) ? 1 : H1.size(); //W.resetWalkerProperty(numCopies); //create and initialize estimator // This used to get updated as a side effect of setStatus // at this point we can finally construct the Crowd objects. // neglecting first touch for the moment // because em cloning is not threadsafe //  crowds_.push_back( //now give walkers references to their walkers // Once they are created move contexts can be created. // if (wOut == 0) //   wOut = new HDFWalkerOutput(W, root_name_, myComm); // PD: not really sure what the point of this is.  Seems to just go to output