MPQC 2.3.1
|
Symbol "MPQC.ChemistryOpt_CoordinateModel" (version 0.2) More...
#include <MPQC_ChemistryOpt_CoordinateModel_Impl.hh>
Public Member Functions | |
ChemistryOpt_CoordinateModel_impl (struct MPQC_ChemistryOpt_CoordinateModel__object *s) | |
void | _ctor () |
void | _dtor () |
int32_t | initialize () throw () |
Registers and gets ports, and requests Model object(s) from the ModelFactory component(s). | |
int32_t | finalize () throw () |
Releases and unregisters ports. | |
void | set_model (::Chemistry::QC::Model model) throw () |
Sets the contained chemistry Model object (currently unused as the chemistry Model object is normally obtained from a ModelFactory during initialization). | |
::Chemistry::QC::Model | get_model () throw () |
Returns the contained chemistry Model object. | |
int32_t | get_n_coor () throw () |
Returns the number of coordinates. | |
::sidl::array< double > | get_coor () throw () |
Returns the array of (cartesian or internal) coordinates which are being optimized. | |
double | get_energy (::sidl::array< double > x) throw () |
Returns the energy of the currently contained model with the values of the optimization coordinates given in x. | |
::sidl::array< double > | get_gradient (::sidl::array< double > x) throw () |
Returns the energy gradient of the currently contained model with the values of the optimization coordinates given in x. | |
::sidl::array< double > | get_hessian (::sidl::array< double > x) throw () |
Returns the energy Hessian of the currently contained model with the values of the optimization coordinates given in x. | |
void | get_energy_and_gradient (::sidl::array< double > x, double &f, ::sidl::array< double > g) throw () |
Sets f and g to the energy and energy gradient, respectively, of the chemistry model at x. | |
void | guess_hessian_solve (::sidl::array< double > effective_grad, ::sidl::array< double > effective_step, void *first_geom) throw () |
Returns the product of the guess hessian inverse and an effective gradient. | |
void | checkConvergence (int32_t &flag) throw () |
Determines if the optimization has converged, flag is set to 1 if convergence has been achieved and 0 otherwise. | |
void | monitor () throw () |
For visualization, possibly unused (?). | |
void | setServices (::gov::cca::Services services) throw ( ::gov::cca::CCAException ) |
Starts up a component presence in the calling framework. |
Static Public Member Functions | |
static void | _load () |
Symbol "MPQC.ChemistryOpt_CoordinateModel" (version 0.2)
IntegralEvaluatorFactory_impl implements a component interface for coordinate-aware chemistry models.
This is an implementation of a SIDL interface. The stub code is generated by the Babel tool. Do not make modifications outside of splicer blocks, as these will be lost. This is a server implementation for a Babel class, the Babel client code is provided by the cca-chem-generic package.
For use directly in a framework, the parameter port recognizes the following parameters:
RMS gradient convergence criterion. The default is 0.00030.
Max gradient convergence criterion. The default is 0.00045.
RMS displacement convergence criterion. The default is 0.00120.
Max displacement convergence criterion. The default is 0.00180.
Whether a new guess Hessian is computed each time guess_hessian_sovle() is called. The default is true.
Whether the guess Hessian is computed at the current geometry or the geometry of the first correction pair. Only meaningful if multiple_guess_h = true. The default is false.
Type of coordinates to use for optimization: cartesian, symmetrized, or redundant. The default is symmetrized.
Vector specifying centers between which bonds should be added. There is no default.
These parameters must be set by the client for embedded use.
void MPQC::ChemistryOpt_CoordinateModel_impl::checkConvergence | ( | int32_t & | flag | ) | ||
throw | ( | ) |
Determines if the optimization has converged, flag is set to 1 if convergence has been achieved and 0 otherwise.
flag | Variable that convergence value is assigned to. |
References checkConvergence().
Referenced by checkConvergence().
int32_t MPQC::ChemistryOpt_CoordinateModel_impl::finalize | ( | ) | ||||
throw | ( | ) |
Releases and unregisters ports.
This should be called when the CoordinateModel object is no longer needed.
References finalize().
Referenced by finalize().
::sidl::array< double > MPQC::ChemistryOpt_CoordinateModel_impl::get_coor | ( | ) | ||||
throw | ( | ) |
Returns the array of (cartesian or internal) coordinates which are being optimized.
References get_coor().
Referenced by get_coor().
double MPQC::ChemistryOpt_CoordinateModel_impl::get_energy | ( | ::sidl::array< double > | x | ) | ||
throw | ( | ) |
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.
x | The optimization coordinate values. |
References get_energy().
Referenced by get_energy().
void MPQC::ChemistryOpt_CoordinateModel_impl::get_energy_and_gradient | ( | ::sidl::array< double > | x, | |||
double & | f, | |||||
::sidl::array< double > | g ) | |||||
throw | ( | ) |
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.
x | The optimization coordinate values. |
f | Variable that energy will be assigned to. |
g | Array that the gradient will be assigned to. |
References get_energy_and_gradient().
Referenced by get_energy_and_gradient().
::sidl::array< double > MPQC::ChemistryOpt_CoordinateModel_impl::get_gradient | ( | ::sidl::array< double > | x | ) | ||
throw | ( | ) |
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.
x | The optimization coordinate values. |
References get_gradient().
Referenced by get_gradient().
::sidl::array< double > MPQC::ChemistryOpt_CoordinateModel_impl::get_hessian | ( | ::sidl::array< double > | x | ) | ||
throw | ( | ) |
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.
x | The optimization coordinate values. |
References get_hessian().
Referenced by get_hessian().
::Chemistry::QC::Model MPQC::ChemistryOpt_CoordinateModel_impl::get_model | ( | ) | ||||
throw | ( | ) |
Returns the contained chemistry Model object.
References get_model().
Referenced by get_model().
int32_t MPQC::ChemistryOpt_CoordinateModel_impl::get_n_coor | ( | ) | ||||
throw | ( | ) |
Returns the number of coordinates.
References get_n_coor().
Referenced by get_n_coor().
void MPQC::ChemistryOpt_CoordinateModel_impl::guess_hessian_solve | ( | ::sidl::array< double > | effective_grad, | |||
::sidl::array< double > | effective_step, | |||||
void * | first_geom ) | |||||
throw | ( | ) |
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).
effective_grad | An effective gradient. |
effective_step | Array that effective step is assigned to. |
first_geom | Pointer to array of Cartesians |
References guess_hessian_solve().
Referenced by guess_hessian_solve().
int32_t MPQC::ChemistryOpt_CoordinateModel_impl::initialize | ( | ) | ||||
throw | ( | ) |
Registers and gets ports, and requests Model object(s) from the ModelFactory component(s).
This must be the first method called following instantiation.
void MPQC::ChemistryOpt_CoordinateModel_impl::monitor | ( | ) | ||||
throw | ( | ) |
void MPQC::ChemistryOpt_CoordinateModel_impl::set_model | ( | ::Chemistry::QC::Model | model | ) | ||
throw | ( | ) |
Sets the contained chemistry Model object (currently unused as the chemistry Model object is normally obtained from a ModelFactory during initialization).
model | The chemistry model object. |
References set_model().
Referenced by set_model().
void MPQC::ChemistryOpt_CoordinateModel_impl::setServices | ( | ::gov::cca::Services | services | ) | ||
throw | ( | ::gov::cca::CCAException ) |
Starts up a component presence in the calling framework.
Svc | the component instance's handle on the framework world. Contracts concerning Svc and setServices: |
The component interaction with the CCA framework and Ports begins on the call to setServices by the framework.
This function is called exactly once for each instance created by the framework.
The argument Svc will never be nil/null.
Those uses ports which are automatically connected by the framework (so-called service-ports) may be obtained via getPort during setServices.
References setServices().
Referenced by setServices().