.TH "sc::MolecularEnergy" 3 "Sun Oct 4 2020" "Version 2.3.1" "MPQC" \" -*- nroff -*- .ad l .nh .SH NAME sc::MolecularEnergy \- The \fBMolecularEnergy\fP abstract class inherits from the \fBFunction\fP class\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBsc::Function\fP\&. .PP Inherited by \fBsc::SumMolecularEnergy\fP, \fBsc::TaylorMolecularEnergy\fP, and \fBsc::Wavefunction\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBMolecularEnergy\fP (const \fBMolecularEnergy\fP &)" .br .ti -1c .RI "\fBMolecularEnergy\fP (const \fBRef\fP< \fBKeyVal\fP > &)" .br .RI "The \fBKeyVal\fP constructor\&. " .ti -1c .RI "\fBMolecularEnergy\fP (\fBStateIn\fP &)" .br .ti -1c .RI "void \fBsave_data_state\fP (\fBStateOut\fP &)" .br .RI "Save the base classes (with save_data_state) and the members in the same order that the \fBStateIn\fP CTOR initializes them\&. " .ti -1c .RI "void \fBset_checkpoint\fP ()" .br .RI "Set up checkpointing\&. " .ti -1c .RI "void \fBset_checkpoint_file\fP (const char *)" .br .ti -1c .RI "void \fBset_checkpoint_freq\fP (int freq)" .br .ti -1c .RI "bool \fBif_to_checkpoint\fP () const" .br .RI "Check if need to checkpoint\&. " .ti -1c .RI "const char * \fBcheckpoint_file\fP () const" .br .ti -1c .RI "int \fBcheckpoint_freq\fP () const" .br .ti -1c .RI "\fBMolecularEnergy\fP & \fBoperator=\fP (const \fBMolecularEnergy\fP &)" .br .ti -1c .RI "virtual double \fBenergy\fP ()" .br .RI "A wrapper around \fBvalue()\fP;\&. " .ti -1c .RI "virtual \fBRef\fP< \fBMolecule\fP > \fBmolecule\fP () const" .br .ti -1c .RI "virtual \fBRefSCDimension\fP \fBmoldim\fP () const" .br .ti -1c .RI "void \fBguess_hessian\fP (\fBRefSymmSCMatrix\fP &)" .br .RI "\fBCompute\fP a quick, approximate hessian\&. " .ti -1c .RI "\fBRefSymmSCMatrix\fP \fBinverse_hessian\fP (\fBRefSymmSCMatrix\fP &)" .br .ti -1c .RI "\fBRefSymmSCMatrix\fP \fBhessian\fP ()" .br .RI "If a molecule hessian object is given, it will be used to provide a hessian\&. " .ti -1c .RI "int \fBhessian_implemented\fP () const" .br .ti -1c .RI "void \fBset_x\fP (const \fBRefSCVector\fP &)" .br .RI "Set and retrieve the coordinate values\&. " .ti -1c .RI "\fBRefSCVector\fP \fBget_cartesian_x\fP ()" .br .RI "Return the cartesian coordinates\&. " .ti -1c .RI "\fBRefSCVector\fP \fBget_cartesian_gradient\fP ()" .br .RI "Return the cartesian gradient\&. " .ti -1c .RI "\fBRefSymmSCMatrix\fP \fBget_cartesian_hessian\fP ()" .br .RI "Return the cartesian hessian\&. " .ti -1c .RI "\fBRef\fP< \fBMolecularCoor\fP > \fBmolecularcoor\fP ()" .br .ti -1c .RI "virtual void \fBsymmetry_changed\fP ()" .br .RI "Call this if you have changed the molecular symmetry of the molecule contained by this \fBMolecularEnergy\fP\&. " .ti -1c .RI "\fBRef\fP< \fBNonlinearTransform\fP > \fBchange_coordinates\fP ()" .br .RI "An optimizer can call change coordinates periodically to give the function an opportunity to change its coordinate system\&. " .ti -1c .RI "void \fBprint_natom_3\fP (const \fBRefSCVector\fP &, const char *t=0, std::ostream &o=\fBExEnv::out0\fP()) const" .br .RI "Nicely print n x 3 data that are stored in a vector\&. " .ti -1c .RI "void \fBprint_natom_3\fP (double **, const char *t=0, std::ostream &o=\fBExEnv::out0\fP()) const" .br .ti -1c .RI "void \fBprint_natom_3\fP (double *, const char *t=0, std::ostream &o=\fBExEnv::out0\fP()) const" .br .ti -1c .RI "virtual void \fBprint\fP (std::ostream &=\fBExEnv::out0\fP()) const" .br .RI "Print information about the object\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "void \fBfailure\fP (const char *)" .br .ti -1c .RI "virtual void \fBset_energy\fP (double)" .br .RI "This is just a wrapper around set_value()\&. " .ti -1c .RI "virtual void \fBset_gradient\fP (\fBRefSCVector\fP &)" .br .RI "These are passed gradients and hessian in cartesian coordinates\&. " .ti -1c .RI "virtual void \fBset_hessian\fP (\fBRefSymmSCMatrix\fP &)" .br .ti -1c .RI "void \fBx_to_molecule\fP ()" .br .ti -1c .RI "void \fBmolecule_to_x\fP ()" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "\fBRef\fP< \fBPointGroup\fP > \fBinitial_pg_\fP" .br .ti -1c .RI "int \fBprint_molecule_when_changed_\fP" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBMolecularEnergy\fP abstract class inherits from the \fBFunction\fP class\&. It computes the energy of the molecule as a function of the geometry\&. The coordinate system used can be either internal or cartesian\&. .br .SH "Constructor & Destructor Documentation" .PP .SS "sc::MolecularEnergy::MolecularEnergy (const \fBRef\fP< \fBKeyVal\fP > &)" .PP The \fBKeyVal\fP constructor\&. .IP "\fB\fCmolecule\fP\fP" 1c A \fBMolecule\fP object\&. There is no default\&. .PP .IP "\fB\fCcoor\fP\fP" 1c A \fBMolecularCoor\fP object that describes the coordinates\&. If this is not given cartesian coordinates will be used\&. For convenience, two keywords needed by the \fBMolecularCoor\fP object are automatically provided: natom3 and matrixkit\&. .PP .IP "\fB\fCvalue_accuracy\fP\fP" 1c Sets the accuracy to which values are computed\&. The default is 1\&.0e-6 atomic units\&. .PP .IP "\fB\fCgradient_accuracy\fP\fP" 1c Sets the accuracy to which gradients are computed\&. The default is 1\&.0e-6 atomic units\&. .PP .IP "\fB\fChessian_accuracy\fP\fP" 1c Sets the accuracy to which hessians are computed\&. The default is 1\&.0e-4 atomic units\&. .PP .IP "\fB\fChessian\fP\fP" 1c Specifies a \fBMolecularHessian\fP object that is used to compute the hessian\&. If this \fBMolecularEnergy\fP specialization does not provide a hessian of its own, and a hessian is needed, then this keyword must be specified\&. .PP .IP "\fB\fCguess_hessian\fP\fP" 1c Specifies a \fBMolecularHessian\fP object that is used to compute a guess hessian\&. Guess hessians are used to improve the rate of convergence of optimizations\&. If this keyword is not specified, and a \fBMolecularCoor\fP object is given by \fCcoor\fP, then the guess hessian is obtained from the \fBMolecularCoor\fP object\&. If neither this nor \fCcoor\fP are given, then \fBFunction::guess_hessian\fP is used, which returns a unit matrix\&. .PP .IP "\fB\fCprint_molecule_when_changed\fP\fP" 1c If true, then whenever the molecule's coordinates are updated they will be printed\&. The default is true\&. .PP .IP "\fB\fCcheckpoint\fP\fP" 1c If true, then this object will be checkpointed during its evaluation\&. Not all implementations of \fC\fBMolecularEnergy\fP\fP support checkpointing\&. The default is false\&. .PP .IP "\fB\fCcheckpoint_file\fP\fP" 1c Specifies the name of the file into which this object will be checkpointed\&. Default is '\&.ckpt', where '' is the name of the input file without '\&.in'\&. .PP .IP "\fB\fCcheckpoint_freq\fP\fP" 1c Specifies how often this object to be checkpointed\&. Only matters for objects which are computed iteratively\&. Default is 1\&. .PP .SH "Member Function Documentation" .PP .SS "\fBRef\fP<\fBNonlinearTransform\fP> sc::MolecularEnergy::change_coordinates ()\fC [virtual]\fP" .PP An optimizer can call change coordinates periodically to give the function an opportunity to change its coordinate system\&. A return value of 0 means the coordinates were not changed\&. Otherwise, a transform object to the new coordinate system is return\&. The function object applies the transform to any objects it contains\&. This will obsolete the function data\&. .PP Reimplemented from \fBsc::Function\fP\&. .SS "void sc::MolecularEnergy::save_data_state (\fBStateOut\fP &)\fC [virtual]\fP" .PP Save the base classes (with save_data_state) and the members in the same order that the \fBStateIn\fP CTOR initializes them\&. This must be implemented by the derived class if the class has data\&. .PP Reimplemented from \fBsc::Function\fP\&. .PP Reimplemented in \fBsc::Wavefunction\fP, \fBsc::HCoreWfn\fP, \fBsc::OneBodyWavefunction\fP, \fBsc::ExtendedHuckelWfn\fP, \fBsc::UnrestrictedSCF\fP, \fBsc::UHF\fP, \fBsc::TCSCF\fP, \fBsc::TCHF\fP, \fBsc::SCF\fP, \fBsc::OSSSCF\fP, \fBsc::OSSHF\fP, \fBsc::HSOSSCF\fP, \fBsc::HSOSHF\fP, \fBsc::CLSCF\fP, \fBsc::CLHF\fP, \fBsc::PsiCCSD_T\fP, \fBsc::PsiCCSD\fP, \fBsc::PsiSCF\fP, \fBsc::PsiWavefunction\fP, \fBsc::MBPT2_R12\fP, \fBsc::MP2BasisExtrap\fP, \fBsc::MBPT2\fP, \fBsc::UKS\fP, \fBsc::HSOSKS\fP, \fBsc::CLKS\fP, \fBsc::TaylorMolecularEnergy\fP, and \fBsc::SumMolecularEnergy\fP\&. .SS "virtual void sc::MolecularEnergy::set_gradient (\fBRefSCVector\fP &)\fC [protected]\fP, \fC [virtual]\fP" .PP These are passed gradients and hessian in cartesian coordinates\&. The gradient and hessian in internal coordinates are computed\&. .PP Reimplemented from \fBsc::Function\fP\&. .SH "Author" .PP Generated automatically by Doxygen for MPQC from the source code\&.