13#ifndef included_MPQC_ChemistryOpt_CoordinateModel_Impl_hh
14#define included_MPQC_ChemistryOpt_CoordinateModel_Impl_hh
16#ifndef included_sidl_cxx_hh
19#ifndef included_MPQC_ChemistryOpt_CoordinateModel_IOR_h
20#include "MPQC_ChemistryOpt_CoordinateModel_IOR.h"
25#ifndef included_Chemistry_QC_Model_hh
26#include "Chemistry_QC_Model.hh"
28#ifndef included_MPQC_ChemistryOpt_CoordinateModel_hh
29#include "MPQC_ChemistryOpt_CoordinateModel.hh"
31#ifndef included_gov_cca_CCAException_hh
32#include "gov_cca_CCAException.hh"
34#ifndef included_gov_cca_Services_hh
35#include "gov_cca_Services.hh"
37#ifndef included_sidl_BaseInterface_hh
38#include "sidl_BaseInterface.hh"
40#ifndef included_sidl_ClassInfo_hh
41#include "sidl_ClassInfo.hh"
46#include <Chemistry_MoleculeViewer.hh>
47#include <Chemistry_QC_ModelFactory.hh>
48#include <chemistry/molecule/coor.h>
49#include "CoordinateModel.h"
50#include "Chemistry_Chemistry_Molecule.hh"
52#include "dc/babel/babel-cca/server/ccaffeine_TypeMap.hh"
53#include "dc/babel/babel-cca/server/ccaffeine_ports_PortTranslator.hh"
56#include "jc++/util/jc++util.h"
57#include "parameters/parametersStar.h"
58#include "port/portInterfaces.h"
59#include "port/supportInterfaces.h"
67 class ChemistryOpt_CoordinateModel_impl
69 :
public CcaChemGeneric::CoordinateModel
124 ChemistryOpt_CoordinateModel self;
127 gov::cca::Services services_;
128 CcaChemGeneric::CoordinateModel genericModel_;
129 Chemistry::QC::Model model_;
130 Chemistry::Chemistry_Molecule molecule_;
136 DoubleParameter *grad_rms_, *grad_max_, *disp_rms_, *disp_max_;
137 BoolParameter *multiple_guess_h_, *use_current_geom_;
138 StringParameter *coordinates_;
139 StringParameter *extra_bonds_;
142 enum {cart,symm,redund};
147 ConfigurableParameterPort*
148 setup_parameters(ConfigurableParameterFactory *);
155 ChemistryOpt_CoordinateModel_impl()
162 ChemistryOpt_CoordinateModel_impl(
struct
163 MPQC_ChemistryOpt_CoordinateModel__object * s ) : self(s,
170 virtual ~ChemistryOpt_CoordinateModel_impl() { _dtor(); }
206 ::Chemistry::QC::Model model
216 ::Chemistry::QC::Model
233 ::sidl::array<
double>
249 ::sidl::array<
double> x
266 ::sidl::array<
double>
268 ::sidl::array<
double> x
285 ::sidl::array<
double>
287 ::sidl::array<
double> x
308 ::sidl::array<
double> x,
310 ::sidl::array<
double> g
329 ::sidl::array<
double> effective_grad,
330 ::sidl::array<
double> effective_step,
379 ::gov::cca::Services services
382 ::gov::cca::CCAException
int32_t get_n_coor()
Returns the number of coordinates.
int32_t finalize()
Releases and unregisters ports.
void monitor()
For visualization, possibly unused (?).
void set_model(::Chemistry::QC::Model model)
Sets the contained chemistry Model object (currently unused as the chemistry Model object is normally...
::sidl::array< double > get_gradient(::sidl::array< double > x)
Returns the energy gradient of the currently contained model with the values of the optimization coor...
void setServices(::gov::cca::Services services)
Starts up a component presence in the calling framework.
::sidl::array< double > get_hessian(::sidl::array< double > x)
Returns the energy Hessian of the currently contained model with the values of the optimization coord...
::Chemistry::QC::Model get_model()
Returns the contained chemistry Model object.
::sidl::array< double > get_coor()
Returns the array of (cartesian or internal) coordinates which are being optimized.
int32_t initialize()
Registers and gets ports, and requests Model object(s) from the ModelFactory component(s).
void guess_hessian_solve(::sidl::array< double > effective_grad, ::sidl::array< double > effective_step, void *first_geom)
Returns the product of the guess hessian inverse and an effective gradient.
void get_energy_and_gradient(::sidl::array< double > x, double &f, ::sidl::array< double > g)
Sets f and g to the energy and energy gradient, respectively, of the chemistry model at x.
double get_energy(::sidl::array< double > x)
Returns the energy of the currently contained model with the values of the optimization coordinates g...
void checkConvergence(int32_t &flag)
Determines if the optimization has converged, flag is set to 1 if convergence has been achieved and 0...
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