23 name_ =
"SelfHealingOverlap";
26 auto msd_refvec = wfn.
findMSD();
27 if (msd_refvec.size() != 1)
28 throw std::runtime_error(
29 "SelfHealingOverlap requires one and only one multi slater determinant component in the trial wavefunction.");
39 return std::make_unique<SelfHealingOverlapLegacy>(psi);
56 std::vector<RealType> tmp(
ncoef);
57 collectables.
add(tmp.begin(), tmp.end());
63 std::vector<int> ng(1);
65 h5desc.push_back({{
"sh_coeff"}});
66 auto& h5o = h5desc.back();
78 std::vector<WaveFunctionComponent*> wcs_jastrow;
79 std::vector<WaveFunctionComponent*> wcs_fermi;
81 if (wc->isFermionic())
82 wcs_fermi.push_back(wc.get());
84 wcs_jastrow.push_back(wc.get());
89 assert(wcs_fermi.size() == 1);
92 throw std::runtime_error(
"SelfHealingOverlap estimator requires use of multideterminant wavefunction");
99 for (
auto& wc : wcs_jastrow)
100 Jval += wc->get_log_value();
const std::vector< ValueType > & getLinearExpansionCoefs() const
Vector< ValueType > det_ratios
SelfHealingOverlapLegacy(TrialWaveFunction &wfn)
helper functions for EinsplineSetBuilder
QTBase::RealType RealType
bool put(xmlNodePtr cur) override
Read the input parameter.
std::unique_ptr< OperatorBase > makeClone(ParticleSet &P, TrialWaveFunction &psi) final
int my_index_
starting index of this object
bool put(xmlNodePtr cur)
assign attributes to the set
float real(const float &c)
real part of a scalar. Cannot be replaced by std::real due to AFQMC specific needs.
void registerCollectables(std::vector< ObservableHelper > &h5desc, hdf_archive &file) const override
Vectorized record engine for scalar properties.
RefVector< MultiSlaterDetTableMethod > findMSD() const
find MSD WFCs if exist
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.
std::complex< QTFull::RealType > LogValue
An abstract class for a component of a many-body trial wave function.
std::string name_
name of this object
Specialized paritlce class for atomistic simulations.
size_type size() const
return the current size
void calcIndividualDetRatios(Vector< ValueType > &ratios)
Compute ratios of the individual Slater determinants and the total MSD value.
class to handle a set of attributes of an xmlNode
std::vector< std::unique_ptr< WaveFunctionComponent > > const & getOrbitals()
MakeReturn< UnaryNode< FnExp, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t exp(const Vector< T1, C1 > &l)
size_type current() const
Walker_t * t_walker_
reference to the current walker
Buffer_t Collectables
observables in addition to those registered in Properties/PropertyList
Declaration of a TrialWaveFunction.
FullPrecRealType Return_t
type of return value of evaluate
Class to represent a many-body trial wave function.
FullPrecRealType Weight
Weight of the walker.
void addObservables(PropertySetType &plist, BufferType &olist) override
named values to the property list Default implementaton uses addValue(plist_)
TrialWaveFunction & psi_ref
void add(PDT &aparam, const std::string &aname, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new attribute
std::bitset< 8 > update_mode_
set the current update mode
An AntiSymmetric WaveFunctionComponent composed of a linear combination of SlaterDeterminants.