28 #ifndef _chemistry_molecule_energy_h
29 #define _chemistry_molecule_energy_h
37 #include <math/optimize/function.h>
38 #include <math/optimize/conv.h>
39 #include <chemistry/molecule/molecule.h>
40 #include <chemistry/molecule/coor.h>
41 #include <chemistry/molecule/hess.h>
69 void failure(
const char *);
82 int print_molecule_when_changed_;
143 void set_checkpoint_file(
const char*);
144 void set_checkpoint_freq(
int freq);
147 const char* checkpoint_file()
const;
148 int checkpoint_freq()
const;
164 int hessian_implemented()
const;
185 const char *t=0, std::ostream&o=
ExEnv::out0())
const;
207 int gradient_implemented()
const;
208 int hessian_implemented()
const;
RefSCVector get_cartesian_gradient()
Return the cartesian gradient.
void print_natom_3(const RefSCVector &, const char *t=0, std::ostream &o=ExEnv::out0()) const
Nicely print n x 3 data that are stored in a vector.
RefSymmSCMatrix hessian()
If a molecule hessian object is given, it will be used to provide a hessian.
virtual void symmetry_changed()
Call this if you have changed the molecular symmetry of the molecule contained by this MolecularEnerg...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void guess_hessian(RefSymmSCMatrix &)
Compute a quick, approximate hessian.
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization.
Definition: matrix.h:261
bool if_to_checkpoint() const
Check if need to checkpoint.
int value_implemented() const
Information about the availability of values, gradients, and hessians.
A template class that maintains references counts.
Definition: ref.h:332
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
RefSymmSCMatrix get_cartesian_hessian()
Return the cartesian hessian.
void set_x(const RefSCVector &)
Set and retrieve the coordinate values.
int converged()
Return nonzero if the optimization has converged.
The Function class is an abstract base class that, given a set of coordinates, will compute a value a...
Definition: function.h:48
void compute()
Recompute at least the results that have compute true and are not already computed.
Restores objects that derive from SavableState.
Definition: statein.h:70
The RefSCDimension class is a smart pointer to an SCDimension specialization.
Definition: dim.h:156
virtual void print(std::ostream &=ExEnv::out0()) const
Print information about the object.
void get_grad(const Ref< Function > &)
Set the current gradient and displacement.
void set_checkpoint()
Set up checkpointing.
RefSCVector get_cartesian_x()
Return the cartesian coordinates.
virtual double energy()
A wrapper around value();.
The MolecularEnergy abstract class inherits from the Function class.
Definition: energy.h:48
virtual void set_gradient(RefSCVector &)
These are passed gradients and hessian in cartesian coordinates.
The RefSCVector class is a smart pointer to an SCVector specialization.
Definition: matrix.h:55
Serializes objects that derive from SavableState.
Definition: stateout.h:61
virtual void set_energy(double)
This is just a wrapper around set_value().
Ref< NonlinearTransform > change_coordinates()
An optimizer can call change coordinates periodically to give the function an opportunity to change i...
The Convergence class is used by the optimizer to determine when an optimization is converged.
Definition: conv.h:56
static std::ostream & out0()
Return an ostream that writes from node 0.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void set_x(const RefSCVector &)
Set and retrieve the coordinate values.
Generated at Sun Jan 26 2020 23:33:03 for MPQC
2.3.1 using the documentation package Doxygen
1.8.16.