12 #ifndef QMCPLUSPLUS_MCPOPULATION_H 13 #define QMCPLUSPLUS_MCPOPULATION_H 130 template<
typename WTTV>
137 auto walker_index = 0;
138 for (
int i = 0; i < walker_consumers.size(); ++i)
140 walker_consumers[i]->clearWalkers();
141 for (
int j = 0; j < walkers_per_crowd[i]; ++j)
std::vector< WalkerElementsRef > get_walker_elements()
As long as walker WalkerElements is used we need this for unit tests.
QMCTraits::RealType RealType
UPtrVector< TrialWaveFunction > & get_twfs()
HamiltonianRef::FullPrecRealType FullPrecRealType
UPtrVector< QMCHamiltonian > & get_dead_hamiltonians()
UPtrVector< TrialWaveFunction > walker_trial_wavefunctions_
void set_ensemble_property(const MCDataType< QMCTraits::FullPrecRealType > &ensemble_property)
WalkerElementsRef spawnWalker()
State Requirement:
const ParticleSet & get_golden_electrons() const
std::vector< RealType > ptcl_inv_mass_
1/Mass per particle
QMCHamiltonian & get_golden_hamiltonian()
helper functions for EinsplineSetBuilder
QMCTraits::FullPrecRealType FullPrecRealType
QTBase::RealType RealType
void set_target(IndexType pop)
UPtrVector< MCPWalker > & get_walkers()
type for returning the walker and its elements from MCPopulation
A set of light weight walkers that are carried between driver sections and restart.
UPtrVector< QMCHamiltonian > dead_walker_hamiltonians_
IndexType get_max_samples() const
Collection of Local Energy Operators.
int get_num_ranks() const
The number of cases in which this and get_num_local_walkers is so few that I strongly suspect it is a...
QMCHamiltonian * hamiltonian_
std::vector< std::unique_ptr< T > > UPtrVector
UPtrVector< QMCHamiltonian > & get_hamiltonians()
MCPopulation(int num_ranks, int this_rank, ParticleSet *elecs, TrialWaveFunction *trial_wf, QMCHamiltonian *hamiltonian_)
Temporary constructor to deal with MCWalkerConfiguration be the only source of some information in QM...
ConstantSizeMatrix< FullPrecRealType, std::allocator< FullPrecRealType > > PropertyContainer_t
typedef for the property container, fixed size
const std::vector< RealType > & get_ptcl_inv_mass() const
UPtrVector< QMCHamiltonian > walker_hamiltonians_
void measureGlobalEnergyVariance(Communicate &comm, FullPrecRealType &ener, FullPrecRealType &variance) const
void checkIntegrity() const
}@
Wrapping information on parallelism.
void set_target_samples(IndexType samples)
PooledMemory< FullPrecRealType > WFBuffer_t
UPtrVector< TrialWaveFunction > dead_walker_trial_wavefunctions_
Specialized paritlce class for atomistic simulations.
A collection of functions for dividing fairly.
TrialWaveFunction & get_golden_twf()
std::vector< RealType > ptclgrp_inv_mass_
1/Mass per species
UPtrVector< ParticleSet > dead_walker_elec_particle_sets_
void syncWalkersPerRank(Communicate *comm)
IndexType target_population_
const std::vector< RealType > & get_ptclgrp_mass() const
std::vector< RealType > ptclgrp_mass_
MCPopulation & operator=(MCPopulation &)=delete
class to handle a set of variables that can be modified during optimizations
IndexType get_target_population() const
void set_num_global_walkers(IndexType num_global_walkers)
QMCTraits::IndexType IndexType
const std::vector< RealType > & get_ptclgrp_inv_mass() const
void createWalkers(IndexType num_walkers, const WalkerConfigurations &walker_configs, RealType reserve=1.0)
}@
IndexType num_local_walkers_
OHMMS_INDEXTYPE IndexType
define other types
void saveWalkerConfigurations(WalkerConfigurations &walker_configs)
save walker configurations to walker_configs_ref_
void set_num_local_walkers(IndexType num_local_walkers)
const UPtrVector< MCPWalker > & get_dead_walkers() const
const TrialWaveFunction & get_golden_twf() const
Declaration of a TrialWaveFunction.
Declaraton of ParticleAttrib<T> derived from Vector.
Declaraton of Vector<T,Alloc> Manage memory through Alloc directly and allow referencing an existing ...
Class to represent a many-body trial wave function.
IndexType get_num_global_walkers() const
UPtrVector< TrialWaveFunction > & get_dead_twfs()
TrialWaveFunction * trial_wf_
UPtrVector< ParticleSet > walker_elec_particle_sets_
UPtrVector< MCPWalker > walkers_
IndexType target_samples_
QTFull::RealType FullPrecRealType
WalkerElementsRef getWalkerElementsRef(const size_t walker_index)
Non threadsafe access to walkers and their elements.
UPtrVector< MCPWalker > dead_walkers_
IndexType get_target_samples() const
IndexType num_global_walkers_
IndexType get_num_local_walkers() const
UPtrVector< ParticleSet > & get_elec_particle_sets()
void killWalker(MCPWalker &)
Kill a walker (just barely)
std::vector< IV > fairDivide(IV ntot, IV npart)
return the occupation vector for ntot entities partitioned npart ways.
A container class to represent a walker.
ParticleSet & get_golden_electrons()
MCDataType< QMCTraits::FullPrecRealType > ensemble_property_
void redistributeWalkers(WTTV &walker_consumers)
distributes walkers and their "cloned" elements to the elements of a vector of unique_ptr to "walker_...
void killLastWalker()
Kill last walker (just barely)
ParticleSet * elec_particle_set_
const UPtrVector< MCPWalker > & get_walkers() const