QMCPACK
BackflowFunctionBase Class Referenceabstract

Base class for backflow transformations. More...

+ Inheritance diagram for BackflowFunctionBase:
+ Collaboration diagram for BackflowFunctionBase:

Public Types

enum  { DIM = OHMMS_DIM }
 
enum  {
  ORB_PBYP_RATIO, ORB_PBYP_ALL, ORB_PBYP_PARTIAL, ORB_WALKER,
  ORB_ALLWALKER
}
 enum for a update mode More...
 
using Walker_t = ParticleSet::Walker_t
 
using WFBufferType = Walker_t::WFBuffer_t
 
using RealType = OHMMS_PRECISION
 
using IndexType = int
 
using PosType = TinyVector< RealType, DIM >
 
using GradType = TinyVector< RealType, DIM >
 
using HessType = Tensor< RealType, DIM >
 
using IndexVector = Vector< IndexType >
 
using GradVector = Vector< GradType >
 
using GradMatrix = Matrix< GradType >
 
using HessVector = Vector< HessType >
 
using HessMatrix = Matrix< HessType >
 
using HessArray = Array< HessType, 3 >
 

Public Member Functions

 BackflowFunctionBase (ParticleSet &ions, ParticleSet &els)
 
void resize (int NT, int NC)
 
virtual std::unique_ptr< BackflowFunctionBase > makeClone (ParticleSet &tqp) const =0
 
virtual ~BackflowFunctionBase ()
 
virtual void acceptMove (int iat, int UpdateType)=0
 
virtual void restore (int iat, int UpdateType)=0
 
virtual void reportStatus (std::ostream &os)=0
 
virtual void resetParameters (const opt_variables_type &active)=0
 
virtual void checkInVariables (opt_variables_type &active)=0
 
virtual void checkOutVariables (const opt_variables_type &active)=0
 
virtual bool isOptimizable ()=0
 
virtual int indexOffset ()=0
 
int setParamIndex (int n)
 
virtual void registerData (WFBufferType &buf)=0
 
void updateBuffer (WFBufferType &buf)
 
void copyFromBuffer (WFBufferType &buf)
 
virtual void evaluate (const ParticleSet &P, ParticleSet &QP)=0
 calculate quasi-particle coordinates only More...
 
virtual void evaluate (const ParticleSet &P, ParticleSet &QP, GradMatrix &Bmat, HessMatrix &Amat)=0
 calculate quasi-particle coordinates, Bmat and Amat More...
 
virtual void evaluatePbyP (const ParticleSet &P, ParticleSet::ParticlePos &newQP, const std::vector< int > &index)=0
 calculate quasi-particle coordinates after pbyp move More...
 
virtual void evaluatePbyP (const ParticleSet &P, ParticleSet::ParticlePos &newQP, const std::vector< int > &index, HessMatrix &Amat)=0
 calculate quasi-particle coordinates and Amat after pbyp move More...
 
virtual void evaluatePbyP (const ParticleSet &P, ParticleSet::ParticlePos &newQP, const std::vector< int > &index, GradMatrix &Bmat, HessMatrix &Amat)=0
 calculate quasi-particle coordinates, Bmat and Amat after pbyp move More...
 
virtual void evaluatePbyP (const ParticleSet &P, int iat, ParticleSet::ParticlePos &newQP)=0
 calculate quasi-particle coordinates after pbyp move More...
 
virtual void evaluatePbyP (const ParticleSet &P, int iat, ParticleSet::ParticlePos &newQP, HessMatrix &Amat)=0
 calculate quasi-particle coordinates and Amat after pbyp move More...
 
virtual void evaluatePbyP (const ParticleSet &P, int iat, ParticleSet::ParticlePos &newQP, GradMatrix &Bmat, HessMatrix &Amat)=0
 calculate quasi-particle coordinates, Bmat and Amat after pbyp move More...
 
virtual void evaluateBmatOnly (const ParticleSet &P, GradMatrix &Bmat_full)=0
 calculate only Bmat This is used in pbyp moves, in updateBuffer() More...
 
virtual void evaluateWithDerivatives (const ParticleSet &P, ParticleSet &QP, GradMatrix &Bmat, HessMatrix &Amat, GradMatrix &Cmat, GradMatrix &Ymat, HessArray &Xmat)=0
 calculate quasi-particle coordinates, Bmat and Amat calculate derivatives wrt to variational parameters More...
 

Public Attributes

ParticleSet & CenterSys
 Reference to the center. More...
 
int NumCenters
 number of centers, e.g., ions More...
 
int NumTargets
 number of quantum particles More...
 
int numParams
 
int indexOfFirstParam
 
std::vector< TinyVector< RealType, 3 > > derivs
 
Matrix< PosType > UIJ
 
Vector< PosType > UIJ_temp
 
HessMatrix AIJ
 
HessVector AIJ_temp
 
GradMatrix BIJ
 
GradVector BIJ_temp
 
RealType * FirstOfU
 
RealType * LastOfU
 
RealType * FirstOfA
 
RealType * LastOfA
 
RealType * FirstOfB
 
RealType * LastOfB
 
bool uniqueFunctions
 
