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