QMCPACK
SlaterCombo< T > Struct Template Reference
+ Collaboration diagram for SlaterCombo< T >:

Public Types

using real_type = T
 
using Component_t = GenericSTO< T >
 

Public Member Functions

 SlaterCombo (int l=0, bool normalized=true, const char *node_name="radfunc", const char *exp_name="exponent", const char *c_name="contraction")
 
real_type f (real_type r)
 
real_type df (real_type r)
 
real_type evaluate (real_type r, real_type rinv)
 
void evaluateAll (real_type r, real_type rinv)
 
void evaluateWithThirdDeriv (real_type r, real_type rinv)
 
bool putBasisGroup (xmlNodePtr cur)
 
bool putBasisGroupH5 (hdf_archive &hin, Communicate &myComm)
 

Public Attributes

int L
 
bool Normalized
 
std::string nodeName
 
std::string expName
 
std::string coeffName
 
std::vector< xmlNodePtr > InParam
 
std::vector< Component_tsset
 
real_type Y
 
real_type dY
 
real_type d2Y
 
real_type d3Y
 

Detailed Description

template<class T>
struct qmcplusplus::SlaterCombo< T >

Definition at line 24 of file SlaterBasisSet.h.

Member Typedef Documentation

◆ Component_t

using Component_t = GenericSTO<T>

Definition at line 28 of file SlaterBasisSet.h.

◆ real_type

using real_type = T

Definition at line 27 of file SlaterBasisSet.h.

Constructor & Destructor Documentation

◆ SlaterCombo()

SlaterCombo ( int  l = 0,
bool  normalized = true,
const char *  node_name = "radfunc",
const char *  exp_name = "exponent",
const char *  c_name = "contraction" 
)
explicit

Definition at line 129 of file SlaterBasisSet.h.

130  : L(l), Normalized(normalized), nodeName(node_name), expName(exp_name), coeffName(c_name)
131 {}

Member Function Documentation

◆ df()

real_type df ( real_type  r)
inline

Definition at line 59 of file SlaterBasisSet.h.

References SlaterCombo< T >::sset.

60  {
61  real_type res = 0;
62  typename std::vector<Component_t>::iterator it(sset.begin());
63  typename std::vector<Component_t>::iterator it_end(sset.end());
64  while (it != it_end)
65  {
66  res += (*it).df(r);
67  ++it;
68  }
69  return res;
70  }
std::vector< Component_t > sset
OHMMS_PRECISION real_type

◆ evaluate()

real_type evaluate ( real_type  r,
real_type  rinv 
)
inline

Definition at line 72 of file SlaterBasisSet.h.

References SlaterCombo< T >::d2Y, SlaterCombo< T >::dY, SlaterCombo< T >::sset, and SlaterCombo< T >::Y.

73  {
74  Y = 0.0;
75  dY = 0.0;
76  d2Y = 0.0;
77  typename std::vector<Component_t>::iterator it(sset.begin()), it_end(sset.end());
78  while (it != it_end)
79  {
80  Y += (*it).evaluate(r, rinv);
81  ++it;
82  }
83  return Y;
84  }
std::vector< Component_t > sset

◆ evaluateAll()

void evaluateAll ( real_type  r,
real_type  rinv 
)
inline

Definition at line 86 of file SlaterBasisSet.h.

References SlaterCombo< T >::d2Y, SlaterCombo< T >::dY, SlaterCombo< T >::sset, and SlaterCombo< T >::Y.

87  {
88  Y = 0.0;
89  dY = 0.0;
90  d2Y = 0.0;
91  real_type du, d2u;
92  typename std::vector<Component_t>::iterator it(sset.begin()), it_end(sset.end());
93  while (it != it_end)
94  {
95  Y += (*it).evaluate(r, rinv, du, d2u);
96  dY += du;
97  d2Y += d2u;
98  ++it;
99  }
100  }
std::vector< Component_t > sset
OHMMS_PRECISION real_type

◆ evaluateWithThirdDeriv()

void evaluateWithThirdDeriv ( real_type  r,
real_type  rinv 
)
inline

Definition at line 102 of file SlaterBasisSet.h.

References SlaterCombo< T >::d2Y, SlaterCombo< T >::d3Y, SlaterCombo< T >::dY, SlaterCombo< T >::sset, and SlaterCombo< T >::Y.

