|  | QMCPACK
    | 
Class that collects momentum distribution of electrons. More...
 Inheritance diagram for MomentumDistribution:
 Inheritance diagram for MomentumDistribution: Collaboration diagram for MomentumDistribution:
 Collaboration diagram for MomentumDistribution:| Public Types | |
| using | LatticeType = PtclOnLatticeTraits::ParticleLayout | 
| using | RealType = QMCTraits::RealType | 
| using | ComplexType = QMCTraits::ComplexType | 
| using | ValueType = QMCTraits::ValueType | 
| using | PosType = QMCTraits::PosType | 
|  Public Types inherited from OperatorEstBase | |
| using | QMCT = QMCTraits | 
| using | FullPrecRealType = QMCT::FullPrecRealType | 
| using | MCPWalker = Walker< QMCTraits, PtclOnLatticeTraits > | 
| using | Data = std::vector< QMCT::RealType > | 
| Public Member Functions | |
| MomentumDistribution (MomentumDistributionInput &&mdi, size_t np, const PosType &twist, const LatticeType &lattice, DataLocality dl=DataLocality::crowd) | |
| Constructor for MomentumDistributionInput.  More... | |
| MomentumDistribution (const MomentumDistribution &md, DataLocality dl) | |
| Constructor used when spawing crowd clones needs to be public so std::make_unique can call it.  More... | |
| void | startBlock (int steps) override | 
| This allows us to allocate the necessary data for the DataLocality::queue.  More... | |
| std::unique_ptr< OperatorEstBase > | spawnCrowdClone () const override | 
| standard interface  More... | |
| void | accumulate (const RefVector< MCPWalker > &walkers, const RefVector< ParticleSet > &psets, const RefVector< TrialWaveFunction > &wfns, const RefVector< QMCHamiltonian > &hams, RandomBase< FullPrecRealType > &rng) override | 
| accumulate 1 or more walkers of MomentumDistribution samples  More... | |
| void | collect (const RefVector< OperatorEstBase > &operator_estimators) override | 
| this allows the EstimatorManagerNew to reduce without needing to know the details of MomentumDistribution's data.  More... | |
| void | registerOperatorEstimator (hdf_archive &file) override | 
| this allows the EstimatorManagerNew to reduce without needing to know the details of MomentumDistribution's data.  More... | |
|  Public Member Functions inherited from OperatorEstBase | |
| OperatorEstBase (DataLocality dl) | |
| constructor  More... | |
| OperatorEstBase (const OperatorEstBase &oth) | |
| Shallow copy constructor! This alows us to keep the default copy constructors for derived classes which is quite useful to the spawnCrowdClone design.  More... | |
| virtual | ~OperatorEstBase ()=default | 
| virtual destructor  More... | |
| virtual void | normalize (QMCT::RealType invToWgt) | 
| std::vector< QMCT::RealType > & | get_data () | 
| void | write (hdf_archive &file) | 
| Write to previously registered observable_helper hdf5 wrapper.  More... | |
| void | zero () | 
| zero data appropriately for the DataLocality  More... | |
| QMCT::FullPrecRealType | get_walkers_weight () const | 
| Return the total walker weight for this block.  More... | |
| const std::string & | get_my_name () const | 
| virtual void | registerListeners (QMCHamiltonian &ham_leader) | 
| Register 0-many listeners with a leading QMCHamiltonian instance i.e.  More... | |
| bool | isListenerRequired () | 
| DataLocality | get_data_locality () const | 
| Public Attributes | |
| const MomentumDistributionInput | input_ | 
| input values  More... | |
| const PosType | twist | 
| twist angle  More... | |
| const LatticeType | Lattice | 
| lattice vector  More... | |
| const RealType | norm_nofK | 
| normalization factor for n(k)  More... | |
| std::vector< PosType > | kPoints | 
| list of k-points in Cartesian Coordinates  More... | |
| std::vector< int > | kWeights | 
| weight of k-points (make use of symmetry)  More... | |
| std::vector< PosType > | vPos | 
| More... | |
| std::vector< ValueType > | psi_ratios | 
| wavefunction ratios  More... | |
| Matrix< ValueType > | psi_ratios_all | 
| wavefunction ratios all samples  More... | |
| Vector< RealType > | kdotp | 
| nofK internal  More... | |
| VectorSoaContainer< RealType, 2 > | phases | 
| phases  More... | |
| std::vector< VectorSoaContainer< RealType, 2 > > | phases_vPos | 
| phases of vPos  More... | |
| aligned_vector< RealType > | nofK | 
| nofK  More... | |
| Private Member Functions | |
| MomentumDistribution (const MomentumDistribution &md)=default | |
| Friends | |
| class | testing::MomentumDistributionTests | 
| Additional Inherited Members | |
|  Protected Attributes inherited from OperatorEstBase | |
| DataLocality | data_locality_ | 
| locality for accumulation of estimator data.  More... | |
| std::string | my_name_ | 
| name of this object – only used for debugging and h5 output  More... | |
| QMCT::FullPrecRealType | walkers_weight_ | 
| std::vector< ObservableHelper > | h5desc_ | 
| Data | data_ | 
| bool | requires_listener_ = false | 
Class that collects momentum distribution of electrons.
Definition at line 33 of file MomentumDistribution.h.
| using ComplexType = QMCTraits::ComplexType | 
Definition at line 38 of file MomentumDistribution.h.
Definition at line 36 of file MomentumDistribution.h.
| using PosType = QMCTraits::PosType | 
Definition at line 40 of file MomentumDistribution.h.
| using RealType = QMCTraits::RealType | 
Definition at line 37 of file MomentumDistribution.h.
| using ValueType = QMCTraits::ValueType | 
Definition at line 39 of file MomentumDistribution.h.
| MomentumDistribution | ( | MomentumDistributionInput && | mdi, | 
| size_t | np, | ||
| const PosType & | twist, | ||
| const LatticeType & | lattice, | ||
| DataLocality | dl = DataLocality::crowd | ||
| ) | 
Constructor for MomentumDistributionInput.
Definition at line 22 of file MomentumDistribution.cpp.
References qmcplusplus::app_log(), OperatorEstBase::data_, qmcplusplus::dot(), MomentumDistributionInput::get_kmax(), MomentumDistributionInput::get_kmax0(), MomentumDistributionInput::get_kmax1(), MomentumDistributionInput::get_kmax2(), MomentumDistributionInput::get_name(), MomentumDistributionInput::get_samples(), CrystalLattice< T, D >::Gv, MomentumDistribution::input_, CrystalLattice< T, D >::k_cart(), MomentumDistribution::kdotp, MomentumDistribution::kPoints, OperatorEstBase::my_name_, MomentumDistribution::nofK, OHMMS_DIM, MomentumDistribution::phases, MomentumDistribution::phases_vPos, qmcplusplus::pow(), MomentumDistribution::psi_ratios, MomentumDistribution::psi_ratios_all, qmcplusplus::real(), Matrix< T, Alloc >::resize(), VectorSoaContainer< T, D, Alloc >::resize(), Vector< T, Alloc >::resize(), qmcplusplus::sqrt(), MomentumDistribution::twist, CrystalLattice< T, D >::Volume, MomentumDistribution::vPos, and CrystalLattice< T, D >::WignerSeitzRadius_G.
| MomentumDistribution | ( | const MomentumDistribution & | md, | 
| DataLocality | dl | ||
| ) | 
Constructor used when spawing crowd clones needs to be public so std::make_unique can call it.
Do not use directly unless you've really thought it through.
Definition at line 174 of file MomentumDistribution.cpp.
References OperatorEstBase::data_locality_.
| 
 | privatedefault | 
