QMCPACK
GenericSTO< T > Struct Template Reference

Generic Slater-Type Orbital. More...

+ Collaboration diagram for GenericSTO< T >:

Public Types

using real_type = T
 

Public Member Functions

 GenericSTO ()
 
 GenericSTO (int power, real_type z, real_type norm)
 constructor with a known contraction factor More...
 
 GenericSTO (int n, int l, real_type z)
 constructor with a set of quantum numbers More...
 
void reset ()
 
void setgrid (real_type r)
 
real_type f (real_type r)
 
real_type df (real_type r)
 
real_type evaluate (real_type r, real_type rinv)
 return the value only More...
 
void evaluateAll (real_type r, real_type rinv)
 
real_type evaluate (real_type r, real_type rinv, real_type &drnl, real_type &d2rnl)
 
real_type evaluate (real_type r, real_type rinv, real_type &drnl, real_type &d2rnl, real_type &d3rnl)
 

Public Attributes

int ID
 
int N
 Principal number. More...
 
int Power
 N-l-1. More...
 
real_type Z
 
real_type Norm
 
real_type Y
 
real_type dY
 
real_type d2Y
 
real_type d3Y
 

Detailed Description

template<class T>
struct GenericSTO< T >

Generic Slater-Type Orbital.

This class evalaute $ \frac{\chi_{n,\xi}(r)}{r^l} $ where a normalized STO is defined as $\chi_{n,\xi}(r) = C r^{n-1} \exp{-\xi r}$ C is a contraction factor. The physical principal quantum number n has to be a positive integer, where n-1 is the number of nodes.

Definition at line 57 of file SlaterTypeOrbital.h.

Member Typedef Documentation

◆ real_type

using real_type = T

Definition at line 60 of file SlaterTypeOrbital.h.

Constructor & Destructor Documentation

◆ GenericSTO() [1/3]

GenericSTO ( )
inline

Definition at line 71 of file SlaterTypeOrbital.h.

71 : N(-1), Power(0), Z(1.0), Norm(1.0) {}
int Power
N-l-1.
real_type Norm
int N
Principal number.

◆ GenericSTO() [2/3]

GenericSTO ( int  power,
real_type  z,
real_type  norm 
)
inlineexplicit

constructor with a known contraction factor

Definition at line 75 of file SlaterTypeOrbital.h.

75 : N(-1), Power(power), Z(z), Norm(norm) {}
int Power
N-l-1.
double norm(const zVec &c)
Definition: VectorOps.h:118
real_type Norm
int N
Principal number.

◆ GenericSTO() [3/3]

GenericSTO ( int  n,
int  l,
real_type  z 
)
inlineexplicit

constructor with a set of quantum numbers

Parameters
nprincipal quantum number
langular quantum number
zexponent

Power = n-l-1 Contraction factor is the normalization factor evaluated based on N and Z.

Definition at line 85 of file SlaterTypeOrbital.h.

References GenericSTO< T >::reset().

85 : N(n), Power(n - l - 1), Z(z) { reset(); }
int Power
N-l-1.
int N
Principal number.

Member Function Documentation

◆ df()

real_type df ( real_type  r)
inline

Definition at line 100 of file SlaterTypeOrbital.h.

References qmcplusplus::exp(), GenericSTO< T >::Norm, qmcplusplus::pow(), GenericSTO< T >::Power, and GenericSTO< T >::Z.

101  {
102  real_type rnl = exp(-Z * r) * Norm;
103  if (Power == 0)
104  {
105  return -Z * rnl;
106  }
107  else
108  {
109  return rnl * pow(r, Power) * (Power / r - Z);
110  }
111  }
int Power
N-l-1.
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)
MakeReturn< UnaryNode< FnExp, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t exp(const Vector< T1, C1 > &l)
OHMMS_PRECISION real_type
real_type Norm

◆ evaluate() [1/3]

real_type evaluate ( real_type  r,
real_type  rinv 
)
inline

return the value only

Parameters
rdistance
rinvinverse of r

Definition at line 117 of file SlaterTypeOrbital.h.

References qmcplusplus::exp(), GenericSTO< T >::Norm, qmcplusplus::pow(), GenericSTO< T >::Power, GenericSTO< T >::Y, and GenericSTO< T >::Z.

Referenced by GenericSTO< T >::evaluateAll().

117 { return Y = Norm * pow(r, Power) * exp(-Z * r); }
int Power
N-l-1.
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)
MakeReturn< UnaryNode< FnExp, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t exp(const Vector< T1, C1 > &l)
real_type Norm

◆ evaluate() [2/3]

real_type evaluate ( real_type  r,
real_type  rinv,
real_type drnl,
real_type d2rnl 
)
inline

