QMCPACK
SoaCuspCorrection.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) 2021 QMCPACK developers.
6 //
7 // File developed by: Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
8 //
9 // File created by: Jeongnim Kim, jeongnim.kim@intel.com, Intel Corp.
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 
13 /** @file SoaCuspCorrection.h
14  */
15 #ifndef QMCPLUSPLUS_SOA_CUSPCORRECTION_H
16 #define QMCPLUSPLUS_SOA_CUSPCORRECTION_H
17 
18 #include "Configuration.h"
20 
21 namespace qmcplusplus
22 {
23 template<typename T>
25 
26 /** A localized basis set derived from BasisSetBase<typename COT::ValueType>
27  *
28  * This class performs the evaluation of the basis functions and their
29  * derivatives for each of the N-particles in a configuration.
30  * The template parameter COT denotes Centered-Orbital-Type which provides
31  * a set of localized orbitals associated with a center.
32  */
34 {
43 
44  ///number of centers, e.g., ions
45  size_t NumCenters;
46  ///number of quantum particles
47  size_t NumTargets;
48  ///number of quantum particles
49  const int myTableIndex;
50  /** Maximal number of supported MOs
51  * this is not the AO basis because cusp correction is applied on the MO directly.
52  */
53  const size_t MaxOrbSize;
54 
55  ///COMPLEX WON'T WORK
57 
58  /** container of the unique pointers to the Atomic Orbitals
59  *
60  * size of LOBasisSet = number of centers (atoms)
61  * should use unique_ptr once COT is fixed for better performance
62  */
63  std::vector<std::shared_ptr<const COT>> LOBasisSet;
64 
66 
67 public:
68  /** constructor
69  * @param ions ionic system
70  * @param els electronic system
71  * @param norbs the number of orbitals this cusp correction may serve
72  */
73  SoaCuspCorrection(ParticleSet& ions, ParticleSet& els, size_t norbs);
74 
75  /** copy constructor */
77 
78  /** compute VGL
79  * @param P quantum particleset
80  * @param iat active particle
81  * @param vgl Matrix(5,BasisSetSize)
82  * @param trialMove if true, use getTempDists()/getTempDispls()
83  */
84  void evaluateVGL(const ParticleSet& P, int iat, VGLVector& vgl);
85 
86  void evaluate_vgl(const ParticleSet& P, int iat, ValueVector& psi, GradVector& dpsi, ValueVector& d2psi);
87 
88  void evaluate_vgl(const ParticleSet& P, int iat, int idx, ValueMatrix& psi, GradMatrix& dpsi, ValueMatrix& d2psi);
89 
90  /** compute values for the iat-paricle move
91  *
92  * Always uses getTempDists() and getTempDispls()
93  */
94  void evaluateV(const ParticleSet& P, int iat, ValueVector& psi);
95 
96  /** add a new set of Centered Atomic Orbitals
97  * @param icenter the index of the center
98  * @param aos a set of Centered Atomic Orbitals
99  */
100  void add(int icenter, std::unique_ptr<COT> aos);
101 
102  void addVGL(const ParticleSet& P, int iat, VGLVector& vgl) { evaluateVGL(P, iat, vgl); }
103  void addV(const ParticleSet& P, int iat, ValueVector& psi) { evaluateV(P, iat, psi); }
104  void add_vgl(const ParticleSet& P, int iat, int idx, ValueMatrix& vals, GradMatrix& dpsi, ValueMatrix& d2psi)
105  {
106  evaluate_vgl(P, iat, idx, vals, dpsi, d2psi);
107  }
108  void add_vector_vgl(const ParticleSet& P, int iat, ValueVector& vals, GradVector& dpsi, ValueVector& d2psi)
109  {
110  evaluate_vgl(P, iat, vals, dpsi, d2psi);
111  }
112 };
113 } // namespace qmcplusplus
114 #endif
size_t NumCenters
number of centers, e.g., ions
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
QTBase::RealType RealType
Definition: Configuration.h:58
Handles a set of correction orbitals per atom.
void addVGL(const ParticleSet &P, int iat, VGLVector &vgl)
OrbitalSetTraits< ValueType >::ValueMatrix ValueMatrix
Definition: SPOSet.h:50
void evaluate_vgl(const ParticleSet &P, int iat, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi)
SoA adaptor class for Vector<TinyVector<T,D> >
OrbitalSetTraits< ValueType >::GradMatrix GradMatrix
Definition: SPOSet.h:52
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
QTBase::ValueType ValueType
Definition: Configuration.h:60
const size_t MaxOrbSize
Maximal number of supported MOs this is not the AO basis because cusp correction is applied on the MO...
QMCTraits::ValueType ValueType
OrbitalSetTraits< ValueType >::ValueVector ValueVector
Definition: SPOSet.h:49
A localized basis set derived from BasisSetBase<typename COT::ValueType>
void evaluateV(const ParticleSet &P, int iat, ValueVector &psi)
compute values for the iat-paricle move
QTBase::PosType PosType
Definition: Configuration.h:61
void addV(const ParticleSet &P, int iat, ValueVector &psi)
void add_vgl(const ParticleSet &P, int iat, int idx, ValueMatrix &vals, GradMatrix &dpsi, ValueMatrix &d2psi)
void evaluateVGL(const ParticleSet &P, int iat, VGLVector &vgl)
compute VGL
const int myTableIndex
number of quantum particles
size_t NumTargets
number of quantum particles
OrbitalSetTraits< ValueType >::GradVector GradVector
Definition: SPOSet.h:51
void add(int icenter, std::unique_ptr< COT > aos)
add a new set of Centered Atomic Orbitals
void add_vector_vgl(const ParticleSet &P, int iat, ValueVector &vals, GradVector &dpsi, ValueVector &d2psi)
SoaCuspCorrection(ParticleSet &ions, ParticleSet &els, size_t norbs)
constructor
std::vector< std::shared_ptr< const COT > > LOBasisSet
container of the unique pointers to the Atomic Orbitals