![]() |
QMCPACK
|
Public Member Functions | |
OptimizableObject (const std::string &name) | |
const std::string & | getName () const |
bool | isOptimized () const |
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... | |
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... | |
Private Attributes | |
const std::string | name_ |
Name of the optimizable object. More... | |
bool | is_optimized_ = false |
If true, this object is actively modified during WFOpt. More... | |
Definition at line 26 of file OptimizableObject.h.
|
inline |
Definition at line 29 of file OptimizableObject.h.
|
pure virtual |
check in variational parameters to the global list of parameters used by the optimizer.
active | a 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.
Implemented in PolynomialFunctor3D, ScaledPadeFunctor< T >, PadeTwo2ndOrderFunctor< T >, BsplineFunctor< REAL >, ShortRangeCuspFunctor< T >, Pade2ndOrderFunctor< T >, ShortRangePartAdapter< T >, UserFunctor< T >, PadeFunctor< T >, RotatedSPOs, CubicSplineSingle< RT, FNOUT >, BackflowTransformation, kSpaceJastrow, FakeFunctor< T >, GaussianTimesRN< T >, CountingJastrow< RegionType >, MultiSlaterDetTableMethod, ExampleHeComponent, and FakeOptimizableObject.
|
inline |
Definition at line 31 of file OptimizableObject.h.
References OptimizableObject::name_.
Referenced by UniqueOptObjRefs::push_back().
|
inline |
Definition at line 32 of file OptimizableObject.h.
References OptimizableObject::is_optimized_.
|
inlinevirtual |
Read the variational parameters for this object from the VP HDF file.
The hin parameter should come from VariableSet::readFromHDF
By default the parameters are read in VariableSet::readFromHDF, and objects do not need to implement this function (yet).
Reimplemented in RotatedSPOs, and FakeOptimizableObject.
Definition at line 95 of file OptimizableObject.h.
|
inlinevirtual |
print the state, e.g., optimizables
Reimplemented in BsplineFunctor< REAL >, CountingJastrow< RegionType >, BackflowTransformation, and CubicSplineSingle< RT, FNOUT >.
Definition at line 72 of file OptimizableObject.h.
|
pure virtual |
reset the parameters during optimizations.
Exclusive, see checkInVariablesExclusive
Implemented in PolynomialFunctor3D, ScaledPadeFunctor< T >, PadeTwo2ndOrderFunctor< T >, BsplineFunctor< REAL >, ShortRangeCuspFunctor< T >, Pade2ndOrderFunctor< T >, ShortRangePartAdapter< T >, UserFunctor< T >, PadeFunctor< T >, RotatedSPOs, CubicSplineBasisSet< RT >, CubicSplineSingle< RT, FNOUT >, BackflowTransformation, kSpaceJastrow, FakeFunctor< T >, GaussianTimesRN< T >, CountingJastrow< RegionType >, MultiSlaterDetTableMethod, ExampleHeComponent, and FakeOptimizableObject.
|
inline |
Definition at line 74 of file OptimizableObject.h.
References OptimizableObject::is_optimized_.
|
inlinevirtual |
Write the variational parameters for this object to the VP HDF file.
The hout parameter should come from VariableSet::writeToHDF
Objects can use this function to store additional information to the file.
By default the parameters are saved in VariableSet::writeToHDF, and objects do not need to implement this function (yet).
Reimplemented in RotatedSPOs, and FakeOptimizableObject.
Definition at line 86 of file OptimizableObject.h.
|
private |
If true, this object is actively modified during WFOpt.
Definition at line 40 of file OptimizableObject.h.
Referenced by OptimizableObject::isOptimized(), and OptimizableObject::setOptimization().
|
private |
Name of the optimizable object.
Definition at line 37 of file OptimizableObject.h.
Referenced by OptimizableObject::getName().