23 namespace MatrixOperators
33 template<
typename MAT1,
typename MAT2>
36 const int c = small.cols();
37 for (
int i = 0; i < small.rows(); ++i)
38 std::copy(small[i], small[i] + c, big[i] + offset_c);
52 this->
add(element->makeClone());
63 int norbs = component->size();
76 app_log() <<
"CompositeSPOSet" << std::endl;
78 app_log() <<
" components" << std::endl;
81 app_log() <<
" " << i << std::endl;
96 std::copy(values.begin(), values.end(), psi.begin() +
n);
97 n += component.
size();
110 component.
evaluateVGL(P, iat, values, gradients, laplacians);
111 std::copy(values.begin(), values.end(), psi.begin() +
n);
112 std::copy(gradients.begin(), gradients.end(), dpsi.begin() +
n);
113 std::copy(laplacians.begin(), laplacians.end(), d2psi.begin() +
n);
114 n += component.
size();
133 component.
evaluateVGL_spin(P, iat, values, gradients, laplacians, spin_gradients);
134 std::copy(values.begin(), values.end(), psi.begin() +
n);
135 std::copy(gradients.begin(), gradients.end(), dpsi.begin() +
n);
136 std::copy(laplacians.begin(), laplacians.end(), d2psi.begin() +
n);
137 std::copy(spin_gradients.begin(), spin_gradients.end(), dspin_psi.begin() +
n);
138 n += component.
size();
149 const int nat = last - first;
156 components[c]->evaluate_notranspose(P, first, last, v, g, l);
171 const int nat = last - first;
178 components[c]->evaluate_notranspose(P, first, last, v, g, h);
194 not_implemented(
"evaluate_notranspose(P,first,last,logdet,dlogdet,ddlogdet,dddlogdet)");
200 std::vector<std::string> spolist;
208 for (
int i = 0; i < spolist.size(); ++i)
214 return (spo_now->size()) ? std::unique_ptr<SPOSet>{std::move(spo_now)} :
nullptr;
base class for Single-particle orbital sets
helper functions for EinsplineSetBuilder
class to read state range information from sposet input
const SPOSetBuilderFactory & sposet_builder_factory_
reference to the sposet_builder_factory
virtual std::unique_ptr< SPOSet > makeClone() const
make a clone of itself every derived class must implement this to have threading working correctly...
std::vector< int > component_offsets
store the precomputed offsets
OrbitalSetTraits< ValueType >::ValueMatrix ValueMatrix
int size() const
return the size of the orbital set Ye: this needs to be replaced by getOrbitalSetSize(); ...
const SPOSet * getSPOSet(const std::string &name) const
returns a named sposet from the pool only use in serial portion of execution ie during initialization...
std::vector< ValueVector > component_values
temporary storage for values
void copy(const Array< T1, 3 > &src, Array< T2, 3 > &dest)
OrbitalSetTraits< ValueType >::GradMatrix GradMatrix
CompositeSPOSet(const std::string &my_name)
virtual void evaluateValue(const ParticleSet &P, int iat, ValueVector &psi)=0
evaluate the values of this single-particle orbital set
Specialized paritlce class for atomistic simulations.
std::unique_ptr< SPOSet > makeClone() const override
make a clone of itself every derived class must implement this to have threading working correctly...
void evaluateVGL_spin(const ParticleSet &P, int iat, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi, ValueVector &dspin_psi) override
evaluate the values, gradients and laplacians and spin gradient of this single-particle orbital set ...
OrbitalSetTraits< ValueType >::ValueVector ValueVector
virtual void evaluateVGL(const ParticleSet &P, int iat, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi)=0
evaluate the values, gradients and laplacians of this single-particle orbital set ...
virtual void evaluateVGL_spin(const ParticleSet &P, int iat, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi, ValueVector &dspin)
evaluate the values, gradients and laplacians and spin gradient of this single-particle orbital set ...
IndexType OrbitalSetSize
number of Single-particle orbitals
void add(std::unique_ptr< SPOSet > component)
add a sposet component to this composite sposet
std::string getXMLAttributeValue(const xmlNodePtr cur, const std::string_view name)
get the value string for attribute name if name is unfound in cur you get an empty string back this i...
void evaluateValue(const ParticleSet &P, int iat, ValueVector &psi) override
evaluate the values of this single-particle orbital set
void report()
print out component info
std::vector< ValueVector > component_laplacians
temporary storage for laplacians
void insert_columns(const MAT1 &small, MAT2 &big, int offset_c)
copy a small matrix (N, M1) to a big matrix (N, M2), M2>M1
bool putContent(T &a, xmlNodePtr cur)
replaces a's value with the first "element" in the "string" returned by XMLNodeString{cur}.
void evaluateVGL(const ParticleSet &P, int iat, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi) override
evaluate the values, gradients and laplacians of this single-particle orbital set ...
OrbitalSetTraits< ValueType >::GradVector GradVector
void evaluate_notranspose(const ParticleSet &P, int first, int last, ValueMatrix &logdet, GradMatrix &dlogdet, ValueMatrix &d2logdet) override
evaluate the values, gradients and laplacians of this single-particle orbital for [first...
std::vector< std::unique_ptr< SPOSet > > components
component SPOSets
OrbitalSetTraits< ValueType >::GradHessMatrix GGGMatrix
std::vector< GradVector > component_gradients
temporary storage for gradients
~CompositeSPOSet() override
std::unique_ptr< SPOSet > createSPOSetFromXML(xmlNodePtr cur) override
create an sposet from xml (legacy)
std::vector< ValueVector > component_spin_gradients
temporary storage for spin gradients
void not_implemented(const std::string &method)
unimplemented functions call this to abort
OrbitalSetTraits< ValueType >::HessMatrix HessMatrix
std::unique_ptr< SPOSet > createSPOSet(xmlNodePtr cur, SPOSetInputInfo &input) override
create an sposet from a general xml request