MPQC  3.0.0-alpha
sc::SavableState Class Reference

Base class for objects that can save/restore state. More...

#include <util/state/state.h>

Inheritance diagram for sc::SavableState:
sc::DescribedClass sc::RefCount sc::RDM< One > sc::RDM< Two > sc::RDMCumulant< Two > sc::AccumH sc::ActiveMessage sc::AngularIntegrator sc::AtomInfo sc::ConsumableResources sc::Convergence sc::Debugger sc::DenFunctional sc::DenIntegrator sc::DensityFitting sc::DensityFittingInfo sc::DensityFittingParams sc::DensityFittingRuntime sc::DistArray4 sc::DummySavableState sc::FockBuildRuntime sc::FockDistribution sc::Function sc::GaussianBasisSet sc::HessianUpdate sc::IntCoor sc::IntCoorGen sc::Integral sc::IntegrationWeight sc::IntParams sc::mbptr12::TwoParticleContraction sc::MOIntsRuntime sc::MOIntsTransformFactory sc::MolecularCoor sc::MolecularFrequencies sc::MolecularGradient sc::MolecularHessian sc::Molecule sc::MP2R12Energy sc::Optimize sc::OrbitalSpace sc::OverlapOrthog sc::PointGroup sc::PopulatedOrbitalSpace sc::R12EnergyIntermediates sc::R12IntEval sc::R12Technology sc::R12Technology::R12Ansatz sc::R12WavefunctionWorld sc::RadialIntegrator sc::RDM< R > sc::RDMCumulant< R > sc::RefWavefunction sc::SCBlockInfo sc::SCDimension sc::SCElementOp sc::SCElementOp2 sc::SCElementOp3 sc::SCExtrapData sc::SCExtrapError sc::SCMatrixBlock sc::SCMatrixBlockList sc::SelfConsistentExtrapolation sc::SetIntCoor sc::ShellPairsLibint2 sc::SpinFreeRDM< R > sc::TwoBodyGrid sc::TwoBodyMOIntsRuntime< NumCenters > sc::TwoBodyMOIntsRuntimeUnion23 sc::TwoBodyMOIntsTransform sc::TwoBodyThreeCenterMOIntsTransform sc::Units sc::WavefunctionWorld sc::SpinFreeRDM< One > sc::SpinFreeRDM< Two >

Public Member Functions

SavableStateoperator= (const SavableState &)
 
void save_state (StateOut &)
 Save the state of the object as specified by the StateOut object. More...
 
void save_object_state (StateOut &)
 This can be used for saving state when the exact type of the object is known for both the save and the restore. More...
 
virtual void save_vbase_state (StateOut &)
 Save the virtual bases for the object. More...
 
virtual void save_data_state (StateOut &)
 Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR initializes them. More...
 
- Public Member Functions inherited from sc::DescribedClass
 DescribedClass (const DescribedClass &)
 
DescribedClassoperator= (const DescribedClass &)
 
ClassDescclass_desc () const MPQC__NOEXCEPT
 This returns the unique pointer to the ClassDesc corresponding to the given type_info object. More...
 
const char * class_name () const
 Return the name of the object's exact type.
 
int class_version () const
 Return the version of the class.
 
virtual void print (std::ostream &=ExEnv::out0()) const
 Print the object.
 
Ref< DescribedClassref ()
 Return this object wrapped up in a Ref smart pointer. More...
 
- Public Member Functions inherited from sc::RefCount
size_t identifier () const
 Return the unique identifier for this object that can be compared for different objects of different types. More...
 
int lock_ptr () const
 Lock this object.
 
int unlock_ptr () const
 Unlock this object.
 
void use_locks (bool inVal)
 start and stop using locks on this object
 
refcount_t nreference () const
 Return the reference count.
 
refcount_t reference ()
 Increment the reference count and return the new count.
 
refcount_t dereference ()
 Decrement the reference count and return the new count.
 
int managed () const
 
void unmanage ()
 Turn off the reference counting mechanism for this object. More...
 

Static Public Member Functions

