QMCPACK
ShortRangePartAdapter< T > Struct Template Reference
+ Inheritance diagram for ShortRangePartAdapter< T >:
+ Collaboration diagram for ShortRangePartAdapter< T >:

Public Types

using HandlerType = LRHandlerBase
 
- Public Types inherited from OptimizableFunctorBase
using real_type = optimize::VariableSet::real_type
 typedef for real values More...
 
using opt_variables_type = optimize::VariableSet
 typedef for variableset: this is going to be replaced More...
 

Public Member Functions

 ShortRangePartAdapter (HandlerType *inhandler)
 
OptimizableFunctorBasemakeClone () const override
 create a clone of this object More...
 
void reset () override
 reset function More...
 
void setRmax (real_type rm)
 
real_type evaluate (real_type r)
 
real_type f (real_type r) override
 evaluate the value at r More...
 
real_type df (real_type r) override
 evaluate the first derivative More...
 
void checkInVariablesExclusive (opt_variables_type &active) override
 check in variational parameters to the global list of parameters used by the optimizer. More...
 
void checkOutVariables (const opt_variables_type &active) override
 check out variational optimizable variables More...
 
void resetParametersExclusive (const opt_variables_type &optVariables) override
 reset the parameters during optimizations. More...
 
bool put (xmlNodePtr cur) override
 process xmlnode and registers variables to optimize More...
 
- Public Member Functions inherited from OptimizableFunctorBase
 OptimizableFunctorBase (const std::string &name="")
 default constructor More...
 
virtual ~OptimizableFunctorBase ()=default
 virtual destrutor More...
 
void getIndex (const opt_variables_type &active)
 
virtual void setDensity (real_type n)
 empty virtual function to help builder classes More...
 
virtual void setCusp (real_type cusp)
 empty virtual function to help builder classes More...
 
virtual void setPeriodic (bool periodic)
 empty virtual function to help builder classes More...
 
virtual bool evaluateDerivatives (real_type r, std::vector< qmcplusplus::TinyVector< real_type, 3 >> &derivs)
 
virtual bool evaluateDerivatives (real_type r, std::vector< real_type > &derivs)
 
virtual void setGridManager (bool willmanage)
 
virtual void checkInVariablesExclusive (opt_variables_type &active)=0
 check in variational parameters to the global list of parameters used by the optimizer. More...
 
virtual void resetParametersExclusive (const opt_variables_type &active)=0
 reset the parameters during optimizations More...
 
- Public Member Functions inherited from OptimizableObject
 OptimizableObject (const std::string &name)
 
const std::string & getName () const
 
bool isOptimized () const
 
virtual void reportStatus (std::ostream &os)
 print the state, e.g., optimizables More...
 
void setOptimization (bool state)
 
virtual void writeVariationalParameters (hdf_archive &hout)
 Write the variational parameters for this object to the VP HDF file. More...
 
virtual void readVariationalParameters (hdf_archive &hin)
 Read the variational parameters for this object from the VP HDF file. More...
 

Public Attributes

real_type Uconst
 
HandlerTypemyHandler
 
- Public Attributes inherited from OptimizableFunctorBase
real_type cutoff_radius = 0.0
 maximum cutoff More...
 
opt_variables_type myVars
 set of variables to be optimized More...
 

Detailed Description

template<typename T>
struct qmcplusplus::ShortRangePartAdapter< T >

Definition at line 466 of file LRBreakupUtilities.h.

Member Typedef Documentation

◆ HandlerType

Definition at line 468 of file LRBreakupUtilities.h.

Constructor & Destructor Documentation

◆ ShortRangePartAdapter()

ShortRangePartAdapter ( HandlerType inhandler)
inlineexplicit

Definition at line 470 of file LRBreakupUtilities.h.

Member Function Documentation

◆ checkInVariablesExclusive()

void checkInVariablesExclusive ( opt_variables_type active)
inlineoverridevirtual

check in variational parameters to the global list of parameters used by the optimizer.

Parameters
activea super set of optimizable variables

The existing checkInVariables implementation in WFC/SPO/.. are inclusive and it calls checkInVariables of its members class A: public SPOSet {} class B: public WFC { A objA; checkInVariables() { objA.checkInVariables(); } };