opt_variables_type myVars
 

Detailed Description

Base class for backflow transformations.

FT is an optimizable functor class that implements the radial function Any class used for Jastrow functions should work

Definition at line 30 of file BackflowFunctionBase.h.

Member Typedef Documentation

◆ GradMatrix

Definition at line 48 of file BackflowFunctionBase.h.

◆ GradType

Definition at line 44 of file BackflowFunctionBase.h.

◆ GradVector

Definition at line 47 of file BackflowFunctionBase.h.

◆ HessArray

using HessArray = Array<HessType, 3>

Definition at line 52 of file BackflowFunctionBase.h.

◆ HessMatrix

Definition at line 50 of file BackflowFunctionBase.h.

◆ HessType

Definition at line 45 of file BackflowFunctionBase.h.

◆ HessVector

Definition at line 49 of file BackflowFunctionBase.h.

◆ IndexType

using IndexType = int

Definition at line 42 of file BackflowFunctionBase.h.

◆ IndexVector

Definition at line 46 of file BackflowFunctionBase.h.

◆ PosType

Definition at line 43 of file BackflowFunctionBase.h.

◆ RealType

Definition at line 41 of file BackflowFunctionBase.h.

◆ Walker_t

Definition at line 33 of file BackflowFunctionBase.h.

◆ WFBufferType

Definition at line 34 of file BackflowFunctionBase.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
DIM 

Definition at line 37 of file BackflowFunctionBase.h.

38  {
39  DIM = OHMMS_DIM
40  };
#define OHMMS_DIM
Definition: config.h:64

◆ anonymous enum

anonymous enum

enum for a update mode

Enumerator
ORB_PBYP_RATIO 

particle-by-particle ratio only

ORB_PBYP_ALL 

particle-by-particle, update Value-Gradient-Laplacian

ORB_PBYP_PARTIAL 

particle-by-particle, update Value and Grdient

ORB_WALKER 

walker update

ORB_ALLWALKER 

all walkers update

Definition at line 57 of file BackflowFunctionBase.h.

58  {
59  ORB_PBYP_RATIO, /*!< particle-by-particle ratio only */
60  ORB_PBYP_ALL, /*!< particle-by-particle, update Value-Gradient-Laplacian */
61  ORB_PBYP_PARTIAL, /*!< particle-by-particle, update Value and Grdient */
62  ORB_WALKER, /*!< walker update */
63  ORB_ALLWALKER /*!< all walkers update */
64  };

Constructor & Destructor Documentation

◆ BackflowFunctionBase()

◆ ~BackflowFunctionBase()

virtual ~BackflowFunctionBase ( )
inlinevirtual

Definition at line 124 of file BackflowFunctionBase.h.

124 {};

Member Function Documentation

◆ acceptMove()

virtual void acceptMove ( int  iat,
int  UpdateType 
)
pure virtual

◆ checkInVariables()

virtual void checkInVariables ( opt_variables_type &  active)
pure virtual

◆ checkOutVariables()

virtual void checkOutVariables ( const opt_variables_type &  active)
pure virtual

◆ copyFromBuffer()

◆ evaluate() [1/2]

virtual void evaluate ( const ParticleSet &  P,
ParticleSet &  QP 
)
pure virtual

calculate quasi-particle coordinates only

Implemented in Backflow_ee_kSpace, Backflow_eI_spin< FT >, Backflow_ee< FT >, and Backflow_eI< FT >.

◆ evaluate() [2/2]

virtual void evaluate ( const ParticleSet &  P,
ParticleSet &  QP,
GradMatrix &  Bmat,
HessMatrix &  Amat 
)
pure virtual

calculate quasi-particle coordinates, Bmat and Amat

Implemented in Backflow_eI_spin< FT >, Backflow_ee< FT >, Backflow_ee_kSpace, and Backflow_eI< FT >.

◆ evaluateBmatOnly()

virtual void evaluateBmatOnly ( const ParticleSet &  P,
GradMatrix &  Bmat_full 
)
pure virtual

calculate only Bmat This is used in pbyp moves, in updateBuffer()

Implemented in Backflow_ee< FT >, Backflow_eI_spin< FT >, Backflow_eI< FT >, and Backflow_ee_kSpace.

◆ evaluatePbyP() [1/6]

virtual void evaluatePbyP ( const ParticleSet &  P,
ParticleSet::ParticlePos &  newQP,
const std::vector< int > &  index 
)
pure virtual

calculate quasi-particle coordinates after pbyp move

Implemented in Backflow_eI_spin< FT >, Backflow_ee< FT >, Backflow_ee_kSpace, and Backflow_eI< FT >.

◆ evaluatePbyP() [2/6]

virtual void evaluatePbyP ( const ParticleSet &  P,
ParticleSet::ParticlePos &  newQP,
const std::vector< int > &  index,
HessMatrix &  Amat 
)
pure virtual

calculate quasi-particle coordinates and Amat after pbyp move

Implemented in Backflow_ee< FT >, Backflow_eI_spin< FT >, Backflow_eI< FT >, and Backflow_ee_kSpace.

◆ evaluatePbyP() [3/6]

