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;
void set_checkpoint()
Set up checkpointing.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
The RefSCVector class is a smart pointer to an SCVector specialization.
Definition: matrix.h:55
virtual void print(std::ostream &=ExEnv::out0()) const
Print information about the object.
Serializes objects that derive from SavableState.
Definition: stateout.h:61
void guess_hessian(RefSymmSCMatrix &)
Compute a quick, approximate hessian.
void get_grad(const Ref< Function > &)
Set the current gradient and displacement.
Ref< NonlinearTransform > change_coordinates()
An optimizer can call change coordinates periodically to give the function an opportunity to change i...
The MolecularEnergy abstract class inherits from the Function class.
Definition: energy.h:48
RefSCVector get_cartesian_gradient()
Return the cartesian gradient.
A template class that maintains references counts.
Definition: ref.h:332
virtual void set_energy(double)
This is just a wrapper around set_value().
virtual void symmetry_changed()
Call this if you have changed the molecular symmetry of the molecule contained by this MolecularEnerg...
The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization. ...
Definition: matrix.h:261
int converged()
Return nonzero if the optimization has converged.
The RefSCDimension class is a smart pointer to an SCDimension specialization.
Definition: dim.h:156
Restores objects that derive from SavableState.
Definition: statein.h:70
RefSymmSCMatrix get_cartesian_hessian()
Return the cartesian hessian.
The Convergence class is used by the optimizer to determine when an optimization is converged...
Definition: conv.h:56
int value_implemented() const
Information about the availability of values, gradients, and hessians.
virtual double energy()
A wrapper around value();.
static std::ostream & out0()
Return an ostream that writes from node 0.
void set_x(const RefSCVector &)
Set and retrieve the coordinate values.
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.
void compute()
Recompute at least the results that have compute true and are not already computed.
bool if_to_checkpoint() const
Check if need to checkpoint.
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.
virtual void set_gradient(RefSCVector &)
These are passed gradients and hessian in cartesian coordinates.
The Function class is an abstract base class that, given a set of coordinates, will compute a value a...
Definition: function.h:48
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 hessian()
If a molecule hessian object is given, it will be used to provide a hessian.
RefSCVector get_cartesian_x()
Return the cartesian coordinates.