![]() |
QMCPACK
|
A set of walkers that are to be advanced by Metropolis Monte Carlo. More...
Public Member Functions | |
MCWalkerConfiguration (const SimulationCell &simulation_cell, const DynamicCoordinateKind kind=DynamicCoordinateKind::DC_POS) | |
default constructor More... | |
MCWalkerConfiguration (const MCWalkerConfiguration &mcw) | |
default constructor: copy only ParticleSet More... | |
~MCWalkerConfiguration () | |
void | createWalkers (int numWalkers) |
create numWalkers Walkers More... | |
void | resize (int numWalkers, int numPtcls) |
clean up the walker list and make a new list More... | |
void | resizeWalkerHistories () |
resize Walker::PropertyHistory and Walker::PHindex: More... | |
void | sample (iterator it, RealType tauinv) |
make random moves for all the walkers More... | |
int | getParticleNum () const |
return the number of particles per walker More... | |
void | setLocalEnergy (RealType e) |
set LocalEnergy More... | |
RealType | getLocalEnergy () const |
return LocalEnergy More... | |
MultiChain * | getPolymer () |
void | setPolymer (MultiChain *chain) |
void | resetWalkerProperty (int ncopy=1) |
reset the Property container of all the walkers More... | |
bool | updatePbyP () const |
void | clear () |
clean up the walker list More... | |
![]() | |
ParticleSet (const SimulationCell &simulation_cell, const DynamicCoordinateKind kind=DynamicCoordinateKind::DC_POS) | |
default constructor More... | |
ParticleSet (const ParticleSet &p) | |
copy constructor More... | |
~ParticleSet () override | |
default destructor More... | |
void | create (const std::vector< int > &agroup) |
create grouped particles More... | |
void | print (std::ostream &os, const size_t maxParticlesToPrint=0) const |
print particle coordinates to a std::ostream More... | |
bool | get (std::ostream &os) const override |
dummy. For satisfying OhmmsElementBase. More... | |
bool | put (std::istream &) override |
dummy. For satisfying OhmmsElementBase. More... | |
void | reset () override |
dummy. For satisfying OhmmsElementBase. More... | |
bool | put (xmlNodePtr cur) override |
initialize ParticleSet from xmlNode More... | |
void | setQuantumDomain (quantum_domains qdomain) |
specify quantum_domain of particles More... | |
void | set_quantum () |
bool | is_classical () const |
bool | is_quantum () const |
bool | quantumDomainValid (quantum_domains qdomain) const |
check whether quantum domain is valid for particles More... | |
bool | quantumDomainValid () const |
check whether quantum domain is valid for particles More... | |
int | addTable (const ParticleSet &psrc, DTModes modes=DTModes::ALL_OFF) |
add a distance table More... | |
auto & | getDistTable (int table_ID) const |
get a distance table by table_ID More... | |
const DistanceTableAA & | getDistTableAA (int table_ID) const |
get a distance table by table_ID and dyanmic_cast to DistanceTableAA More... | |
const DistanceTableAB & | getDistTableAB (int table_ID) const |
get a distance table by table_ID and dyanmic_cast to DistanceTableAB More... | |
void | resetCollectables () |
reset all the collectable quantities during a MC iteration More... | |
void | update (bool skipSK=false) |
update the internal data More... | |
void | createSK () |
create Structure Factor with PBCs More... | |
bool | hasSK () const |
const StructFact & | getSK () const |
return Structure Factor More... | |
void | turnOnPerParticleSK () |
Turn on per particle storage in Structure Factor. More... | |
bool | getPerParticleSKState () const |
Get state (on/off) of per particle storage in Structure Factor. More... | |
SpeciesSet & | getSpeciesSet () |
retrun the SpeciesSet of this particle set More... | |
const SpeciesSet & | getSpeciesSet () const |
retrun the const SpeciesSet of this particle set More... | |
const std::string & | parentName () const |
return parent's name More... | |
void | setName (const std::string &aname) |
const DynamicCoordinates & | getCoordinates () const |
void | resetGroups () |
const auto & | getSimulationCell () const |
const auto & | getLattice () const |
auto & | getPrimitiveLattice () const |
const auto & | getLRBox () const |
bool | isSameMass () const |
bool | isSpinor () const |
void | setSpinor (bool is_spinor) |
Index_t | getActivePtcl () const |
return active particle id More... | |
const PosType & | getActivePos () const |
Scalar_t | getActiveSpinVal () const |
const PosType & | activeR (int iat) const |
return the active position if the particle is active or the return current position if not More... | |
const Scalar_t & | activeSpin (int iat) const |
return the active spin value if the particle is active or return the current spin value if not More... | |
void | makeMove (Index_t iat, const SingleParticlePos &displ, bool maybe_accept=true) |
move the iat-th particle to active_pos_ More... | |
void | makeMoveWithSpin (Index_t iat, const SingleParticlePos &displ, const Scalar_t &sdispl) |
makeMove, but now includes an update to the spin variable More... | |
bool | makeMoveAndCheck (Index_t iat, const SingleParticlePos &displ) |
move the iat-th particle to active_pos_ More... | |
bool | makeMoveAndCheckWithSpin (Index_t iat, const SingleParticlePos &displ, const Scalar_t &sdispl) |
makeMoveAndCheck, but now includes an update to the spin variable More... | |
void | makeVirtualMoves (const SingleParticlePos &newpos) |
Handles virtual moves for all the particles to a single newpos. More... | |
bool | makeMoveAllParticles (const Walker_t &awalker, const ParticlePos &deltaR, RealType dt) |
move all the particles of a walker More... | |
bool | makeMoveAllParticles (const Walker_t &awalker, const ParticlePos &deltaR, const std::vector< RealType > &dt) |
bool | makeMoveAllParticlesWithDrift (const Walker_t &awalker, const ParticlePos &drift, const ParticlePos &deltaR, RealType dt) |
move all the particles including the drift More... | |
bool | makeMoveAllParticlesWithDrift (const Walker_t &awalker, const ParticlePos &drift, const ParticlePos &deltaR, const std::vector< RealType > &dt) |
void | accept_rejectMove (Index_t iat, bool accepted, bool forward_mode=true) |
accept or reject a proposed move Two operation modes: The using and updating distance tables via ParticleSet operate in two modes, regular and forward modes. More... | |
void | acceptMove (Index_t iat) |
accept the move and update the particle attribute by the proposed move in regular mode More... | |
void | rejectMove (Index_t iat) |
reject a proposed move in regular mode More... | |
void | initPropertyList () |
int | addProperty (const std::string &pname) |
int | addPropertyHistory (int leng) |
void | convert (const ParticlePos &pin, ParticlePos &pout) |
void | convert2Unit (const ParticlePos &pin, ParticlePos &pout) |
void | convert2Cart (const ParticlePos &pin, ParticlePos &pout) |
void | convert2Unit (ParticlePos &pout) |
void | convert2Cart (ParticlePos &pout) |
void | convert2UnitInBox (const ParticlePos &pint, ParticlePos &pout) |
void | convert2CartInBox (const ParticlePos &pint, ParticlePos &pout) |
void | applyBC (const ParticlePos &pin, ParticlePos &pout) |
void | applyBC (ParticlePos &pos) |
void | applyBC (const ParticlePos &pin, ParticlePos &pout, int first, int last) |
void | applyMinimumImage (ParticlePos &pinout) const |
void | loadWalker (Walker_t &awalker, bool pbyp) |
load a Walker_t to the current ParticleSet More... | |
void | saveWalker (Walker_t &awalker) |
save this to awalker More... | |
void | donePbyP (bool skipSK=false) |
update structure factor and unmark active_ptcl_ More... | |
FullPrecRealType *restrict | getPropertyBase () |
return the address of the values of Hamiltonian terms More... | |
const FullPrecRealType *restrict | getPropertyBase () const |
return the address of the values of Hamiltonian terms More... | |
FullPrecRealType *restrict | getPropertyBase (int i) |
return the address of the i-th properties More... | |
const FullPrecRealType *restrict | getPropertyBase (int i) const |
return the address of the i-th properties More... | |
void | setTwist (const SingleParticlePos &t) |
const SingleParticlePos & | getTwist () const |
void | randomizeFromSource (ParticleSet &src) |
Initialize particles around another ParticleSet Used to initialize an electron ParticleSet by an ion ParticleSet. More... | |
const std::string & | species_from_index (int i) |
get species name of particle i More... | |
size_t | getTotalNum () const |
void | clear () |
int | groups () const |
return the number of groups More... | |
int | first (int igroup) const |
return the first index of a group i More... | |
int | last (int igroup) const |
return the last index of a group i More... | |
int | getGroupID (int iat) const |
return the group id of a given particle in the particle set. More... | |
int | groupsize (int igroup) const |
return the size of a group More... | |
template<typename ATList > | |
void | createAttributeList (ATList &AttribList) |
add attributes to list for IO More... | |
void | setMapStorageToInput (const std::vector< int > &mapping) |
const std::vector< int > & | get_map_storage_to_input () const |
int | getNumDistTables () const |
auto & | get_group_offsets () const |
void | createResource (ResourceCollection &collection) const |
initialize a shared resource and hand it to a collection More... | |
![]() | |
OhmmsElementBase (const char *aname="none") | |
constructor with a name More... | |
virtual | ~OhmmsElementBase () |
destructor More... | |
const std::string & | getName () const |
return the name More... | |
void | setName (const std::string &aname) |
set name More... | |
void | setIOMode (int imode) |
set iomode More... | |
virtual bool | add (xmlNodePtr parent) |
add a xmlNode to the children list of parent More... | |
void | put (const std::string &s) |
read from string More... | |
virtual void | begin_node (std::ostream &os) const |
write the start of a node More... | |
virtual void | end_node (std::ostream &os) const |
write the end of a node More... | |
![]() | |
WalkerConfigurations () | |
~WalkerConfigurations () | |
default destructor More... | |
WalkerConfigurations (const WalkerConfigurations &)=delete | |
WalkerConfigurations & | operator= (const WalkerConfigurations &)=delete |
WalkerConfigurations (WalkerConfigurations &&)=default | |
WalkerConfigurations & | operator= (WalkerConfigurations &&)=default |
void | createWalkers (int numWalkers, size_t numPtcls) |
create numWalkers Walkers More... | |
void | createWalkers (iterator first, iterator last) |
create walkers More... | |
void | copyWalkers (iterator first, iterator last, iterator start) |
copy walkers More... | |
iterator | destroyWalkers (iterator first, iterator last) |
destroy Walkers from itstart to itend More... | |
void | destroyWalkers (int nw) |
destroy Walkers More... | |
void | resize (int numWalkers, size_t numPtcls) |
clean up the walker list and make a new list More... | |
size_t | getActiveWalkers () const |
return the number of active walkers More... | |
size_t | getGlobalNumWalkers () const |
return the total number of active walkers among a MPI group More... | |
void | setWalkerOffsets (const std::vector< int > &o) |
return the total number of active walkers among a MPI group More... | |
const std::vector< int > & | getWalkerOffsets () const |
iterator | begin () |
return the first iterator More... | |
iterator | end () |
return the last iterator, [begin(), end()) More... | |
const_iterator | begin () const |
return the first const_iterator More... | |
const_iterator | end () const |
return the last const_iterator [begin(), end()) More... | |
void | clear () |
clear the walker_list_ without destroying them More... | |
template<class INPUT_ITER > | |
void | insert (iterator it, INPUT_ITER first, INPUT_ITER last) |
insert elements More... | |
void | push_back (std::unique_ptr< Walker_t > awalker) |
add Walker_t* at the end More... | |
void | pop_back () |
delete the last Walker_t* More... | |
Walker_t * | operator[] (int i) |
const Walker_t * | operator[] (int i) const |
void | reset () |
reset the Walkers More... | |
void | putConfigurations (Walker_t::RealType *target, QMCTraits::FullPrecRealType *weights) const |
save the particle positions of all the walkers into target More... | |
Public Attributes | |
ReptileList_t | ReptileList |
a collection of reptiles contained in MCWalkerConfiguration. More... | |
Reptile * | reptile |
![]() | |
quantum_domains | quantum_domain |
quantum_domain of the particles, default = classical More... | |
int | current_step |
current MC step More... | |
ParticleIndex | GroupID |
Species ID. More... | |
ParticlePos | R |
Position. More... | |
ParticleScalar | spins |
internal spin variables for dynamical spin calculations More... | |
ParticleGradient | G |
gradients of the particles More... | |
ParticleLaplacian | L |
laplacians of the particles More... | |
ParticleScalar | Mass |
mass of each particle More... | |
ParticleScalar | Z |
charge of each particle More... | |
Index_t | activeBead |
the index of the active bead for particle-by-particle moves More... | |
Index_t | direction |
the direction reptile traveling More... | |
std::vector< TinyVector< int, OHMMS_DIM > > | DensityReducedGvecs |
Particle density in G-space for MPC interaction. More... | |
std::vector< ComplexType > | Density_G |
Array< RealType, OHMMS_DIM > | Density_r |
std::vector< TinyVector< int, OHMMS_DIM > > | VHXCReducedGvecs |
DFT potential. More... | |
std::vector< ComplexType > | VHXC_G [2] |
Array< RealType, OHMMS_DIM > | VHXC_r [2] |
PropertySetType | PropertyList |
name-value map of Walker Properties More... | |
PropertyContainer_t | Properties |
properties of the current walker More... | |
Buffer_t | Collectables |
observables in addition to those registered in Properties/PropertyList More... | |
std::vector< std::vector< FullPrecRealType > > | PropertyHistory |
Property history vector. More... | |
std::vector< int > | PHindex |
![]() | |
MCDataType< FullPrecRealType > | EnsembleProperty |
Protected Attributes | |
bool | ReadyForPbyP |
true if the buffer is ready for particle-by-particle updates More... | |
int | UpdateMode |
update-mode index More... | |
RealType | LocalEnergy |
![]() | |
const SimulationCell & | simulation_cell_ |
reference to global simulation cell More... | |
bool | same_mass_ |
true if the particles have the same mass More... | |
bool | is_spinor_ |
true is a dynamic spin calculation More... | |
Index_t | active_ptcl_ |
the index of the active particle during particle-by-particle moves More... | |
SingleParticlePos | active_pos_ |
the proposed position of active_ptcl_ during particle-by-particle moves More... | |
Scalar_t | active_spin_val_ |
the proposed spin of active_ptcl_ during particle-by-particle moves More... | |
std::vector< int > | map_storage_to_input_ |
Map storage index to the input index. More... | |
SpeciesSet | my_species_ |
SpeciesSet of particles. More... | |
std::unique_ptr< StructFact > | structure_factor_ |
Structure factor. More... | |
ResourceHandle< SKMultiWalkerMem > | mw_structure_factor_data_handle_ |
multi walker structure factor data More... | |
std::map< std::string, int > | myDistTableMap |
map to handle distance tables More... | |
std::vector< std::unique_ptr< DistanceTable > > | DistTables |
distance tables that need to be updated by moving this ParticleSet More... | |
std::vector< std::string > | distTableDescriptions |
Descriptions from distance table creation. Same order as DistTables. More... | |
TimerList_t | myTimers |
SingleParticlePos | myTwist |
std::string | ParentName |
size_t | TotalNum |
total number of particles More... | |
std::shared_ptr< Vector< int, OMPallocator< int > > > | group_offsets_ |
array to handle a group of distinct particles per species More... | |
std::unique_ptr< DynamicCoordinates > | coordinates_ |
internal representation of R. It can be an SoA copy of R More... | |
![]() | |
int | myIOMode |
the type of IO mode: default is useLIBXML More... | |
std::string | myName |
the name of the node, corresponds to the xml tag More... | |
![]() | |
walker_list__t | walker_list_ |
a collection of walkers More... | |
Private Attributes | |
MultiChain * | Polymer |
SampleStack | samples |
Friends | |
class | MCPopulation |
int | numSamples () const |
void | setNumSamples (int n) |
set the number of max samples More... | |
void | saveEnsemble () |
save the position of current walkers to SampleStack More... | |
void | saveEnsemble (iterator first, iterator last) |
save the position of current walkers More... | |
void | loadSample (ParticleSet &pset, size_t iw) const |
load a single sample from SampleStack More... | |
void | loadEnsemble () |
load SampleStack data to the current list of walker configurations More... | |
void | loadEnsemble (std::vector< MCWalkerConfiguration *> &others, bool doclean=true) |
load the SampleStacks of others to the current list of walker configurations More... | |
void | clearEnsemble () |
clear the ensemble More... | |
const SampleStack & | getSampleStack () const |
SampleStack & | getSampleStack () |
int | getMaxSamples () const |
Transitional forwarding methods. More... | |
static bool | dumpEnsemble (std::vector< MCWalkerConfiguration *> &others, HDFWalkerOutput &out, int np, int nBlock) |
dump Samples to a file More... | |
Additional Inherited Members | |
![]() | |
static void | mw_update (const RefVectorWithLeader< ParticleSet > &p_list, bool skipSK=false) |
batched version of update More... | |
template<CoordsType CT> | |
static void | mw_makeMove (const RefVectorWithLeader< ParticleSet > &p_list, int iat, const MCCoords< CT > &displs) |
batched version of makeMove More... | |
static void | mw_makeMove (const RefVectorWithLeader< ParticleSet > &p_list, int iat, const std::vector< SingleParticlePos > &displs) |
static void | mw_makeSpinMove (const RefVectorWithLeader< ParticleSet > &p_list, int iat, const std::vector< Scalar_t > &sdispls) |
batched version makeMove for spin variable only More... | |
template<CoordsType CT> | |
static void | mw_accept_rejectMove (const RefVectorWithLeader< ParticleSet > &p_list, Index_t iat, const std::vector< bool > &isAccepted, bool forward_mode=true) |
batched version of acceptMove and rejectMove fused, templated on CoordsType More... | |
static void | mw_accept_rejectMove (const RefVectorWithLeader< ParticleSet > &p_list, Index_t iat, const std::vector< bool > &isAccepted, bool forward_mode=true) |
batched version of acceptMove and rejectMove fused More... | |
static void | mw_accept_rejectSpinMove (const RefVectorWithLeader< ParticleSet > &p_list, Index_t iat, const std::vector< bool > &isAccepted) |
batched version of acceptMove and reject Move fused, but only for spins More... | |
static void | mw_loadWalker (const RefVectorWithLeader< ParticleSet > &p_list, const RefVector< Walker_t > &walkers, const std::vector< bool > &recompute, bool pbyp) |
batched version of loadWalker More... | |
static void | mw_saveWalker (const RefVectorWithLeader< ParticleSet > &psets, const RefVector< Walker_t > &walkers) |
batched version of saveWalker More... | |
static void | mw_donePbyP (const RefVectorWithLeader< ParticleSet > &p_list, bool skipSK=false) |
batched version of donePbyP More... | |
static void | acquireResource (ResourceCollection &collection, const RefVectorWithLeader< ParticleSet > &p_list) |
acquire external resource and assocaite it with the list of ParticleSet Note: use RAII ResourceCollectionTeamLock whenever possible More... | |
static void | releaseResource (ResourceCollection &collection, const RefVectorWithLeader< ParticleSet > &p_list) |
release external resource Note: use RAII ResourceCollectionTeamLock whenever possible More... | |
static RefVectorWithLeader< DistanceTable > | extractDTRefList (const RefVectorWithLeader< ParticleSet > &p_list, int id) |
static RefVectorWithLeader< DynamicCoordinates > | extractCoordsRefList (const RefVectorWithLeader< ParticleSet > &p_list) |
static RefVectorWithLeader< StructFact > | extractSKRefList (const RefVectorWithLeader< ParticleSet > &p_list) |
![]() | |
void | computeNewPosDistTables (Index_t iat, const SingleParticlePos &newpos, bool maybe_accept=true) |
compute temporal DistTables and SK for a new particle position More... | |
void | acceptMoveForwardMode (Index_t iat) |
actual implemenation for accepting a proposed move in forward mode More... | |
void | rejectMoveForwardMode (Index_t iat) |
reject a proposed move in forward mode More... | |
void | resize (size_t numPtcl) |
resize internal storage More... | |
![]() | |
static void | mw_computeNewPosDistTables (const RefVectorWithLeader< ParticleSet > &p_list, Index_t iat, const std::vector< SingleParticlePos > &new_positions, bool maybe_accept=true) |
compute temporal DistTables and SK for a new particle position for each walker in a batch More... | |
A set of walkers that are to be advanced by Metropolis Monte Carlo.
As a derived class from ParticleSet, MCWalkerConfiguration interacts with QMCHamiltonian and TrialWaveFunction as a ParticleSet, while QMCDrivers use it as multiple walkers whose configurations are advanced according to MC algorithms.
Each walker is represented by Walker<PosVector_t> and MCWalkerConfiguration contains a list of the walkers. This class enables two possible moves:
move a particle for each walker. Suitable for large systems.
Definition at line 55 of file MCWalkerConfiguration.h.
using const_iterator = WalkerList_t::const_iterator |
const_iterator of Walker container
Definition at line 74 of file MCWalkerConfiguration.h.
using iterator = WalkerList_t::iterator |
FIX: a type alias of iterator for an object should not be for just one of many objects it holds.
Definition at line 72 of file MCWalkerConfiguration.h.
container type of the Properties of a Walker
Definition at line 68 of file MCWalkerConfiguration.h.
using ReptileList_t = UPtrVector<Reptile> |
Definition at line 76 of file MCWalkerConfiguration.h.
Definition at line 66 of file MCWalkerConfiguration.h.
using WalkerList_t = std::vector<std::unique_ptr<Walker_t> > |
container type of Walkers
Definition at line 70 of file MCWalkerConfiguration.h.
anonymous enum |
enumeration for update
Enumerator | |
---|---|
Update_All | |
Update_Walker | move all the active walkers |
Update_Particle | move a walker by walker move a particle by particle |
Definition at line 59 of file MCWalkerConfiguration.h.
MCWalkerConfiguration | ( | const SimulationCell & | simulation_cell, |
const DynamicCoordinateKind | kind = DynamicCoordinateKind::DC_POS |
||
) |
default constructor
Definition at line 35 of file MCWalkerConfiguration.cpp.
MCWalkerConfiguration | ( | const MCWalkerConfiguration & | mcw | ) |
default constructor: copy only ParticleSet
Definition at line 39 of file MCWalkerConfiguration.cpp.
References SampleStack::clearEnsemble(), MCWalkerConfiguration::getMaxSamples(), WalkerConfigurations::getWalkerOffsets(), ParticleSet::Properties, MCWalkerConfiguration::samples, SampleStack::setMaxSamples(), and WalkerConfigurations::setWalkerOffsets().
|
default |
|
inline |
clean up the walker list
Definition at line 136 of file WalkerConfigurations.h.
Referenced by WalkerControlBase::copyWalkers().
void clearEnsemble | ( | ) |
clear the ensemble
Definition at line 250 of file MCWalkerConfiguration.cpp.
References SampleStack::clearEnsemble(), and MCWalkerConfiguration::samples.
void createWalkers | ( | int | numWalkers | ) |
create numWalkers Walkers
Append Walkers to WalkerList.
Definition at line 50 of file MCWalkerConfiguration.cpp.
References WalkerConfigurations::createWalkers(), WalkerConfigurations::getActiveWalkers(), qmcplusplus::n, ParticleSet::R, MCWalkerConfiguration::resizeWalkerHistories(), ParticleSet::spins, ParticleSet::TotalNum, and WalkerConfigurations::walker_list_.
Referenced by QMCDriver::addWalkers(), QMCFixedSampleLinearOptimize::finish(), DMC::resetUpdateEngines(), and qmcplusplus::TEST_CASE().
|
static |
dump Samples to a file
others | MCWalkerConfigurations whose samples will be collected |
out | engine to write the samples to state_0/walkers |
np | number of processors |
CAUTION: The current implementation assumes the same amount of active walkers on all the MPI ranks.
Definition at line 183 of file MCWalkerConfiguration.cpp.
References HDFWalkerOutput::dump(), WalkerConfigurations::getActiveWalkers(), omptarget::min(), WalkerConfigurations::push_back(), MCWalkerConfiguration::sample(), and WalkerConfigurations::setWalkerOffsets().
Referenced by VMC::run(), and CSVMC::run().
|
inline |
return LocalEnergy
Definition at line 114 of file MCWalkerConfiguration.h.
References MCWalkerConfiguration::LocalEnergy.
int getMaxSamples | ( | ) | const |
Transitional forwarding methods.
Definition at line 215 of file MCWalkerConfiguration.cpp.
References SampleStack::getMaxSamples(), and MCWalkerConfiguration::samples.
Referenced by MCWalkerConfiguration::loadEnsemble(), and MCWalkerConfiguration::MCWalkerConfiguration().
|
inline |
return the number of particles per walker
Definition at line 104 of file MCWalkerConfiguration.h.
References ParticleSet::R, and Vector< T, Alloc >::size().
|
inline |
Definition at line 116 of file MCWalkerConfiguration.h.
References MCWalkerConfiguration::Polymer.
|
inline |
Definition at line 151 of file MCWalkerConfiguration.h.
References MCWalkerConfiguration::samples.
Referenced by QMCDriverFactory::createQMCDriver(), and MCWalkerConfiguration::loadEnsemble().
|
inline |
Definition at line 152 of file MCWalkerConfiguration.h.
References MCWalkerConfiguration::samples.
void loadEnsemble | ( | ) |
load SampleStack data to the current list of walker configurations
load SampleStack to walker_list_
Definition at line 164 of file MCWalkerConfiguration.cpp.
References SampleStack::clearEnsemble(), MCSample::convertToWalker(), SampleStack::empty(), SampleStack::getMaxSamples(), SampleStack::getNumSamples(), SampleStack::getSample(), omptarget::min(), ParticleSet::PropertyList, MCWalkerConfiguration::resizeWalkerHistories(), MCWalkerConfiguration::samples, RecordNamedProperty< T >::size(), ParticleSet::TotalNum, and WalkerConfigurations::walker_list_.
Referenced by DMC::resetUpdateEngines().
void loadEnsemble | ( | std::vector< MCWalkerConfiguration *> & | others, |
bool | doclean = true |
||
) |
load the SampleStacks of others to the current list of walker configurations
Definition at line 217 of file MCWalkerConfiguration.cpp.
References MCSample::convertToWalker(), MCWalkerConfiguration::getMaxSamples(), SampleStack::getSample(), MCWalkerConfiguration::getSampleStack(), omptarget::min(), MCWalkerConfiguration::numSamples(), WalkerConfigurations::pop_back(), ParticleSet::PropertyList, MCWalkerConfiguration::resizeWalkerHistories(), RecordNamedProperty< T >::size(), ParticleSet::TotalNum, and WalkerConfigurations::walker_list_.
void loadSample | ( | ParticleSet & | pset, |
size_t | iw | ||
) | const |
load a single sample from SampleStack
Definition at line 160 of file MCWalkerConfiguration.cpp.
References SampleStack::loadSample(), qmcplusplus::pset, and MCWalkerConfiguration::samples.
Referenced by QMCCostFunction::checkConfigurations(), and QMCCostFunction::correlatedSampling().
|
inline |
Definition at line 126 of file MCWalkerConfiguration.h.
References SampleStack::getNumSamples(), and MCWalkerConfiguration::samples.
Referenced by QMCCostFunction::checkConfigurations(), QMCCostFunction::correlatedSampling(), and MCWalkerConfiguration::loadEnsemble().
void resetWalkerProperty | ( | int | ncopy = 1 | ) |
reset the Property container of all the walkers
Definition at line 97 of file MCWalkerConfiguration.cpp.
References APP_ABORT, qmcplusplus::app_error(), qmcplusplus::app_log(), qmcplusplus::Units::distance::m, ParticleSet::Properties, ParticleSet::PropertyList, ConstantSizeMatrix< T, ALLOC >::resize(), MCWalkerConfiguration::resizeWalkerHistories(), RecordNamedProperty< T >::size(), qmcplusplus::walker, and WalkerConfigurations::walker_list_.
Referenced by QMCDriver::process(), and qmcplusplus::TEST_CASE().
void resize | ( | int | numWalkers, |
int | numPtcls | ||
) |
clean up the walker list and make a new list
Definition at line 65 of file MCWalkerConfiguration.cpp.
References qmcplusplus::app_warning(), WalkerConfigurations::getActiveWalkers(), ParticleSet::R, WalkerConfigurations::resize(), ParticleSet::resize(), ParticleSet::spins, ParticleSet::TotalNum, and WalkerConfigurations::walker_list_.
void resizeWalkerHistories | ( | ) |
resize Walker::PropertyHistory and Walker::PHindex:
Definition at line 122 of file MCWalkerConfiguration.cpp.
References ParticleSet::PHindex, ParticleSet::PropertyHistory, and WalkerConfigurations::walker_list_.
Referenced by MCWalkerConfiguration::createWalkers(), MCWalkerConfiguration::loadEnsemble(), and MCWalkerConfiguration::resetWalkerProperty().
make random moves for all the walkers
Make Metropolis move to the walkers and save in a temporary array.
make a random move for a walker
it | the iterator of the first walker to work on |
tauinv | inverse of the time step |
R + D + X
Definition at line 87 of file MCWalkerConfiguration.cpp.
Referenced by MCWalkerConfiguration::dumpEnsemble().
void saveEnsemble | ( | ) |
save the position of current walkers to SampleStack
save the current walkers to SampleStack
Definition at line 147 of file MCWalkerConfiguration.cpp.
References WalkerConfigurations::walker_list_.
save the position of current walkers
save the [first,last) walkers to SampleStack
Definition at line 151 of file MCWalkerConfiguration.cpp.
References SampleStack::appendSample(), ParticleSet::first(), ParticleSet::last(), and MCWalkerConfiguration::samples.
|
inline |
set LocalEnergy
e | current average Local Energy |
Definition at line 110 of file MCWalkerConfiguration.h.
References qmcplusplus::Units::charge::e, and MCWalkerConfiguration::LocalEnergy.
void setNumSamples | ( | int | n | ) |
set the number of max samples
allocate the SampleStack
n | number of samples per thread |
Definition at line 139 of file MCWalkerConfiguration.cpp.
References SampleStack::clearEnsemble(), qmcplusplus::n, MCWalkerConfiguration::samples, and SampleStack::setMaxSamples().
|
inline |
Definition at line 118 of file MCWalkerConfiguration.h.
References MCWalkerConfiguration::Polymer.
|
inline |
Definition at line 122 of file MCWalkerConfiguration.h.
References MCWalkerConfiguration::ReadyForPbyP.
|
friend |
Definition at line 171 of file MCWalkerConfiguration.h.
|
protected |
Definition at line 164 of file MCWalkerConfiguration.h.
Referenced by MCWalkerConfiguration::getLocalEnergy(), and MCWalkerConfiguration::setLocalEnergy().
|
private |
Definition at line 174 of file MCWalkerConfiguration.h.
Referenced by MCWalkerConfiguration::getPolymer(), and MCWalkerConfiguration::setPolymer().
|
protected |
true if the buffer is ready for particle-by-particle updates
Definition at line 160 of file MCWalkerConfiguration.h.
Referenced by MCWalkerConfiguration::updatePbyP().
Reptile* reptile |
Definition at line 169 of file MCWalkerConfiguration.h.
Referenced by RMCLocalEnergyEstimator::accumulate(), RMCUpdatePbyPWithDrift::advanceWalkersRMC(), RMCUpdateAllWithDrift::advanceWalkersRMC(), RMCUpdatePbyPWithDrift::advanceWalkersVMC(), RMCUpdateAllWithDrift::advanceWalkersVMC(), SimpleFixedNodeBranch::collect(), RMCUpdateAllWithDrift::initWalkers(), and RMCUpdatePbyPWithDrift::initWalkers().
ReptileList_t ReptileList |
a collection of reptiles contained in MCWalkerConfiguration.
Definition at line 168 of file MCWalkerConfiguration.h.
Referenced by RMC::resetReptiles(), and RMC::resetRun().
|
private |
Definition at line 176 of file MCWalkerConfiguration.h.
Referenced by MCWalkerConfiguration::clearEnsemble(), MCWalkerConfiguration::getMaxSamples(), MCWalkerConfiguration::getSampleStack(), MCWalkerConfiguration::loadEnsemble(), MCWalkerConfiguration::loadSample(), MCWalkerConfiguration::MCWalkerConfiguration(), MCWalkerConfiguration::numSamples(), MCWalkerConfiguration::saveEnsemble(), and MCWalkerConfiguration::setNumSamples().
|
protected |
update-mode index
Definition at line 162 of file MCWalkerConfiguration.h.