QMCPACK
CuspCorrection.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2018 Jeongnim Kim and QMCPACK developers.
6 //
7 // File developed by: Miguel Morales, moralessilva2@llnl.gov, Lawrence Livermore National Laboratory
8 // Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
9 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
10 // Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
11 //
12 // File created by: Miguel Morales, moralessilva2@llnl.gov, Lawrence Livermore National Laboratory
13 //////////////////////////////////////////////////////////////////////////////////////
14 
15 
16 /** @file CuspCorrection.h
17  * @brief Corrections to electron-nucleus cusp for all-electron molecular calculations.
18  */
19 
20 #ifndef QMCPLUSPLUS_CUSPCORRECTION_H
21 #define QMCPLUSPLUS_CUSPCORRECTION_H
22 
23 #include <cmath>
24 #include "Configuration.h"
25 
26 namespace qmcplusplus
27 {
28 /**
29  * @brief Cusp correction parameters
30  *
31  * From "Scheme for adding electron-nuclear cusps to Gaussian orbitals" Ma, Towler, Drummond, and Needs
32  * JCP 122, 224322 (2005)
33  *
34  * Equations 7 and 8 in the paper define the correction. These are the parameters in those equations.
35  */
36 
38 {
41 
42  /// The cutoff radius
44 
45  /// A shift to keep correction to a single sign
47 
48  /// The sign of the wavefunction at the nucleus
50 
51  /// The coefficients of the polynomial \f$p(r)\f$ in Eq 8
53 
54  /// Flag to indicate the correction should be recalculated
55  int redo;
56 
57  CuspCorrectionParameters() : Rc(0.0), C(0.0), sg(1.0), alpha(0.0), redo(0) {}
58 };
59 
60 /// Formulas for applying the cusp correction
61 
63 {
65 
66 public:
67  inline RealType Rr(RealType r) const { return cparam.sg * std::exp(pr(r)); }
68 
69  inline RealType pr(RealType r) const
70  {
71  auto& alpha = cparam.alpha;
72  return alpha[0] + alpha[1] * r + alpha[2] * r * r + alpha[3] * r * r * r + alpha[4] * r * r * r * r;
73  }
74 
75  inline RealType dpr(RealType r) const
76  {
77  auto& alpha = cparam.alpha;
78  return alpha[1] + 2.0 * alpha[2] * r + 3.0 * alpha[3] * r * r + 4.0 * alpha[4] * r * r * r;
79  }
80 
81  inline RealType d2pr(RealType r) const
82  {
83  auto& alpha = cparam.alpha;
84  return 2.0 * alpha[2] + 6.0 * alpha[3] * r + 12.0 * alpha[4] * r * r;
85  }
86 
88 
90 };
91 } // namespace qmcplusplus
92 
93 #endif
TinyVector< ValueType, 5 > alpha
The coefficients of the polynomial in Eq 8.
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
QTBase::RealType RealType
Definition: Configuration.h:58
RealType dpr(RealType r) const
Cusp correction parameters.
QMCTraits::RealType RealType
RealType sg
The sign of the wavefunction at the nucleus.
CuspCorrectionParameters cparam
RealType Rc
The cutoff radius.
RealType Rr(RealType r) const
int redo
Flag to indicate the correction should be recalculated.
RealType d2pr(RealType r) const
CuspCorrection(const CuspCorrectionParameters &param)
QTBase::ValueType ValueType
Definition: Configuration.h:60
Formulas for applying the cusp correction.
MakeReturn< UnaryNode< FnExp, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t exp(const Vector< T1, C1 > &l)
RealType C
A shift to keep correction to a single sign.
RealType pr(RealType r) const