MPQC 2.3.1

- Main Page
- Related Pages
- Classes
- Files

- File List

MPQC_ChemistryOpt_CoordinateModel_Impl.hh
1 //
2 // File: MPQC_ChemistryOpt_CoordinateModel_Impl.hh
3 // Symbol: MPQC.ChemistryOpt_CoordinateModel-v0.2
4 // Symbol Type: class
5 // Babel Version: 0.10.2
6 // Description: Server-side implementation for MPQC.ChemistryOpt_CoordinateModel
7 //
8 // WARNING: Automatically generated; only changes within splicers preserved
9 //
10 // babel-version = 0.10.2
11 //
12
13 #ifndef included_MPQC_ChemistryOpt_CoordinateModel_Impl_hh
14 #define included_MPQC_ChemistryOpt_CoordinateModel_Impl_hh
15
16 #ifndef included_sidl_cxx_hh
17 #include "sidl_cxx.hh"
18 #endif
19 #ifndef included_MPQC_ChemistryOpt_CoordinateModel_IOR_h
20 #include "MPQC_ChemistryOpt_CoordinateModel_IOR.h"
21 #endif
22 //
23 // Includes for all method dependencies.
24 //
25 #ifndef included_Chemistry_QC_Model_hh
26 #include "Chemistry_QC_Model.hh"
27 #endif
28 #ifndef included_MPQC_ChemistryOpt_CoordinateModel_hh
29 #include "MPQC_ChemistryOpt_CoordinateModel.hh"
30 #endif
31 #ifndef included_gov_cca_CCAException_hh
32 #include "gov_cca_CCAException.hh"
33 #endif
34 #ifndef included_gov_cca_Services_hh
35 #include "gov_cca_Services.hh"
36 #endif
37 #ifndef included_sidl_BaseInterface_hh
38 #include "sidl_BaseInterface.hh"
39 #endif
40 #ifndef included_sidl_ClassInfo_hh
41 #include "sidl_ClassInfo.hh"
42 #endif
43
44
45 // DO-NOT-DELETE splicer.begin(MPQC.ChemistryOpt_CoordinateModel._includes)
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"
51 #include "cca.h"
52 #include "dc/babel/babel-cca/server/ccaffeine_TypeMap.hh"
53 #include "dc/babel/babel-cca/server/ccaffeine_ports_PortTranslator.hh"
54 #include "util/IO.h"
55 #include "jc++/jc++.h"
56 #include "jc++/util/jc++util.h"
57 #include "parameters/parametersStar.h"
58 #include "port/portInterfaces.h"
59 #include "port/supportInterfaces.h"
60 // DO-NOT-DELETE splicer.end(MPQC.ChemistryOpt_CoordinateModel._includes)
61
62 namespace MPQC {
63
67 class ChemistryOpt_CoordinateModel_impl
68 // DO-NOT-DELETE splicer.begin(MPQC.ChemistryOpt_CoordinateModel._inherits)
69 : public CcaChemGeneric::CoordinateModel
70
118 // DO-NOT-DELETE splicer.end(MPQC.ChemistryOpt_CoordinateModel._inherits)
119 {
120
121 private:
122 // Pointer back to IOR.
123 // Use this to dispatch back through IOR vtable.
124 ChemistryOpt_CoordinateModel self;
125
126 // DO-NOT-DELETE splicer.begin(MPQC.ChemistryOpt_CoordinateModel._implementation)
127 gov::cca::Services services_;
128 CcaChemGeneric::CoordinateModel genericModel_;
129 Chemistry::QC::Model model_;
130 Chemistry::Chemistry_Molecule molecule_;
131 sc::Ref<sc::MolecularCoor> scCoor_;
132 sc::Ref<sc::Molecule> scMol_;
133 sc::Ref<sc::SCMatrixKit> kit_;
134 sc::Ref<sc::SCMatrixKit> rkit_;
135 sc::RefSymmSCMatrix ihess_;
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_;
140 double convFrom_;
141 bool have_guess_h_;
142 enum {cart,symm,redund};
143 int coorType_;
144 int numCoor_;
145 int natom3_;
146
147 ConfigurableParameterPort*
148 setup_parameters(ConfigurableParameterFactory *);
149
150 void draw();
151 // DO-NOT-DELETE splicer.end(MPQC.ChemistryOpt_CoordinateModel._implementation)
152
153 private:
154 // private default constructor (required)
155 ChemistryOpt_CoordinateModel_impl()
156 {}
157
158 public:
159 // sidl constructor (required)
160 // Note: alternate Skel constructor doesn't call addref()
161 // (fixes bug #275)
162 ChemistryOpt_CoordinateModel_impl( struct
163 MPQC_ChemistryOpt_CoordinateModel__object * s ) : self(s,
164 true) { _ctor(); }
165
166 // user defined construction
167 void _ctor();
168
169 // virtual destructor (required)
170 virtual ~ChemistryOpt_CoordinateModel_impl() { _dtor(); }
171
172 // user defined destruction
173 void _dtor();
174
175 // static class initializer
176 static void _load();
177
178 public:
179
180
186 int32_t
187 initialize() throw ()
188 ;
189
194 int32_t
195 finalize() throw ()
196 ;
197
204 void
205 set_model (
206 /* in */ ::Chemistry::QC::Model model
207 )
208 throw ()
209 ;
210
211
216 ::Chemistry::QC::Model
217 get_model() throw ()
218 ;
219
224 int32_t
225 get_n_coor() throw ()
226 ;
227
233 ::sidl::array<double>
234 get_coor() throw ()
235 ;
236
247 double
248 get_energy (
249 /* in */ ::sidl::array<double> x
250 )
251 throw ()
252 ;
253
254
266 ::sidl::array<double>
267 get_gradient (
268 /* in */ ::sidl::array<double> x
269 )
270 throw ()
271 ;
272
273
285 ::sidl::array<double>
286 get_hessian (
287 /* in */ ::sidl::array<double> x
288 )
289 throw ()
290 ;
291
292
306 void
307 get_energy_and_gradient (
308 /* in */ ::sidl::array<double> x,
309 /* out */ double& f,
310 /* in */ ::sidl::array<double> g
311 )
312 throw ()
313 ;
314
315
327 void
328 guess_hessian_solve (
329 /* in */ ::sidl::array<double> effective_grad,
330 /* in */ ::sidl::array<double> effective_step,
331 /* in */ void* first_geom
332 )
333 throw ()
334 ;
335
336
342 void
343 checkConvergence (
344 /* inout */ int32_t& flag
345 )
346 throw ()
347 ;
348
349
356 void
357 monitor() throw ()
358 ;
359
377 void
378 setServices (
379 /* in */ ::gov::cca::Services services
380 )
381 throw (
382 ::gov::cca::CCAException
383 );
384
385 }; // end class ChemistryOpt_CoordinateModel_impl
386
387 } // end namespace MPQC
388
389 // DO-NOT-DELETE splicer.begin(MPQC.ChemistryOpt_CoordinateModel._misc)
390 // Put miscellaneous things here...
391 // DO-NOT-DELETE splicer.end(MPQC.ChemistryOpt_CoordinateModel._misc)
392
393 #endif