With OptimizableObject, class A: public OptimizableObject {} class B: public OptimizableObject { A objA; checkInVariablesExclusive() { // should not call objA.checkInVariablesExclusive() if objA has been extracted; } }; A vector of OptimizableObject, will be created by calling extractOptimizableObjects(). All the checkInVariablesExclusive() will be called through this vector and thus checkInVariablesExclusive implementation should only handle non-OptimizableObject members.

Implements OptimizableObject.

Definition at line 479 of file LRBreakupUtilities.h.

479 {}

◆ checkOutVariables()

void checkOutVariables ( const opt_variables_type active)
inlineoverridevirtual

check out variational optimizable variables

Parameters
activea super set of optimizable variables

Implements OptimizableFunctorBase.

Definition at line 480 of file LRBreakupUtilities.h.

480 {}

◆ df()

real_type df ( real_type  r)
inlineoverridevirtual

evaluate the first derivative

Parameters
rdistance

virtual function necessary for a transformation to a numerical functor

Implements OptimizableFunctorBase.

Definition at line 478 of file LRBreakupUtilities.h.

References ShortRangePartAdapter< T >::myHandler, and LRHandlerBase::srDf().

478 { return myHandler->srDf(r, 1.0 / r); }
virtual mRealType srDf(mRealType r, mRealType rinv) const =0

◆ evaluate()

real_type evaluate ( real_type  r)
inline

Definition at line 476 of file LRBreakupUtilities.h.

References ShortRangePartAdapter< T >::f().

476 { return f(r); }
real_type f(real_type r) override
evaluate the value at r

◆ f()

real_type f ( real_type  r)
inlineoverridevirtual

evaluate the value at r

Parameters
rdistance

virtual function necessary for a transformation to a numerical functor

Implements OptimizableFunctorBase.

Definition at line 477 of file LRBreakupUtilities.h.

References LRHandlerBase::evaluate(), ShortRangePartAdapter< T >::myHandler, and ShortRangePartAdapter< T >::Uconst.

Referenced by ShortRangePartAdapter< T >::evaluate().

477 { return myHandler->evaluate(r, 1.0 / r) - Uconst; }
mRealType evaluate(const std::vector< int > &kshell, const pRealType *restrict rk1_r, const pRealType *restrict rk1_i, const pRealType *restrict rk2_r, const pRealType *restrict rk2_i) const
evaluate
Definition: LRHandlerBase.h:93

◆ makeClone()

OptimizableFunctorBase* makeClone ( ) const
inlineoverridevirtual

create a clone of this object

Implements OptimizableFunctorBase.

Definition at line 472 of file LRBreakupUtilities.h.

472 { return new ShortRangePartAdapter<T>(*this); }

◆ put()

bool put ( xmlNodePtr  cur)
inlineoverridevirtual

process xmlnode and registers variables to optimize

Parameters
curxmlNode for a functor

Implements OptimizableFunctorBase.

Definition at line 482 of file LRBreakupUtilities.h.

482 { return true; }

◆ reset()

void reset ( )
inlineoverridevirtual

reset function

Implements OptimizableFunctorBase.

Definition at line 474 of file LRBreakupUtilities.h.

474 {}

◆ resetParametersExclusive()

void resetParametersExclusive ( const opt_variables_type active)
inlineoverridevirtual

reset the parameters during optimizations.

Exclusive, see checkInVariablesExclusive

Implements OptimizableObject.

Definition at line 481 of file LRBreakupUtilities.h.

481 {}

◆ setRmax()

void setRmax ( real_type  rm)
inline

Definition at line 475 of file LRBreakupUtilities.h.

References LRHandlerBase::evaluate(), ShortRangePartAdapter< T >::myHandler, and ShortRangePartAdapter< T >::Uconst.

Referenced by RadialJastrowBuilder::createJ1(), and RPAJastrow::makeShortRange().

475 { Uconst = myHandler->evaluate(rm, 1.0 / rm); }
mRealType evaluate(const std::vector< int > &kshell, const pRealType *restrict rk1_r, const pRealType *restrict rk1_i, const pRealType *restrict rk2_r, const pRealType *restrict rk2_i) const
evaluate
Definition: LRHandlerBase.h:93

Member Data Documentation

◆ myHandler

◆ Uconst


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