QMCPACK
ConstantOrbital.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) 2016 Jeongnim Kim and QMCPACK developers.
6 //
7 // File developed by: Mark Dewing, markdewing@gmail.com, University of Illinois at Urbana-Champaign
8 //
9 // File created by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 
13 #ifndef QMCPLUSPLUS_CONSTANTORBITAL_H
14 #define QMCPLUSPLUS_CONSTANTORBITAL_H
15 
17 
18 namespace qmcplusplus
19 {
21 {
22 public:
24 
26 
27  std::string getClassName() const override { return "ConstantOrbital"; }
28 
32  {
33  G = 0.0;
34  L = 0.0;
35  return 0.0;
36  }
37 
38  void acceptMove(ParticleSet& P, int iat, bool safe_to_delay = false) override {}
39 
40  void restore(int iat) override {}
41 
42  PsiValue ratio(ParticleSet& P, int iat) override { return 1.0; }
43 
44  GradType evalGrad(ParticleSet& P, int iat) override { return GradType(0.0); }
45 
46  PsiValue ratioGrad(ParticleSet& P, int iat, GradType& grad_iat) override { return FakeGradRatio; }
47 
48  void registerData(ParticleSet& P, WFBufferType& buf) override {}
49 
50  LogValue updateBuffer(ParticleSet& P, WFBufferType& buf, bool fromscratch = false) override { return 0.0; }
51 
52  void copyFromBuffer(ParticleSet& P, WFBufferType& buf) override {}
53 
54  std::unique_ptr<WaveFunctionComponent> makeClone(ParticleSet& tpq) const override
55  {
56  return std::make_unique<ConstantOrbital>();
57  }
58 
60  const opt_variables_type& optvars,
61  Vector<ValueType>& dlogpsi,
62  Vector<ValueType>& dhpsioverpsi) override
63  {}
64 };
65 
66 
67 } // namespace qmcplusplus
68 #endif
Fixed-size array.
Definition: OhmmsTinyMeta.h:30
void registerData(ParticleSet &P, WFBufferType &buf) override
For particle-by-particle move.
void restore(int iat) override
If a move for iat-th particle is rejected, restore to the content.
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
QTBase::GradType GradType
Definition: Configuration.h:62
std::unique_ptr< WaveFunctionComponent > makeClone(ParticleSet &tpq) const override
make clone
Attaches a unit to a Vector for IO.
std::string getClassName() const override
return class name
std::complex< QTFull::RealType > LogValue
An abstract class for a component of a many-body trial wave function.
void evaluateDerivatives(ParticleSet &P, const opt_variables_type &optvars, Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi) override
Compute the derivatives of both the log of the wavefunction and kinetic energy with respect to optimi...
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
class to handle a set of variables that can be modified during optimizations
Definition: VariableSet.h:49
LogValue updateBuffer(ParticleSet &P, WFBufferType &buf, bool fromscratch=false) override
For particle-by-particle move.
PsiValue ratioGrad(ParticleSet &P, int iat, GradType &grad_iat) override
evaluate the ratio of the new to old WaveFunctionComponent value and the new gradient ...
PsiValue ratio(ParticleSet &P, int iat) override
evaluate the ratio of the new to old WaveFunctionComponent value
LogValue evaluateLog(const ParticleSet &P, ParticleSet::ParticleGradient &G, ParticleSet::ParticleLaplacian &L) override
evaluate the value of the WaveFunctionComponent from scratch
Declaration of WaveFunctionComponent.
void acceptMove(ParticleSet &P, int iat, bool safe_to_delay=false) override
a move for iat-th particle is accepted.
void copyFromBuffer(ParticleSet &P, WFBufferType &buf) override
For particle-by-particle move.
GradType evalGrad(ParticleSet &P, int iat) override
return the current gradient for the iat-th particle