virtual void evaluatePbyP ( const ParticleSet &  P,
ParticleSet::ParticlePos &  newQP,
const std::vector< int > &  index,
GradMatrix &  Bmat,
HessMatrix &  Amat 
)
pure virtual

calculate quasi-particle coordinates, Bmat and Amat after pbyp move

Implemented in Backflow_ee< FT >, Backflow_eI_spin< FT >, Backflow_eI< FT >, and Backflow_ee_kSpace.

◆ evaluatePbyP() [4/6]

virtual void evaluatePbyP ( const ParticleSet &  P,
int  iat,
ParticleSet::ParticlePos &  newQP 
)
pure virtual

calculate quasi-particle coordinates after pbyp move

Implemented in Backflow_ee< FT >, Backflow_eI_spin< FT >, Backflow_eI< FT >, and Backflow_ee_kSpace.

◆ evaluatePbyP() [5/6]

virtual void evaluatePbyP ( const ParticleSet &  P,
int  iat,
ParticleSet::ParticlePos &  newQP,
HessMatrix &  Amat 
)
pure virtual

calculate quasi-particle coordinates and Amat after pbyp move

Implemented in Backflow_ee< FT >, Backflow_eI_spin< FT >, Backflow_eI< FT >, and Backflow_ee_kSpace.

◆ evaluatePbyP() [6/6]

virtual void evaluatePbyP ( const ParticleSet &  P,
int  iat,
ParticleSet::ParticlePos &  newQP,
GradMatrix &  Bmat,
HessMatrix &  Amat 
)
pure virtual

calculate quasi-particle coordinates, Bmat and Amat after pbyp move

Implemented in Backflow_ee< FT >, Backflow_eI_spin< FT >, Backflow_eI< FT >, and Backflow_ee_kSpace.

◆ evaluateWithDerivatives()

virtual void evaluateWithDerivatives ( const ParticleSet &  P,
ParticleSet &  QP,
GradMatrix &  Bmat,
HessMatrix &  Amat,
GradMatrix &  Cmat,
GradMatrix &  Ymat,
HessArray &  Xmat 
)
pure virtual

calculate quasi-particle coordinates, Bmat and Amat calculate derivatives wrt to variational parameters

Implemented in Backflow_ee< FT >, Backflow_eI_spin< FT >, Backflow_eI< FT >, and Backflow_ee_kSpace.

◆ indexOffset()

virtual int indexOffset ( )
pure virtual

◆ isOptimizable()

virtual bool isOptimizable ( )
pure virtual

◆ makeClone()

virtual std::unique_ptr<BackflowFunctionBase> makeClone ( ParticleSet &  tqp) const
pure virtual

◆ registerData()

virtual void registerData ( WFBufferType &  buf)
pure virtual

◆ reportStatus()

virtual void reportStatus ( std::ostream &  os)
pure virtual

◆ resetParameters()

virtual void resetParameters ( const opt_variables_type &  active)
pure virtual

◆ resize()

void resize ( int  NT,
int  NC 
)
inline

Definition at line 104 of file BackflowFunctionBase.h.

References BackflowFunctionBase::AIJ, BackflowFunctionBase::AIJ_temp, BackflowFunctionBase::BIJ, BackflowFunctionBase::BIJ_temp, BackflowFunctionBase::NumCenters, BackflowFunctionBase::NumTargets, Matrix< T, Alloc >::resize(), Vector< T, Alloc >::resize(), BackflowFunctionBase::UIJ, and BackflowFunctionBase::UIJ_temp.

Referenced by Backflow_ee< FT >::Backflow_ee(), Backflow_eI< FT >::Backflow_eI(), and Backflow_eI_spin< FT >::Backflow_eI_spin().

105  {
106  NumTargets = NT;
107  NumCenters = NC;
108  UIJ.resize(NumTargets, NumCenters);
109  UIJ = 0;
111  AIJ = 0;
113  BIJ = 0;
114  UIJ_temp.resize(NumCenters);
115  UIJ_temp = 0;
117  AIJ_temp = 0;
119  BIJ_temp = 0;
120  }
void resize(size_type n, Type_t val=Type_t())
Resize the container.
Definition: OhmmsVector.h:166
int NumTargets
number of quantum particles
void resize(size_type n, size_type m)
Resize the container.
Definition: OhmmsMatrix.h:99
int NumCenters
number of centers, e.g., ions

◆ restore()

virtual void restore ( int  iat,
int  UpdateType 
)
pure virtual

◆ setParamIndex()

◆ updateBuffer()

Member Data Documentation

◆ AIJ

◆ AIJ_temp

◆ BIJ

◆ BIJ_temp

◆ CenterSys

◆ derivs

◆ FirstOfA

◆ FirstOfB

◆ FirstOfU

◆ indexOfFirstParam

◆ LastOfA

◆ LastOfB

◆ LastOfU

◆ myVars

Definition at line 95 of file BackflowFunctionBase.h.

◆ NumCenters

◆ numParams

◆ NumTargets

◆ UIJ

◆ UIJ_temp

◆ uniqueFunctions

bool uniqueFunctions

Definition at line 94 of file BackflowFunctionBase.h.


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