00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _chemistry_cca_molecule_energy_h
00029 #define _chemistry_cca_molecule_energy_h
00030
00031 #ifdef __GNUC__
00032 #pragma interface
00033 #endif
00034
00035 #include <iostream>
00036
00037 #include <util/misc/ccaenv.h>
00038 #include <math/optimize/function.h>
00039 #include <chemistry/molecule/energy.h>
00040 #include <chemistry/molecule/molecule.h>
00041 #include <chemistry/molecule/hess.h>
00042
00043 #include <Chemistry_QC_ModelFactoryInterface.hxx>
00044 #include <ChemistryOpt_CoordinateModelInterface.hxx>
00045
00046 namespace sc {
00047
00052 class MolecularEnergyCCA: public MolecularEnergy {
00053
00054 private:
00055 std::string factory_name_;
00056 std::string coor_model_name_;
00057 Chemistry::MoleculeInterface cca_molecule_;
00058 ChemistryOpt::CoordinateModelInterface coor_model_;
00059 Chemistry::QC::ModelFactoryInterface factory_;
00060 gov::cca::ComponentID cm_id_;
00061 gov::cca::ComponentID fac_id_;
00062 gov::cca::ConnectionID con1_;
00063 gov::cca::ConnectionID con2_;
00064 sidl::array<double> sidlx_;
00065 sidl::array<double> sidlg_;
00066 RefSCDimension scdim_;
00067
00068
00069 protected:
00070
00071 public:
00072 MolecularEnergyCCA(const MolecularEnergyCCA&);
00073 MolecularEnergyCCA(const Ref<KeyVal>&);
00074 MolecularEnergyCCA(StateIn&);
00075 ~MolecularEnergyCCA();
00076
00077 void save_data_state(StateOut&);
00078 int value_implemented() const { return 1; }
00079 int gradient_implemented() const { return 1; }
00080 int hessian_implemented() const { return 1; }
00081 void init_model();
00082 void compute();
00083 void set_x(const RefSCVector& v);
00084 };
00085
00086 }
00087
00088 #endif