Definition at line 121 of file SlaterTypeOrbital.h.

References qmcplusplus::exp(), GenericSTO< T >::Norm, qmcplusplus::pow(), GenericSTO< T >::Power, and GenericSTO< T >::Z.

122  {
123  real_type rnl = Norm * exp(-Z * r);
124  if (Power == 0)
125  {
126  drnl = -Z * rnl;
127  d2rnl = rnl * Z * Z;
128  }
129  else
130  {
131  rnl *= pow(r, Power);
132  real_type x = Power * rinv - Z;
133  drnl = rnl * x;
134  d2rnl = rnl * (x * x - Power * rinv * rinv);
135  }
136  return rnl;
137  }
int Power
N-l-1.
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)
MakeReturn< UnaryNode< FnExp, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t exp(const Vector< T1, C1 > &l)
OHMMS_PRECISION real_type
real_type Norm

◆ evaluate() [3/3]

real_type evaluate ( real_type  r,
real_type  rinv,
real_type drnl,
real_type d2rnl,
real_type d3rnl 
)
inline

Definition at line 139 of file SlaterTypeOrbital.h.

References qmcplusplus::exp(), GenericSTO< T >::Norm, qmcplusplus::pow(), GenericSTO< T >::Power, and GenericSTO< T >::Z.

140  {
141  real_type rnl = Norm * exp(-Z * r);
142  if (Power == 0)
143  {
144  drnl = -Z * rnl;
145  d2rnl = rnl * Z * Z;
146  d3rnl = -d2rnl * Z;
147  }
148  else
149  {
150  rnl *= pow(r, Power);
151  real_type x = Power * rinv - Z;
152  drnl = rnl * x;
153  d2rnl = rnl * (x * x - Power * rinv * rinv);
154  d3rnl = rnl * (x * x * x + (2.0 * rinv - 3.0 * x) * Power * rinv * rinv);
155  }
156  return rnl;
157  }
int Power
N-l-1.
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)
MakeReturn< UnaryNode< FnExp, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t exp(const Vector< T1, C1 > &l)
OHMMS_PRECISION real_type
real_type Norm

◆ evaluateAll()

void evaluateAll ( real_type  r,
real_type  rinv 
)
inline

Definition at line 119 of file SlaterTypeOrbital.h.

References GenericSTO< T >::d2Y, GenericSTO< T >::dY, GenericSTO< T >::evaluate(), and GenericSTO< T >::Y.

119 { Y = evaluate(r, rinv, dY, d2Y); }
real_type evaluate(real_type r, real_type rinv)
return the value only
real_type dY
real_type d2Y

◆ f()

real_type f ( real_type  r)
inline

Definition at line 98 of file SlaterTypeOrbital.h.

References qmcplusplus::exp(), GenericSTO< T >::Norm, qmcplusplus::pow(), GenericSTO< T >::Power, and GenericSTO< T >::Z.

98 { return exp(-Z * r) * Norm * pow(r, Power); }
int Power
N-l-1.
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)
MakeReturn< UnaryNode< FnExp, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t exp(const Vector< T1, C1 > &l)
real_type Norm

◆ reset()

void reset ( )
inline

Definition at line 87 of file SlaterTypeOrbital.h.

References GenericSTO< T >::N, GenericSTO< T >::Norm, and GenericSTO< T >::Z.

Referenced by GenericSTO< T >::GenericSTO().

88  {
89  if (N > 0)
90  {
91  STONorm<T> anorm(N);
92  Norm = anorm(N - 1, Z);
93  }
94  }
real_type Norm
int N
Principal number.
class to evaluate the normalization factors for the Slater-Type orbitals

◆ setgrid()

void setgrid ( real_type  r)
inline

Definition at line 96 of file SlaterTypeOrbital.h.

96 {}

Member Data Documentation

◆ d2Y

real_type d2Y

Definition at line 69 of file SlaterTypeOrbital.h.

Referenced by GenericSTO< T >::evaluateAll().

◆ d3Y

real_type d3Y

Definition at line 69 of file SlaterTypeOrbital.h.

◆ dY

Definition at line 69 of file SlaterTypeOrbital.h.

Referenced by GenericSTO< T >::evaluateAll().

◆ ID

int ID

Definition at line 62 of file SlaterTypeOrbital.h.

◆ N

int N

Principal number.

Definition at line 64 of file SlaterTypeOrbital.h.

Referenced by GenericSTO< T >::reset().

◆ Norm

◆ Power

int Power

N-l-1.

Definition at line 66 of file SlaterTypeOrbital.h.

Referenced by GenericSTO< T >::df(), GenericSTO< T >::evaluate(), and GenericSTO< T >::f().

◆ Y

◆ Z


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