![]() |
QMCPACK
|
Inheritance diagram for SpinDensity:
Collaboration diagram for SpinDensity:Public Member Functions | |
| SpinDensity (ParticleSet &P) | |
| ~SpinDensity () override | |
| std::string | getClassName () const override |
| return class name More... | |
| std::unique_ptr< OperatorBase > | makeClone (ParticleSet &P, TrialWaveFunction &psi) final |
| bool | put (xmlNodePtr cur) override |
| Read the input parameter. More... | |
| Return_t | evaluate (ParticleSet &P) override |
| Evaluate the local energy contribution of this component. More... | |
| void | addObservables (PropertySetType &plist, BufferType &olist) override |
| named values to the property list Default implementaton uses addValue(plist_) More... | |
| void | registerCollectables (std::vector< ObservableHelper > &h5desc, hdf_archive &file) const override |
| void | resetTargetParticleSet (ParticleSet &P) override |
| Reset the data with the target ParticleSet. More... | |
| 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 |
| void | checkout_scalar_arrays (TraceManager &tm) |
| void | collect_scalar_samples () |
| void | delete_scalar_arrays () |
| bool | get (std::ostream &os) const override |
| write about the class More... | |
| void | reset () |
| void | report (const std::string &pad) |
| void | test (int moves, ParticleSet &P) |
| Return_t | test_evaluate (ParticleSet &P, int &pmin, int &pmax) |
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... | |
Public Attributes | |
| ParticleSet * | Ptmp |
| int | nspecies |
| std::vector< int > | species_size |
| std::vector< std::string > | species_name |
| Lattice_t | cell |
| PosType | corner |
| TinyVector< int, DIM > | grid |
| TinyVector< int, DIM > | gdims |
| int | npoints |
Additional Inherited Members | |
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_ |
Definition at line 22 of file SpinDensity.h.
Definition at line 26 of file SpinDensity.h.
| using Lattice_t = ParticleSet::ParticleLayout |
Definition at line 25 of file SpinDensity.h.
Definition at line 27 of file SpinDensity.h.
| SpinDensity | ( | ParticleSet & | P | ) |
Definition at line 21 of file SpinDensity.cpp.
References APP_ABORT, ParticleSet::getLattice(), ParticleSet::getSpeciesSet(), ParticleSet::groupsize(), SpinDensity::nspecies, SpinDensity::Ptmp, SpinDensity::reset(), qmcplusplus::Units::time::s, SpeciesSet::size(), SpinDensity::species_name, SpinDensity::species_size, SpeciesSet::speciesName, and qmcplusplus::SUPERCELL_OPEN.
|
inlineoverride |
Definition at line 43 of file SpinDensity.h.
|
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 182 of file SpinDensity.cpp.
References PooledData< T >::add(), PooledData< T >::current(), OperatorBase::my_index_, SpinDensity::npoints, and SpinDensity::nspecies.
|
inline |
Definition at line 60 of file SpinDensity.h.
|
inline |
Definition at line 61 of file SpinDensity.h.
|
inline |
Definition at line 62 of file SpinDensity.h.
|
overridevirtual |
Evaluate the local energy contribution of this component.
| P | input configuration containing N particles |
Implements OperatorBase.
Definition at line 205 of file SpinDensity.cpp.
References SpinDensity::cell, ParticleSet::Collectables, SpinDensity::corner, QMCTraits::DIM, qmcplusplus::floor(), SpinDensity::gdims, SpinDensity::grid, OperatorBase::my_index_, SpinDensity::npoints, SpinDensity::nspecies, qmcplusplus::Units::time::ps, ParticleSet::R, qmcplusplus::Units::time::s, SpinDensity::species_size, OperatorBase::t_walker_, CrystalLattice< T, D >::toUnit(), and Walker< t_traits, p_traits >::Weight.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
finalvirtual |
Implements OperatorBase.
Definition at line 53 of file SpinDensity.cpp.
|
overridevirtual |
Read the input parameter.
| cur | xml node for a OperatorBase object |
Implements OperatorBase.
Definition at line 59 of file SpinDensity.cpp.
References OhmmsAttributeSet::add(), APP_ABORT, qmcplusplus::ceil(), SpinDensity::cell, CrystalLattice< T, D >::Center, SpinDensity::corner, QMCTraits::DIM, qmcplusplus::dot(), SpinDensity::gdims, ParticleSet::getLattice(), getXMLAttributeValue(), SpinDensity::grid, OperatorBase::name_, SpinDensity::npoints, SpinDensity::Ptmp, OhmmsAttributeSet::put(), putContent(), SpinDensity::report(), SpinDensity::reset(), CrystalLattice< T, D >::Rv, CrystalLattice< T, D >::set(), qmcplusplus::sqrt(), and SpinDensity::test().
|
overridevirtual |
Reimplemented from OperatorBase.
Definition at line 190 of file SpinDensity.cpp.
References OperatorBase::my_index_, OperatorBase::name_, SpinDensity::npoints, SpinDensity::nspecies, qmcplusplus::oh, qmcplusplus::Units::time::s, ObservableHelper::set_dimensions(), and SpinDensity::species_name.
| void report | ( | const std::string & | pad | ) |
Definition at line 161 of file SpinDensity.cpp.
References qmcplusplus::app_log(), SpinDensity::cell, CrystalLattice< T, D >::Center, SpinDensity::corner, QMCTraits::DIM, SpinDensity::gdims, SpinDensity::grid, SpinDensity::npoints, SpinDensity::nspecies, CrystalLattice< T, D >::Rv, qmcplusplus::Units::time::s, SpinDensity::species_name, and SpinDensity::species_size.
Referenced by SpinDensity::put().
| void reset | ( | ) |
Definition at line 45 of file SpinDensity.cpp.
References OperatorBase::COLLECTABLE, SpinDensity::corner, OperatorBase::name_, and OperatorBase::update_mode_.
Referenced by SpinDensity::put(), and SpinDensity::SpinDensity().
|
inlineoverridevirtual |
Reset the data with the target ParticleSet.
| P | new target ParticleSet |
Implements OperatorBase.
Definition at line 56 of file SpinDensity.h.
|
inlineoverridevirtual |
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 57 of file SpinDensity.h.
|
inlineoverridevirtual |
| void test | ( | int | moves, |
| ParticleSet & | P | ||
| ) |
Definition at line 229 of file SpinDensity.cpp.
References APP_ABORT, qmcplusplus::app_log(), QMCTraits::DIM, ParticleSet::getLattice(), ParticleSet::getTotalNum(), qmcplusplus::Units::distance::m, omptarget::min(), ParticleSet::R, and SpinDensity::test_evaluate().
Referenced by SpinDensity::put().
| SpinDensity::Return_t test_evaluate | ( | ParticleSet & | P, |
| int & | pmin, | ||
| int & | pmax | ||
| ) |
Definition at line 252 of file SpinDensity.cpp.
References qmcplusplus::app_log(), SpinDensity::cell, SpinDensity::corner, QMCTraits::DIM, SpinDensity::gdims, SpinDensity::grid, omptarget::min(), SpinDensity::npoints, SpinDensity::nspecies, qmcplusplus::Units::time::ps, ParticleSet::R, qmcplusplus::Units::time::s, SpinDensity::species_size, and CrystalLattice< T, D >::toUnit().
Referenced by SpinDensity::test().
| Lattice_t cell |
Definition at line 35 of file SpinDensity.h.
Referenced by SpinDensity::evaluate(), SpinDensity::put(), SpinDensity::report(), and SpinDensity::test_evaluate().
| PosType corner |
Definition at line 36 of file SpinDensity.h.
Referenced by SpinDensity::evaluate(), SpinDensity::put(), SpinDensity::report(), SpinDensity::reset(), and SpinDensity::test_evaluate().
| TinyVector<int, DIM> gdims |
Definition at line 38 of file SpinDensity.h.
Referenced by SpinDensity::evaluate(), SpinDensity::put(), SpinDensity::report(), and SpinDensity::test_evaluate().
| TinyVector<int, DIM> grid |
Definition at line 37 of file SpinDensity.h.
Referenced by SpinDensity::evaluate(), SpinDensity::put(), SpinDensity::report(), and SpinDensity::test_evaluate().
| int npoints |
Definition at line 39 of file SpinDensity.h.
Referenced by SpinDensity::addObservables(), SpinDensity::evaluate(), SpinDensity::put(), SpinDensity::registerCollectables(), SpinDensity::report(), and SpinDensity::test_evaluate().
| int nspecies |
Definition at line 32 of file SpinDensity.h.
Referenced by SpinDensity::addObservables(), SpinDensity::evaluate(), SpinDensity::registerCollectables(), SpinDensity::report(), SpinDensity::SpinDensity(), and SpinDensity::test_evaluate().
| ParticleSet* Ptmp |
Definition at line 29 of file SpinDensity.h.
Referenced by SpinDensity::put(), and SpinDensity::SpinDensity().
| std::vector<std::string> species_name |
Definition at line 34 of file SpinDensity.h.
Referenced by SpinDensity::registerCollectables(), SpinDensity::report(), and SpinDensity::SpinDensity().
| std::vector<int> species_size |
Definition at line 33 of file SpinDensity.h.
Referenced by SpinDensity::evaluate(), SpinDensity::report(), SpinDensity::SpinDensity(), and SpinDensity::test_evaluate().