103  {
104  Y = 0.0;
105  dY = 0.0;
106  d2Y = 0.0;
107  d3Y = 0.0;
108  real_type du, d2u, d3u;
109  typename std::vector<Component_t>::iterator it(sset.begin()), it_end(sset.end());
110  while (it != it_end)
111  {
112  Y += (*it).evaluate(r, rinv, du, d2u, d3u);
113  dY += du;
114  d2Y += d2u;
115  d3Y += d3u;
116  ++it;
117  }
118  }
std::vector< Component_t > sset
OHMMS_PRECISION real_type

◆ f()

real_type f ( real_type  r)
inline

Definition at line 46 of file SlaterBasisSet.h.

References SlaterCombo< T >::sset.

47  {
48  real_type res = 0;
49  typename std::vector<Component_t>::iterator it(sset.begin());
50  typename std::vector<Component_t>::iterator it_end(sset.end());
51  while (it != it_end)
52  {
53  res += (*it).f(r);
54  ++it;
55  }
56  return res;
57  }
std::vector< Component_t > sset
OHMMS_PRECISION real_type

◆ putBasisGroup()

bool putBasisGroup ( xmlNodePtr  cur)

Definition at line 134 of file SlaterBasisSet.h.

References OhmmsAttributeSet::add(), LOGMSG, and OhmmsAttributeSet::put().

Referenced by RadialOrbitalSetBuilder< COT >::addSlater().

135 {
136  cur = cur->children;
137  while (cur != NULL)
138  {
139  std::string cname((const char*)cur->name);
140  if (cname == "radfunc" || cname == "Rnl")
141  {
142  real_type zeta(1.0), c(1.0);
143  int qN = 1;
144  OhmmsAttributeSet radAttrib;
145  radAttrib.add(zeta, expName);
146  radAttrib.add(zeta, "alpha");
147  radAttrib.add(c, coeffName);
148  radAttrib.add(zeta, "c");
149  radAttrib.add(qN, "node");
150  radAttrib.add(qN, "n");
151  radAttrib.put(cur);
152  if (Normalized)
153  {
154  //z is not right
155  sset.push_back(Component_t(qN - 1, zeta, c));
156  LOGMSG(" Slater Component (n,zeta,c)= " << qN - 1 << " " << zeta << " " << c)
157  }
158  else
159  {
160  STONorm<T> anorm(qN);
161  //multiply a normalization factor to the contraction factor
162  //anorm(n,\zeta) = 1/\sqrt((2n+2)!/(2*\zeta)^{2*n+3))
163  c *= anorm(qN - 1, zeta);
164  sset.push_back(Component_t(qN - L - 1, zeta, c));
165  LOGMSG(" Slater Component (n,zeta,c)= " << qN << " " << zeta << " " << c)
166  }
167  }
168  cur = cur->next;
169  }
170  //reset();
171  return true;
172 }
bool put(xmlNodePtr cur)
assign attributes to the set
Definition: AttributeSet.h:55
class to handle a set of attributes of an xmlNode
Definition: AttributeSet.h:24
GenericSTO< T > Component_t
std::vector< Component_t > sset
OHMMS_PRECISION real_type
void add(PDT &aparam, const std::string &aname, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new attribute
Definition: AttributeSet.h:42
class to evaluate the normalization factors for the Slater-Type orbitals
#define LOGMSG(msg)
Definition: OutputManager.h:82

◆ putBasisGroupH5()

bool putBasisGroupH5 ( hdf_archive hin,
Communicate myComm 
)
inline

Definition at line 121 of file SlaterBasisSet.h.

References APP_ABORT.

122  {
123  APP_ABORT(" Error: Slater Orbitals with HDF5 not implemented. Please contact developers. Aborting.\n");
124  return true;
125  }
#define APP_ABORT(msg)
Widely used but deprecated fatal error macros from legacy code.
Definition: AppAbort.h:27

Member Data Documentation

◆ coeffName

std::string coeffName

Definition at line 35 of file SlaterBasisSet.h.

◆ d2Y

◆ d3Y

real_type d3Y

Definition at line 38 of file SlaterBasisSet.h.

Referenced by SlaterCombo< T >::evaluateWithThirdDeriv().

◆ dY

◆ expName

std::string expName

Definition at line 34 of file SlaterBasisSet.h.

◆ InParam

std::vector<xmlNodePtr> InParam

Definition at line 36 of file SlaterBasisSet.h.

◆ L

int L

Definition at line 30 of file SlaterBasisSet.h.

◆ nodeName

std::string nodeName

Definition at line 33 of file SlaterBasisSet.h.

◆ Normalized

bool Normalized

Definition at line 31 of file SlaterBasisSet.h.

◆ sset

◆ Y


The documentation for this struct was generated from the following file: