![]() |
QMCPACK
|
gofr estimator More...
Inheritance diagram for PairCorrEstimator:
Collaboration diagram for PairCorrEstimator:Public Member Functions | |
| PairCorrEstimator (ParticleSet &elns, std::string &sources) | |
| constructor More... | |
| std::string | getClassName () const override |
| return class name More... | |
| void | resetTargetParticleSet (ParticleSet &P) override |
| Reset the data with the target ParticleSet. More... | |
| Return_t | evaluate (ParticleSet &P) override |
| Evaluate the local energy contribution of this component. More... | |
| void | addObservables (PropertySetType &plist) |
| void | addObservables (PropertySetType &plist, BufferType &collectables) override |
| named values to the property list Default implementaton uses addValue(plist_) More... | |
| void | registerCollectables (std::vector< ObservableHelper > &h5list, hdf_archive &file) const override |
| void | setObservables (PropertySetType &plist) override |
| Set the values evaluated by this object to plist Default implementation is to assign Value which is updated by evaluate function using my_index_. More... | |
| void | setParticlePropertyList (PropertySetType &plist, int offset) override |
| bool | put (xmlNodePtr cur) override |
| Read the input parameter. More... | |
| bool | get (std::ostream &os) const override |
| write about the class More... | |
| std::unique_ptr< OperatorBase > | makeClone (ParticleSet &qp, TrialWaveFunction &psi) final |
| void | set_norm_factor () |
| void | report () |
Public Member Functions inherited from OperatorBase | |
| OperatorBase () | |
| Construct a new Operator Base object Default and unique empty constructor. More... | |
| virtual | ~OperatorBase ()=default |
| virtual bool | dependsOnWaveFunction () const |
| return true if this operator depends on a wavefunction More... | |
| std::bitset< 8 > & | getUpdateMode () noexcept |
| get update_mode_ reference More... | |
| Return_t | getValue () const noexcept |
| get a copy of value_ More... | |
| std::string | getName () const noexcept |
| getter a copy of my_name_, rvalue small string optimization More... | |
| void | setName (const std::string name) noexcept |
| Set my_name member, uses small string optimization (pass by value) More... | |
| TraceRequest & | getRequest () noexcept |
| Get request_ member. More... | |
| virtual void | registerObservables (std::vector< ObservableHelper > &h5desc, hdf_archive &file) const |
| add to observable descriptor for hdf5 The default implementation is to register a scalar for this->value_ More... | |
| virtual void | setHistories (Walker_t &ThisWalker) |
| virtual Return_t | evaluateDeterministic (ParticleSet &P) |
| Evaluate the local energy contribution of this component, deterministically based on current state. More... | |
| virtual void | mw_evaluate (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list) const |
| Evaluate the contribution of this component of multiple walkers. More... | |
| virtual void | mw_evaluatePerParticle (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< ListenerVector< RealType >> &listeners, const std::vector< ListenerVector< RealType >> &listeners_ions) const |
| Evaluate the contribution of this component of multiple walkers per particle and report to registerd listeners from objects in Estimators. More... | |
| virtual void | mw_evaluateWithParameterDerivatives (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< ParticleSet > &p_list, const opt_variables_type &optvars, const RecordArray< ValueType > &dlogpsi, RecordArray< ValueType > &dhpsioverpsi) const |
| TODO: add docs. More... | |
| virtual Return_t | rejectedMove (ParticleSet &P) |
| TODO: add docs. More... | |
| virtual Return_t | evaluateWithToperator (ParticleSet &P) |
| Evaluate the local energy contribution of this component with Toperators updated if requested. More... | |
| virtual void | mw_evaluateWithToperator (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list) const |
| Evaluate the contribution of this component of multiple walkers. More... | |
| virtual void | mw_evaluatePerParticleWithToperator (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< ListenerVector< RealType >> &listeners, const std::vector< ListenerVector< RealType >> &listeners_ions) const |
| Evaluate the contribution of this component of multiple walkers per particle and report to registerd listeners from objects in Estimators. More... | |
| virtual Return_t | evaluateValueAndDerivatives (ParticleSet &P, const opt_variables_type &optvars, const Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi) |
| Evaluate value and derivatives wrt the optimizables. More... | |
| virtual Return_t | evaluateWithIonDerivs (ParticleSet &P, ParticleSet &ions, TrialWaveFunction &psi, ParticleSet::ParticlePos &hf_term, ParticleSet::ParticlePos &pulay_term) |
| Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase. More... | |
| virtual Return_t | evaluateWithIonDerivsDeterministic (ParticleSet &P, ParticleSet &ions, TrialWaveFunction &psi, ParticleSet::ParticlePos &hf_term, ParticleSet::ParticlePos &pulay_term) |
| Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase. More... | |
| virtual void | evaluateOneBodyOpMatrix (ParticleSet &P, const TWFFastDerivWrapper &psi, std::vector< ValueMatrix > &B) |
| Evaluate "B" matrix for observable. More... | |
| virtual void | evaluateOneBodyOpMatrixForceDeriv (ParticleSet &P, ParticleSet &source, const TWFFastDerivWrapper &psi, const int iat, std::vector< std::vector< ValueMatrix >> &Bforce) |
| Evaluate "dB/dR" matrices for observable. More... | |
| virtual void | updateSource (ParticleSet &s) |
| Update data associated with a particleset. More... | |
| virtual Return_t | getEnsembleAverage () |
| Return an average value by collective operation. More... | |
| virtual void | createResource (ResourceCollection &collection) const |
| Initialize a shared resource and hand it to a collection. More... | |
| virtual void | acquireResource (ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const |
| Acquire a shared resource from a collection. More... | |
| virtual void | releaseResource (ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const |
| Return a shared resource to a collection. More... | |
| virtual void | setRandomGenerator (RandomBase< FullPrecRealType > *rng) |
| Set the Random Generator object TODO: add docs. More... | |
| virtual void | add2Hamiltonian (ParticleSet &qp, TrialWaveFunction &psi, QMCHamiltonian &targetH) |
| TODO: add docs. More... | |
| virtual void | getRequiredTraces (TraceManager &tm) |
| TODO: add docs. More... | |
| virtual void | informOfPerParticleListener () |
| bool | isClassical () const noexcept |
| bool | isQuantum () const noexcept |
| bool | isClassicalClassical () const noexcept |
| bool | isQuantumClassical () const noexcept |
| bool | isQuantumQuantum () const noexcept |
| bool | getMode (const int i) const noexcept |
| Return the mode i. More... | |
| bool | isNonLocal () const noexcept |
| TODO: add docs. More... | |
| bool | hasListener () const noexcept |
| void | contributeTraceQuantities () |
| Make trace quantities available. More... | |
| void | checkoutTraceQuantities (TraceManager &tm) |
| Checkout trace arrays Derived classes must guard individual checkouts using request info. More... | |
| void | collectScalarTraces () |
| Collect scalar trace data. More... | |
| void | deleteTraceQuantities () |
| delete trace arrays More... | |
Static Public Member Functions | |
| static int | gen_pair_id (const int ig, const int jg, const int ns) |
| generate the unique pair id from the group ids of particle i and j and the number of species More... | |
Private Member Functions | |
| void | resize (int nbins) |
| resize the internal data More... | |
Private Attributes | |
| int | NumBins |
| number of bins More... | |
| RealType | Dmax |
| maximum distance More... | |
| RealType | Delta |
| bin size More... | |
| RealType | DeltaInv |
| one of bin size More... | |
| RealType | Volume |
| volume of the cell More... | |
| std::vector< int > | pair_ids |
| save pair indices More... | |
| std::vector< int > | other_ids |
| table indexs for other type More... | |
| std::vector< int > | other_offsets |
| offset of the gofr's associated with others_id More... | |
| Matrix< RealType > | norm_factor |
| normalization factor More... | |
| int | num_species |
| int | N_e |
| std::vector< RealType > | n_vec |
| const int | d_aa_ID_ |
| std::vector< std::string > | gof_r_prefix |
| prefix of each gof_r More... | |
Additional Inherited Members | |
Public Types inherited from OperatorBase | |
| enum | EnergyDomains { KINETIC = 0, POTENTIAL, NO_ENERGY_DOMAIN } |
| enum to denote energy domain of operators More... | |
| enum | QuantumDomains { NO_QUANTUM_DOMAIN = 0, CLASSICAL, QUANTUM, CLASSICAL_CLASSICAL, QUANTUM_CLASSICAL, QUANTUM_QUANTUM } |
| enum | { PRIMARY = 0, OPTIMIZABLE = 1, RATIOUPDATE = 2, PHYSICAL = 3, COLLECTABLE = 4, NONLOCAL = 5 } |
| enum for update_mode More... | |
| using | Return_t = FullPrecRealType |
| type of return value of evaluate More... | |
| using | ValueMatrix = SPOSet::ValueMatrix |
| For fast derivative evaluation. More... | |
| using | GradMatrix = SPOSet::GradMatrix |
| using | BufferType = ParticleSet::Buffer_t |
| typedef for the serialized buffer More... | |
| using | Walker_t = ParticleSet::Walker_t |
| typedef for the walker More... | |
| using | ParticleScalar = ParticleSet::Scalar_t |
| typedef for the ParticleScalar More... | |
| using | SPOMap = SPOSet::SPOMap |
| typedef for SPOMap More... | |
Public Types inherited from QMCTraits | |
| enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
| using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
| using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
| using | RealType = QTBase::RealType |
| using | ComplexType = QTBase::ComplexType |
| using | ValueType = QTBase::ValueType |
| using | PosType = QTBase::PosType |
| using | GradType = QTBase::GradType |
| using | TensorType = QTBase::TensorType |
| using | IndexType = OHMMS_INDEXTYPE |
| define other types More... | |
| using | FullPrecRealType = QTFull::RealType |
| using | FullPrecValueType = QTFull::ValueType |
| using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
| define PropertyList_t More... | |
| using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
Protected Member Functions inherited from OperatorBase | |
| virtual void | contributeScalarQuantities () |
| virtual void | checkoutScalarQuantities (TraceManager &tm) |
| virtual void | collectScalarQuantities () |
| virtual void | deleteScalarQuantities () |
| virtual void | contributeParticleQuantities () |
| virtual void | checkoutParticleQuantities (TraceManager &tm) |
| virtual void | deleteParticleQuantities () |
| virtual void | setComputeForces (bool compute) |
| void | setEnergyDomain (EnergyDomains edomain) |
| Set the Energy Domain. More... | |
| void | setQuantumDomain (QuantumDomains qdomain) |
| set quantum domain More... | |
| void | oneBodyQuantumDomain (const ParticleSet &P) |
| set quantum domain for one-body operator More... | |
| void | twoBodyQuantumDomain (const ParticleSet &P) |
| set quantum domain for two-body operator More... | |
| void | twoBodyQuantumDomain (const ParticleSet &P1, const ParticleSet &P2) |
| set quantum domain for two-body operator More... | |
| void | addValue (PropertySetType &plist) |
| named values to the property list More... | |
Protected Attributes inherited from OperatorBase | |
| std::bitset< 8 > | update_mode_ |
| set the current update mode More... | |
| Return_t | value_ |
| current value More... | |
| std::string | name_ |
| name of this object More... | |
| TraceRequest | request_ |
| whether traces are being collected More... | |
| int | my_index_ |
| starting index of this object More... | |
| Return_t | new_value_ |
| a new value for a proposed move More... | |
| Walker_t * | t_walker_ |
| reference to the current walker More... | |
| bool | streaming_particles_ |
| bool | have_required_traces_ |
gofr estimator
Compute pair correlation function for the target particle set and optionally any source particles
Definition at line 27 of file PairCorrEstimator.h.
| PairCorrEstimator | ( | ParticleSet & | elns, |
| std::string & | sources | ||
| ) |
constructor
| elns | target particle set |
| sources | list of source particle sets |
Use the elns.DistTables to evaluate the pair correlation functions.
Definition at line 25 of file PairCorrEstimator.cpp.
References qmcplusplus::app_log(), OperatorBase::COLLECTABLE, copy(), PairCorrEstimator::Delta, PairCorrEstimator::DeltaInv, PairCorrEstimator::Dmax, ParticleSet::first(), ParticleSet::getDistTable(), ParticleSet::getLattice(), OhmmsElementBase::getName(), ParticleSet::getNumDistTables(), ParticleSet::getTotalNum(), PairCorrEstimator::gof_r_prefix, ParticleSet::groups(), ParticleSet::last(), PairCorrEstimator::N_e, PairCorrEstimator::n_vec, qmcplusplus::NEED_FULL_TABLE_ON_HOST_AFTER_DONEPBYP, PairCorrEstimator::num_species, PairCorrEstimator::NumBins, PairCorrEstimator::other_ids, PairCorrEstimator::other_offsets, parsewords(), SpeciesSet::size(), OperatorBase::update_mode_, and PairCorrEstimator::Volume.
|
inline |
|
overridevirtual |
named values to the property list Default implementaton uses addValue(plist_)
| plist | RecordNameProperty |
| collectables | Observables that are accumulated by evaluate |
Reimplemented from OperatorBase.
Definition at line 177 of file PairCorrEstimator.cpp.
References PooledData< T >::add(), PairCorrEstimator::gof_r_prefix, OperatorBase::my_index_, PairCorrEstimator::NumBins, and PooledData< T >::size().
|
overridevirtual |
Evaluate the local energy contribution of this component.
| P | input configuration containing N particles |
Implements OperatorBase.
Definition at line 117 of file PairCorrEstimator.cpp.
References ParticleSet::Collectables, PairCorrEstimator::d_aa_ID_, PairCorrEstimator::DeltaInv, PairCorrEstimator::Dmax, PairCorrEstimator::gen_pair_id(), ParticleSet::getDistTableAA(), ParticleSet::getDistTableAB(), ParticleSet::GroupID, OperatorBase::my_index_, PairCorrEstimator::norm_factor, PairCorrEstimator::num_species, PairCorrEstimator::NumBins, PairCorrEstimator::other_ids, and PairCorrEstimator::other_offsets.
Referenced by qmcplusplus::TEST_CASE().
|
static |
generate the unique pair id from the group ids of particle i and j and the number of species
Definition at line 109 of file PairCorrEstimator.cpp.
References qmcplusplus::Units::time::ns.
Referenced by PairCorrEstimator::evaluate(), and qmcplusplus::TEST_CASE().
|
overridevirtual |
write about the class
Implements OperatorBase.
Definition at line 321 of file PairCorrEstimator.cpp.
References PairCorrEstimator::Dmax, and OperatorBase::name_.
|
inlineoverridevirtual |
|
finalvirtual |
Implements OperatorBase.
Definition at line 327 of file PairCorrEstimator.cpp.
|
overridevirtual |
Read the input parameter.
| cur | xml node for a OperatorBase object |
Implements OperatorBase.
Definition at line 209 of file PairCorrEstimator.cpp.
References OhmmsAttributeSet::add(), qmcplusplus::ceil(), PairCorrEstimator::Delta, PairCorrEstimator::DeltaInv, PairCorrEstimator::Dmax, PairCorrEstimator::NumBins, OhmmsAttributeSet::put(), PairCorrEstimator::report(), and PairCorrEstimator::set_norm_factor().
Referenced by qmcplusplus::TEST_CASE().
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 161 of file PairCorrEstimator.cpp.
References PairCorrEstimator::Delta, PairCorrEstimator::Dmax, PairCorrEstimator::gof_r_prefix, OperatorBase::my_index_, and PairCorrEstimator::NumBins.
| void report | ( | ) |
Definition at line 308 of file PairCorrEstimator.cpp.
References qmcplusplus::app_log(), PairCorrEstimator::Delta, PairCorrEstimator::DeltaInv, PairCorrEstimator::Dmax, PairCorrEstimator::num_species, PairCorrEstimator::NumBins, and PairCorrEstimator::Volume.
Referenced by PairCorrEstimator::put().
|
overridevirtual |
Reset the data with the target ParticleSet.
| P | new target ParticleSet |
Implements OperatorBase.
Definition at line 106 of file PairCorrEstimator.cpp.
|
private |
resize the internal data
| nbins | number of bins for the historgram |
Definition at line 333 of file PairCorrEstimator.cpp.
References PairCorrEstimator::Delta, PairCorrEstimator::DeltaInv, qmcplusplus::Units::distance::m, qmcplusplus::n, PairCorrEstimator::N_e, PairCorrEstimator::n_vec, PairCorrEstimator::norm_factor, PairCorrEstimator::num_species, PairCorrEstimator::NumBins, Matrix< T, Alloc >::resize(), and PairCorrEstimator::Volume.
| void set_norm_factor | ( | ) |
Definition at line 234 of file PairCorrEstimator.cpp.
References PairCorrEstimator::Delta, qmcplusplus::Units::distance::m, qmcplusplus::n, PairCorrEstimator::N_e, PairCorrEstimator::n_vec, qmcplusplus::Units::distance::nm, PairCorrEstimator::norm_factor, PairCorrEstimator::num_species, PairCorrEstimator::NumBins, qmcplusplus::pow(), Matrix< T, Alloc >::resize(), and PairCorrEstimator::Volume.
Referenced by PairCorrEstimator::put().
|
overridevirtual |
Set the values evaluated by this object to plist Default implementation is to assign Value which is updated by evaluate function using my_index_.
| plist | RecordNameProperty |
Reimplemented from OperatorBase.
Definition at line 199 of file PairCorrEstimator.cpp.
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 204 of file PairCorrEstimator.cpp.
|
private |
Definition at line 83 of file PairCorrEstimator.h.
Referenced by PairCorrEstimator::evaluate().
|
private |
bin size
Definition at line 65 of file PairCorrEstimator.h.
Referenced by PairCorrEstimator::PairCorrEstimator(), PairCorrEstimator::put(), PairCorrEstimator::registerCollectables(), PairCorrEstimator::report(), PairCorrEstimator::resize(), and PairCorrEstimator::set_norm_factor().
|
private |
one of bin size
Definition at line 67 of file PairCorrEstimator.h.
Referenced by PairCorrEstimator::evaluate(), PairCorrEstimator::PairCorrEstimator(), PairCorrEstimator::put(), PairCorrEstimator::report(), and PairCorrEstimator::resize().
|
private |
maximum distance
Definition at line 63 of file PairCorrEstimator.h.
Referenced by PairCorrEstimator::evaluate(), PairCorrEstimator::get(), PairCorrEstimator::PairCorrEstimator(), PairCorrEstimator::put(), PairCorrEstimator::registerCollectables(), and PairCorrEstimator::report().
|
private |
prefix of each gof_r
Definition at line 87 of file PairCorrEstimator.h.
Referenced by PairCorrEstimator::addObservables(), PairCorrEstimator::PairCorrEstimator(), and PairCorrEstimator::registerCollectables().
|
private |
Definition at line 80 of file PairCorrEstimator.h.
Referenced by PairCorrEstimator::PairCorrEstimator(), PairCorrEstimator::resize(), and PairCorrEstimator::set_norm_factor().
|
private |
Definition at line 81 of file PairCorrEstimator.h.
Referenced by PairCorrEstimator::PairCorrEstimator(), PairCorrEstimator::resize(), and PairCorrEstimator::set_norm_factor().
normalization factor
Definition at line 79 of file PairCorrEstimator.h.
Referenced by PairCorrEstimator::evaluate(), PairCorrEstimator::resize(), and PairCorrEstimator::set_norm_factor().
|
private |
Definition at line 80 of file PairCorrEstimator.h.
Referenced by PairCorrEstimator::evaluate(), PairCorrEstimator::PairCorrEstimator(), PairCorrEstimator::report(), PairCorrEstimator::resize(), and PairCorrEstimator::set_norm_factor().
|
private |
number of bins
Definition at line 61 of file PairCorrEstimator.h.
Referenced by PairCorrEstimator::addObservables(), PairCorrEstimator::evaluate(), PairCorrEstimator::PairCorrEstimator(), PairCorrEstimator::put(), PairCorrEstimator::registerCollectables(), PairCorrEstimator::report(), PairCorrEstimator::resize(), and PairCorrEstimator::set_norm_factor().
|
private |
table indexs for other type
Definition at line 73 of file PairCorrEstimator.h.
Referenced by PairCorrEstimator::evaluate(), and PairCorrEstimator::PairCorrEstimator().
|
private |
offset of the gofr's associated with others_id
Definition at line 75 of file PairCorrEstimator.h.
Referenced by PairCorrEstimator::evaluate(), and PairCorrEstimator::PairCorrEstimator().
|
private |
save pair indices
Definition at line 71 of file PairCorrEstimator.h.
|
private |
volume of the cell
Definition at line 69 of file PairCorrEstimator.h.
Referenced by PairCorrEstimator::PairCorrEstimator(), PairCorrEstimator::report(), PairCorrEstimator::resize(), and PairCorrEstimator::set_norm_factor().