| 
 | overridevirtual | 
accumulate 1 or more walkers of MomentumDistribution samples
Gets called every step and writes to thread local data.
Implements OperatorEstBase.
Definition at line 235 of file MomentumDistribution.cpp.
References Vector< T, Alloc >::data(), VectorSoaContainer< T, D, Alloc >::data(), OperatorEstBase::data_, qmcplusplus::dot(), eval_e2iphi(), TrialWaveFunction::evaluateRatiosAlltoOne(), OMPstd::fill_n(), MomentumDistributionInput::get_samples(), MomentumDistribution::input_, MomentumDistribution::kdotp, MomentumDistribution::kPoints, MomentumDistribution::nofK, MomentumDistribution::norm_nofK, OHMMS_DIM, MomentumDistribution::phases, MomentumDistribution::phases_vPos, qmcplusplus::pset, MomentumDistribution::psi_ratios, MomentumDistribution::psi_ratios_all, qmcplusplus::Units::time::s, CrystalLattice< T, D >::toCart(), MomentumDistribution::vPos, qmcplusplus::walker, qmcplusplus::hdf::walkers, and OperatorEstBase::walkers_weight_.
| 
 | overridevirtual | 
this allows the EstimatorManagerNew to reduce without needing to know the details of MomentumDistribution's data.
can use base class default until crowd level MomentumDistribution estimators don't have a copy of the density grid.
Reimplemented from OperatorEstBase.
Definition at line 305 of file MomentumDistribution.cpp.
References OperatorEstBase::collect(), qmcplusplus::crowd, and OperatorEstBase::data_locality_.
| 
 | overridevirtual | 
