Main Page | Class Hierarchy | Class List | Class Members | Related Pages

ChemistryOpt::CoordinateModelInterface Interface Reference

The CoordinateModel interface provides energies and energy derivatives to optimization solvers. More...

Inheritance diagram for ChemistryOpt::CoordinateModelInterface:

Inheritance graph
[legend]
List of all members.

Public Member Functions

int initialize ()
 Registers and gets ports, and requests Model object(s) from the ModelFactory component(s).
int finalize ()
 Releases and unregisters ports.
void set_model (in Chemistry.QC.ModelInterface model)
 Sets the contained chemistry Model object (currently unused as the chemistry Model object is normally obtained from a ModelFactory during initialization).
Chemistry.QC.ModelInterface get_model ()
 Returns the contained chemistry Model object.
int get_n_coor ()
 Returns the number of coordinates.
array< double, 1 > get_coor ()
 Returns the array of (cartesian or internal) coordinates which are being optimized.
double get_energy (in array< double, 1 > x)
 Returns the energy of the currently contained model with the values of the optimization coordinates given in x.
array< double, 1 > get_gradient (in array< double, 1 > x)
 Returns the energy gradient of the currently contained model with the values of the optimization coordinates given in x.
array< double, 2 > get_hessian (in array< double, 1 > x)
 Returns the energy Hessian of the currently contained model with the values of the optimization coordinates given in x.
void get_energy_and_gradient (in array< double, 1 > x, out double f, in array< double, 1 > g)
 Sets f and g to the energy and energy gradient, respectively, of the chemistry model at x.
void guess_hessian_solve (in array< double, 1 > effective_grad, in array< double, 1 > effective_step, in opaque first_geom)
 Returns the product of the guess hessian inverse and an effective gradient.
void checkConvergence (inout int flag)
 Determines if the optimization has converged, flag is set to 1 if convergence has been achieved and 0 otherwise.
void monitor ()
 For visualization, possibly unused (?).

Detailed Description

The CoordinateModel interface provides energies and energy derivatives to optimization solvers.

Chemistry-specific optimization tasks are performed by this component. These tasks include internal coordinate generation, coordinate transformations, convergence checking, and the updating of coordinate values.


Member Function Documentation

void ChemistryOpt::CoordinateModelInterface::checkConvergence inout int  flag  ) 
 

Determines if the optimization has converged, flag is set to 1 if convergence has been achieved and 0 otherwise.

Parameters:
flag Variable that convergence value is assigned to.

int ChemistryOpt::CoordinateModelInterface::finalize  ) 
 

Releases and unregisters ports.

This should be called when the CoordinateModel object is no longer needed.

array< double , 1 > ChemistryOpt::CoordinateModelInterface::get_coor  ) 
 

Returns the array of (cartesian or internal) coordinates which are being optimized.

Returns:
The array of coordinates which are being optimized.

double ChemistryOpt::CoordinateModelInterface::get_energy in array< double, 1 >  x  ) 
 

Returns the energy of the currently contained model with the values of the optimization coordinates given in x.

This requires that the CoordinateModel updates the cartesian coordinates of a contained Molecule object (possibly requiring transformation) and set this Molecule object on a contained Model object, prior to calling get_energy() on the Model object.

Parameters:
x The optimization coordinate values.
Returns:
The energy of the chemistry model at x.

void ChemistryOpt::CoordinateModelInterface::get_energy_and_gradient in array< double, 1 >  x,
out double  f,
in array< double, 1 >  g
 

Sets f and g to the energy and energy gradient, respectively, of the chemistry model at x.

This is similar to calling get_energy() and get_gradient() separately, but set_molecule() must be called on the Model object only once. This is necessary for some model implementations, as a second molecule update would invalidate results from an energy computation. An alternative would be to always return the energy as well when get_gradient() is called.

Parameters:
x The optimization coordinate values.
f Variable that energy will be assigned to.
g Array that the gradient will be assigned to.

array< double , 1 > ChemistryOpt::CoordinateModelInterface::get_gradient in array< double, 1 >  x  ) 
 

Returns the energy gradient of the currently contained model with the values of the optimization coordinates given in x.

This requires that the CoordinateModel updates the cartesian coordinates of a contained Molecule object (possibly requiring transformation) and set this Molecule object on a contained Model object, prior to calling get_gradient() on the Model object. If the optimization coordinate system is not cartesian, the gradient is transformed.

Parameters:
x The optimization coordinate values.
Returns:
The energy gradient of the chemistry model at x.

array< double , 2 > ChemistryOpt::CoordinateModelInterface::get_hessian in array< double, 1 >  x  ) 
 

Returns the energy Hessian of the currently contained model with the values of the optimization coordinates given in x.

This requires that the CoordinateModel updates the cartesian coordinates of a contained Molecule object (possibly requiring transformation) and set this Molecule object on a contained Model object, prior to calling get_hessian() on the Model object. If the optimization coordinate system is not cartesian, the Hessian is transformed.

Parameters:
x The optimization coordinate values.
Returns:
The energy Hessian of the chemistry model at x.

Chemistry.QC.ModelInterface ChemistryOpt::CoordinateModelInterface::get_model  ) 
 

Returns the contained chemistry Model object.

Returns:
The chemistry Model object.

int ChemistryOpt::CoordinateModelInterface::get_n_coor  ) 
 

Returns the number of coordinates.

Returns:
The number of coordinates.

void ChemistryOpt::CoordinateModelInterface::guess_hessian_solve in array< double, 1 >  effective_grad,
in array< double, 1 >  effective_step,
in opaque  first_geom
 

Returns the product of the guess hessian inverse and an effective gradient.

Probably unique to TAO's limited memory variable metric algorithm, which uses this method to accomodate dense guess hessians. "first_geom_ptr" provides the Cartesian coordinates for which the guess Hessian should be computed (first_geom_ptr=0 for current geometry).

Parameters:
effective_grad An effective gradient.
effective_step Array that effective step is assigned to.
first_geom Pointer to array of Cartesians

int ChemistryOpt::CoordinateModelInterface::initialize  ) 
 

Registers and gets ports, and requests Model object(s) from the ModelFactory component(s).

This must be the first method called following instantiation.

void ChemistryOpt::CoordinateModelInterface::monitor  ) 
 

For visualization, possibly unused (?).

CoordinateModel objects may callback to viewers that implement the Chemistry.MoleculeViewer interface, such as the cca-chem python GUI, making this method unnecessary.

void ChemistryOpt::CoordinateModelInterface::set_model in Chemistry.QC.ModelInterface  model  ) 
 

Sets the contained chemistry Model object (currently unused as the chemistry Model object is normally obtained from a ModelFactory during initialization).

Parameters:
model The chemistry model object.


The documentation for this interface was generated from the following file:
Generated on Mon Jun 4 13:03:05 2007 for cca-chem-generic by  doxygen 1.3.9.1