static void save_state (SavableState *s, StateOut &)
 
static SavableStaterestore_state (StateIn &si)
 Restores objects saved with save_state. More...
 
static SavableStatekey_restore_state (StateIn &si, const char *keyword)
 Like restore_state, but keyword is used to override values while restoring.
 
static SavableStatedir_restore_state (StateIn &si, const char *objectname, const char *keyword=0)
 

Protected Member Functions

 SavableState (const SavableState &)
 
 SavableState (StateIn &)
 Each derived class StateIn CTOR handles the restore corresponding to calling save_object_state, save_vbase_state, and save_data_state listed above. More...
 
- Protected Member Functions inherited from sc::RefCount
 RefCount (const RefCount &)
 
RefCountoperator= (const RefCount &)
 

Detailed Description

Base class for objects that can save/restore state.

Constructor & Destructor Documentation

◆ SavableState()

sc::SavableState::SavableState ( StateIn )
protected

Each derived class StateIn CTOR handles the restore corresponding to calling save_object_state, save_vbase_state, and save_data_state listed above.

All derived class StateIn& constructors must invoke the SavableState(StateIn&) constructor.

Member Function Documentation

◆ restore_state()

static SavableState* sc::SavableState::restore_state ( StateIn si)
static

Restores objects saved with save_state.

The exact type of the next object in si can be any type publically derived from the SavableState. Derived classes implement a similar static function that returns a pointer to the derived class. If the objectname is given the directory will be consulted to find and restore that object.

Referenced by sc::FromStateIn().

◆ save_data_state()

virtual void sc::SavableState::save_data_state ( StateOut )
virtual

Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR initializes them.

This must be implemented by the derived class if the class has data.

