15 #ifndef QMCPLUSPLUS_RADIALGRIDFUNCTOR_GAUSSIANTIMESRN_H 16 #define QMCPLUSPLUS_RADIALGRIDFUNCTOR_GAUSSIANTIMESRN_H 110 std::vector<BasicGaussian>
gset;
113 const char* exp_name =
"exponent",
114 const char* c_name =
"contraction",
115 const char* p_name =
"power")
123 void reset()
override;
140 typename std::vector<BasicGaussian>::iterator it(
gset.begin());
141 typename std::vector<BasicGaussian>::iterator it_end(
gset.end());
144 res += (*it).f(r, r2);
154 typename std::vector<BasicGaussian>::iterator it(
gset.begin());
155 typename std::vector<BasicGaussian>::iterator it_end(
gset.end());
158 res += (*it).df(r, r2);
168 typename std::vector<BasicGaussian>::iterator it(
gset.begin()), it_end(
gset.end());
183 typename std::vector<BasicGaussian>::iterator it(
gset.begin()), it_end(
gset.end());
186 Y += (*it).evaluate(r, rr,
dY,
d2Y);
191 bool put(xmlNodePtr cur)
override;
203 InParam.push_back(cur);
212 for (
int i = 0; i < gset.size(); i++)
218 while (
n < InParam.size())
223 for (
int i = 0; i < InParam.size(); i++)
225 T alpha(1.0), c(1.0);
228 radAttrib.
add(alpha, expName);
229 radAttrib.
add(c, coeffName);
230 radAttrib.
add(np, powerName);
231 radAttrib.
put(InParam[i]);
232 gset[i].resetGaussian(alpha, c, np + basePower);
242 basePower = std::stoi(t);
243 basePower += baseOff;
247 std::string cname((
const char*)cur->name);
248 if (cname ==
"radfunc")
real_type df(real_type r) override
evaluate the first derivative
helper functions for EinsplineSetBuilder
real_type f(real_type r) override
evaluate the value at r
bool put(xmlNodePtr cur)
assign attributes to the set
bool putBasisGroup(xmlNodePtr cur, int baseOff=0)
process cur xmlnode
Define a base class for one-dimensional functions with optimizable variables.
MakeReturn< BinaryNode< FnPow, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t, typename CreateLeaf< Vector< T2, C2 > >::Leaf_t > >::Expression_t pow(const Vector< T1, C1 > &l, const Vector< T2, C2 > &r)
void checkOutVariables(const opt_variables_type &active) override
check out variational optimizable variables
std::vector< BasicGaussian > gset
~GaussianTimesRN() override
void checkInVariablesExclusive(opt_variables_type &active) override
check in variational parameters to the global list of parameters used by the optimizer.
class to handle a set of attributes of an xmlNode
class to handle a set of variables that can be modified during optimizations
void setgrid(real_type r)
BasicGaussian(real_type sig=1.0, real_type c=1.0, int p=0)
OptimizableFunctorBase * makeClone() const override
create a clone of this object
MakeReturn< UnaryNode< FnExp, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t exp(const Vector< T1, C1 > &l)
void evaluateAll(real_type r, real_type rinv)
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...
Base class for any functor with optimizable parameters.
real_type f(real_type r, real_type rr)
void reset() override
reset function
std::vector< xmlNodePtr > InParam
real_type evaluate(real_type r, real_type rr, real_type &du, real_type &d2u)
bool put(xmlNodePtr cur) override
process xmlnode and registers variables to optimize
real_type evaluate(real_type r, real_type rinv)
real_type df(real_type r, real_type rr)
void add(PDT &aparam, const std::string &aname, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new attribute
void resetGaussian(real_type sig, real_type c, int p)
void resetParametersExclusive(const opt_variables_type &active) override
reset the parameters during optimizations.
optimize::VariableSet::real_type real_type
typedef for real values
GaussianTimesRN(const char *node_name="radfunc", const char *exp_name="exponent", const char *c_name="contraction", const char *p_name="power")
int size() const
return the number Gaussians