this allows the EstimatorManagerNew to reduce without needing to know the details of MomentumDistribution's data.
can use base class default until crowd level MomentumDistribution estimators don't have a copy of the density grid. this gets us into the hdf5 file
Just parroting for now don't fully understand. , needs to be unraveled and simplified the hdf5 output is another big state big coupling design.
Reimplemented from OperatorEstBase.
Definition at line 318 of file MomentumDistribution.cpp.
References OperatorEstBase::h5desc_, MomentumDistribution::kPoints, MomentumDistribution::kWeights, MomentumDistribution::nofK, and qmcplusplus::Units::time::s.
| 
 | overridevirtual | 
standard interface
Implements OperatorEstBase.
Definition at line 179 of file MomentumDistribution.cpp.
References OperatorEstBase::data_, OperatorEstBase::data_locality_, qmcplusplus::queue, and qmcplusplus::rank.
| 
 | overridevirtual | 
This allows us to allocate the necessary data for the DataLocality::queue.
Implements OperatorEstBase.
Definition at line 219 of file MomentumDistribution.cpp.
| 
 | friend | 
Definition at line 130 of file MomentumDistribution.h.
| const MomentumDistributionInput input_ | 
input values
Definition at line 44 of file MomentumDistribution.h.
Referenced by MomentumDistribution::accumulate(), and MomentumDistribution::MomentumDistribution().
nofK internal
Definition at line 65 of file MomentumDistribution.h.
Referenced by MomentumDistribution::accumulate(), and MomentumDistribution::MomentumDistribution().
| std::vector<PosType> kPoints | 
list of k-points in Cartesian Coordinates
Definition at line 52 of file MomentumDistribution.h.
Referenced by MomentumDistribution::accumulate(), MomentumDistribution::MomentumDistribution(), MomentumDistribution::registerOperatorEstimator(), and MomentumDistributionTests::testCopyConstructor().
| std::vector<int> kWeights | 
weight of k-points (make use of symmetry)
Definition at line 54 of file MomentumDistribution.h.
Referenced by MomentumDistribution::registerOperatorEstimator().
| const LatticeType Lattice | 
lattice vector
Definition at line 48 of file MomentumDistribution.h.
| aligned_vector<RealType> nofK | 
nofK
Definition at line 71 of file MomentumDistribution.h.
Referenced by MomentumDistribution::accumulate(), MomentumDistribution::MomentumDistribution(), and MomentumDistribution::registerOperatorEstimator().
| const RealType norm_nofK | 
normalization factor for n(k)
Definition at line 50 of file MomentumDistribution.h.
Referenced by MomentumDistribution::accumulate().
| VectorSoaContainer<RealType, 2> phases | 
phases
Definition at line 67 of file MomentumDistribution.h.
Referenced by MomentumDistribution::accumulate(), and MomentumDistribution::MomentumDistribution().
| std::vector<VectorSoaContainer<RealType, 2> > phases_vPos | 
phases of vPos
Definition at line 69 of file MomentumDistribution.h.
Referenced by MomentumDistribution::accumulate(), and MomentumDistribution::MomentumDistribution().
| std::vector<ValueType> psi_ratios | 
wavefunction ratios
Definition at line 61 of file MomentumDistribution.h.
Referenced by MomentumDistribution::accumulate(), and MomentumDistribution::MomentumDistribution().
wavefunction ratios all samples
Definition at line 63 of file MomentumDistribution.h.
Referenced by MomentumDistribution::accumulate(), and MomentumDistribution::MomentumDistribution().
| const PosType twist | 
twist angle
Definition at line 46 of file MomentumDistribution.h.
Referenced by MomentumDistribution::MomentumDistribution(), and MomentumDistributionTests::testCopyConstructor().
| std::vector<PosType> vPos | 
 
sample positions
Definition at line 59 of file MomentumDistribution.h.
Referenced by MomentumDistribution::accumulate(), and MomentumDistribution::MomentumDistribution().