Reimplemented in sc::PointGroup, sc::GaussianBasisSet, sc::OBWfnRDMOne, sc::OBWfnRDMCumulantTwo, sc::OBWfnRDMTwo, sc::TwoBodyMOIntsRuntime< NumCenters >, sc::SpinFreeRDM< R >, sc::SpinFreeRDM< Two >, sc::SpinFreeRDM< One >, sc::DensityFittingInfo, sc::RDMCumulant< R >, sc::RDMCumulant< Two >, sc::PsiSpinFreeRDMOne, sc::PsiSpinFreeRDMTwo, sc::PsiRDMOne, sc::DensityFittingRuntime, sc::RDM< R >, sc::RDM< Two >, sc::RDM< One >, sc::R12EnergyIntermediates, sc::PopulatedOrbitalSpace, sc::mbptr12::Direct_Contraction, sc::FockBuildRuntime, sc::PsiRDMTwo, sc::mbptr12::TwoParticleContraction, sc::CI, sc::SCElementFindExtremum< BinaryPredicate, IterationRanges >, sc::PT2R12, sc::FockBuildAM, sc::Backtrack, sc::AtomInfo, sc::SpinOrbitalPT2R12, sc::PsiRASCI, sc::Units, sc::SCMatrixBlock, sc::G96XFunctional, sc::EmptyOrbitalSpace, sc::mPW91XFunctional, sc::OrbitalSpaceUnion, sc::AtomicOrbitalSpace, sc::CartMolecularCoor, sc::NonblockedOrbitalSpace, sc::MaskedOrbitalSpace, sc::PW91XFunctional, sc::RedundMolecularCoor, sc::OrderedSpinOrbitalSpace< Order >, sc::PBEXFunctional, sc::SymmMolecularCoor, sc::OrderedOrbitalSpace< Order >, sc::PW86XFunctional, sc::LYPCFunctional, sc::R12Technology, sc::Becke88XFunctional, sc::IntMolecularCoor, sc::XalphaFunctional, sc::FinDispMolecularGradient, sc::R12IntEval, sc::PZ81LCFunctional, sc::PW92LCFunctional, sc::VWN5LCFunctional, sc::VWN4LCFunctional, sc::VWN3LCFunctional, sc::TwoBodyMOIntsRuntimeUnion23, sc::SCElementDot, sc::VWN2LCFunctional, sc::SCElementKNorm, sc::Molecule, sc::VWN1LCFunctional, sc::Extern_RefWavefunction, sc::SCElementSum, sc::FinDispMolecularHessian, sc::OrbitalSpace, sc::VWNLCFunctional, sc::SCElementMinAbs, sc::SlaterXFunctional, sc::SCElementMaxAbs, sc::NewP86CFunctional, sc::RadialAngularIntegrator, sc::MP2R12Energy_Diag, sc::P86CFunctional, sc::SD_RefWavefunction, sc::MolecularCoor, sc::PW91CFunctional, sc::GaussLegendreAngularIntegrator, sc::SCMatrixDiagSubBlock, sc::SCElementShiftDiagonal, sc::MolEnergyConvergence, sc::PBECFunctional, sc::SCElementScaleDiagonal, sc::IntCoorGen, sc::SCMatrixDiagBlock, sc::PsiSCF, sc::SCElementInvert, sc::LebedevLaikovIntegrator, sc::LSDACFunctional, sc::SCElementSquareRoot, sc::StdDenFunctional, sc::SCMatrixLTriSubBlock, sc::SCElementAssign, sc::SumMolecularEnergy, sc::SCElementRandomize, sc::SCElementScale, sc::SCMatrixLTriBlock, sc::SCElementDAXPY, sc::TwoBodyThreeCenterMOIntsTransform, sc::EulerMaclaurinRadialIntegrator, sc::HCoreWfn, sc::SCF, sc::SCElementDestructiveProduct, sc::MBPT2, sc::MolecularGradient, sc::SCMatrixRectSubBlock, sc::AngularIntegrator, sc::SCElementScalarProduct, sc::PsiCC3, sc::RefWavefunction, sc::Debugger, sc::SetIntCoor, sc::PsiCC2, sc::RadialIntegrator, sc::PermutedDensityFitting, sc::MP2R12Energy_SpinOrbital, sc::CADFCLHF, sc::DensityFittingParams, sc::SumDenFunctional, sc::DiagMolecularHessian, sc::PsiRASSCF, sc::PsiCorrWavefunction, sc::PsiCCSD_T, sc::BeckeIntegrationWeight, sc::SCMatrixRectBlock, sc::Wavefunction, sc::PsiCCSD, sc::TransformedDensityFitting, sc::MolecularEnergy, sc::GuessMolecularHessian, sc::DistArray4_MPIIOFile_Ind, sc::IntParamsG12, sc::SCVectorSimpleSubBlock, sc::Integral, sc::NElFunctional, sc::TwoBodyMOIntsTransform, sc::PsiCC3_PT2R12, sc::MP2R12Energy, sc::IntegrationWeight, sc::R12Technology::R12Ansatz, sc::PsiCC, sc::SumIntCoor, sc::LineOpt, sc::ReadMolecularHessian, sc::WavefunctionWorld, sc::PsiCCSD_PT2R12T, sc::MBPT2_R12, sc::SCDimension, sc::SCVectorSimpleBlock, sc::IntParamsOrigin, sc::MOIntsTransformFactory, sc::Function, sc::SumAccumH, sc::PowellUpdate, sc::DummySavableState, sc::PsiRASCI_RefWavefunction, sc::HSOSSCF, sc::PsiCCSD_PT2R12, sc::Convergence, sc::IntParamsVoid, sc::mbptr12::CABS_OBS_Contraction, sc::DenFunctional, sc::QNewtonOpt, sc::SymmSCMatrixSCExtrapError, sc::BFGSUpdate, sc::OverlapOrthog, sc::SCMatrixBlockList, sc::SimpleCo, sc::UnrestrictedSCF, sc::DistArray4, sc::MolecularFragment, sc::SelfConsistentExtrapolation, sc::MolecularFrequencies, sc::DensityFitting, sc::AccumHNull, sc::PsiWavefunction, sc::DIIS, sc::DistArray4_MPIIOFile, sc::mbptr12::ABS_OBS_Contraction, sc::TCSCF, sc::TwoBodyThreeCenterMOIntsTransform_ijR_using_iqR, sc::SymmSCMatrixNSCExtrapData, sc::EFCOpt, sc::Optimize, sc::DenIntegrator, sc::R12WavefunctionWorld, sc::DFPUpdate, sc::ShellPairsLibint2, sc::PsiCC_PT2R12, sc::OSSSCF, sc::IntParams, sc::DFCLHF, sc::DistArray4_Node0File, sc::ExtendedHuckelWfn, sc::TwoBodyGrid, sc::OneBodyWavefunction, sc::IntCoor, sc::SuperpositionOfAtomicDensities, sc::SymmSCMatrix4SCExtrapData, sc::BEMSolventH, sc::LSelectBasisSet, sc::HSOSKS, sc::SCBlockInfo, sc::DistArray4_MemoryGrp, sc::TaylorMolecularEnergy, sc::SplitBasisSet, sc::ManyBodyWavefunction, sc::CLSCF, sc::MolecularHessian, sc::UKS, sc::SCExtrapError, sc::UncontractedBasisSet, sc::CLKS, sc::ConsumableResources, sc::TwoBodyMOIntsTransform_ixjy_df, sc::AM05Functional, sc::AccumH, sc::GDIISOpt, sc::ActiveMessageEcho, sc::UnionBasisSet, sc::IntegralLibint2, sc::PsiSCF_RefWavefunction, sc::TwoBodyMOIntsTransform_ixjy, sc::CartesianBasisSet, sc::TensorExtrapError, sc::IntegralV3, sc::TwoBodyMOIntsTransform_iRjS, sc::SymmSCMatrix2SCExtrapData, sc::TwoBodyMOIntsTransform_ikjy, sc::NewtonOpt, sc::HessianUpdate, sc::TwoBodyMOIntsTransform_ijxy, sc::SteepestDescentOpt, sc::FockBuildCLHF, sc::TwoBodyThreeCenterMOIntsTransform_ijR, sc::UHF, sc::ActiveMessage, sc::OSSHF, sc::TCHF, sc::MOIntsRuntime, sc::SCExtrapData, sc::CLHF, sc::HSOSHF, sc::TensorExtrapData, sc::MP2BasisExtrap, sc::SymmSCMatrixSCExtrapData, mpqc::TA::TiledBasisSet, sc::LMP2, sc::FockDistribution, sc::sma2::Array6SCExtrapError, sc::sma2::Array6SCExtrapData, sc::sma2::Array4SCExtrapError, sc::sma2::Array4SCExtrapData, sc::LCorr, sc::sma2::Array2SCExtrapError, sc::sma2::Array2SCExtrapData, sc::sma2::Array24SCExtrapError, and sc::sma2::Array24SCExtrapData.

◆ save_object_state()

void sc::SavableState::save_object_state ( StateOut )

This can be used for saving state when the exact type of the object is known for both the save and the restore.

To restore objects saved in this way the user must directly invoke the object's StateIn& constructor.

◆ save_state()

void sc::SavableState::save_state ( StateOut )

Save the state of the object as specified by the StateOut object.

This routine saves the state of the object (which includes the nonvirtual bases), the virtual bases, and type information. The default implementation should be adequate.

Referenced by sc::RDM< One >::save_data_state(), sc::RDMCumulant< Two >::save_data_state(), sc::DensityFittingInfo::save_data_state(), sc::SpinFreeRDM< One >::save_data_state(), sc::TwoBodyMOIntsRuntime< NumCenters >::save_data_state(), and sc::ToStateOut().

◆ save_vbase_state()

virtual void sc::SavableState::save_vbase_state ( StateOut )
virtual

Save the virtual bases for the object.

This must be done in the same order that the ctor initializes the virtual bases. This does not include the DescribedClass and SavableState virtual base classes. This must be implemented by the user if the class has other virtual bases. (These virtual bases must come after SavableState, if SavableState is virtual.)


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

Generated at Sun Jan 26 2020 23:24:11 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.