QMCPACK
LCAOrbitalSetWithCorrection.cpp
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: Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
8 //
9 // File created by: Jeongnim Kim, jeongnim.kim@intel.com, Intel Corp.
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 
14 
15 namespace qmcplusplus
16 {
18  std::unique_ptr<basis_type>&& bs,
19  size_t norbs,
20  bool identity,
21  ParticleSet& ions,
22  ParticleSet& els)
23  : SPOSet(my_name), lcao(my_name + "_modified", std::move(bs), norbs, identity, false), cusp(ions, els, norbs)
24 {
25  OrbitalSetSize = norbs;
26 }
27 
29 {
30  throw std::runtime_error("LCAOrbitalSetWithCorrection::setOrbitalSetSize should not be called");
31 }
32 
33 
34 std::unique_ptr<SPOSet> LCAOrbitalSetWithCorrection::makeClone() const
35 {
36  return std::make_unique<LCAOrbitalSetWithCorrection>(*this);
37 }
38 
40 {
41  lcao.evaluateValue(P, iat, psi);
42  cusp.addV(P, iat, psi);
43 }
44 
46  int iat,
47  ValueVector& psi,
48  GradVector& dpsi,
49  ValueVector& d2psi)
50 {
51  lcao.evaluateVGL(P, iat, psi, dpsi, d2psi);
52  cusp.add_vector_vgl(P, iat, psi, dpsi, d2psi);
53 }
54 
56  int first,
57  int last,
58  ValueMatrix& logdet,
59  GradMatrix& dlogdet,
60  ValueMatrix& d2logdet)
61 {
62  lcao.evaluate_notranspose(P, first, last, logdet, dlogdet, d2logdet);
63  for (size_t i = 0, iat = first; iat < last; i++, iat++)
64  cusp.add_vgl(P, iat, i, logdet, dlogdet, d2logdet);
65 }
66 
67 } // namespace qmcplusplus
base class for Single-particle orbital sets
Definition: SPOSet.h:46
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
void setOrbitalSetSize(int norbs) final
set the OrbitalSetSize
OrbitalSetTraits< ValueType >::ValueMatrix ValueMatrix
Definition: SPOSet.h:50
void evaluateVGL(const ParticleSet &P, int iat, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi) final
evaluate the values, gradients and laplacians of this single-particle orbital set ...
OrbitalSetTraits< ValueType >::GradMatrix GradMatrix
Definition: SPOSet.h:52
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
void evaluateValue(const ParticleSet &P, int iat, ValueVector &psi) final
evaluate the values of this single-particle orbital set
void evaluate_notranspose(const ParticleSet &P, int first, int last, ValueMatrix &logdet, GradMatrix &dlogdet, ValueMatrix &d2logdet) final
evaluate the values, gradients and laplacians of this single-particle orbital for [first...
OrbitalSetTraits< ValueType >::ValueVector ValueVector
Definition: SPOSet.h:49
void evaluateValue(const ParticleSet &P, int iat, ValueVector &psi) final
evaluate the values of this single-particle orbital set
IndexType OrbitalSetSize
number of Single-particle orbitals
Definition: SPOSet.h:566
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)
OrbitalSetTraits< ValueType >::GradVector GradVector
Definition: SPOSet.h:51
LCAOrbitalSetWithCorrection(const std::string &my_name, std::unique_ptr< basis_type > &&bs, size_t norbs, bool identity, ParticleSet &ions, ParticleSet &els)
constructor
std::unique_ptr< SPOSet > makeClone() const final
make a clone of itself every derived class must implement this to have threading working correctly...
void add_vector_vgl(const ParticleSet &P, int iat, ValueVector &vals, GradVector &dpsi, ValueVector &d2psi)
void evaluate_notranspose(const ParticleSet &P, int first, int last, ValueMatrix &logdet, GradMatrix &dlogdet, ValueMatrix &d2logdet) final
evaluate the values, gradients and laplacians of this single-particle orbital for [first...
void evaluateVGL(const ParticleSet &P, int iat, ValueVector &psi, GradVector &dpsi, ValueVector &d2psi) final
evaluate the values, gradients and laplacians of this single-particle orbital set ...