1 //
2 // File:          NWChem_Chemistry_QC_ModelFactory_Impl.hh
3 // Symbol:        NWChem.Chemistry_QC_ModelFactory-v0.4
4 // Symbol Type:   class
5 // Babel Version: 0.10.12
6 // Description:   Server-side implementation for NWChem.Chemistry_QC_ModelFactory
7 //
8 // WARNING: Automatically generated; only changes within splicers preserved
9 //
10 // babel-version = 0.10.12
11 // xml-url       = /home/vidhya/CCA/mcmd-paper/nwchem/src/cca/repo/NWChem.Chemistry_QC_ModelFactory-v0.4.xml
12 //
13 
14 #ifndef included_NWChem_Chemistry_QC_ModelFactory_Impl_hh
15 #define included_NWChem_Chemistry_QC_ModelFactory_Impl_hh
16 
17 #ifndef included_sidl_cxx_hh
18 #include "sidl_cxx.hh"
19 #endif
20 #ifndef included_NWChem_Chemistry_QC_ModelFactory_IOR_h
21 #include "NWChem_Chemistry_QC_ModelFactory_IOR.h"
22 #endif
23 //
24 // Includes for all method dependencies.
25 //
26 #ifndef included_Chemistry_Molecule_hh
27 #include "Chemistry_Molecule.hh"
28 #endif
29 #ifndef included_Chemistry_QC_GaussianBasis_IntegralEvaluatorFactory_hh
30 #include "Chemistry_QC_GaussianBasis_IntegralEvaluatorFactory.hh"
31 #endif
32 #ifndef included_Chemistry_QC_Model_hh
33 #include "Chemistry_QC_Model.hh"
34 #endif
35 #ifndef included_NWChem_Chemistry_QC_ModelFactory_hh
36 #include "NWChem_Chemistry_QC_ModelFactory.hh"
37 #endif
38 #ifndef included_gov_cca_CCAException_hh
39 #include "gov_cca_CCAException.hh"
40 #endif
41 #ifndef included_gov_cca_Services_hh
42 #include "gov_cca_Services.hh"
43 #endif
44 #ifndef included_sidl_BaseException_hh
45 #include "sidl_BaseException.hh"
46 #endif
47 #ifndef included_sidl_BaseInterface_hh
48 #include "sidl_BaseInterface.hh"
49 #endif
50 #ifndef included_sidl_ClassInfo_hh
51 #include "sidl_ClassInfo.hh"
52 #endif
53 
54 
55 // DO-NOT-DELETE splicer.begin(NWChem.Chemistry_QC_ModelFactory._includes)
56 // Insert-Code-Here {NWChem.Chemistry_QC_ModelFactory._includes} (includes or arbitrary code)
57 #include <string>
58 #include "cca.h"
59 #include <gov_cca_ports_ParameterPortFactory.hh>
60 #include <gov_cca_ports_ParameterPort.hh>
61 #include "dc/babel/babel-cca/server/ccaffeine_TypeMap.hh"
62 #include "util/IO.h"
63 //#include "jc++/jc++.h"
64 //#include "jc++/util/jc++util.h"
65 #include "parameters/parametersStar.h"
66 #include "port/portInterfaces.h"
67 #include "port/supportInterfaces.h"
68 #include "NWChem_Chemistry_QC_Model_Impl.hh"
69 
70 #include "Chemistry_MoleculeFactory.hh"
71 // DO-NOT-DELETE splicer.end(NWChem.Chemistry_QC_ModelFactory._includes)
72 
73 namespace NWChem {
74 
75   /**
76    * Symbol "NWChem.Chemistry_QC_ModelFactory" (version 0.4)
77    */
78   class Chemistry_QC_ModelFactory_impl
79   // DO-NOT-DELETE splicer.begin(NWChem.Chemistry_QC_ModelFactory._inherits)
80   // Insert-Code-Here {NWChem.Chemistry_QC_ModelFactory._inherits} (optional inheritance here)
81   // DO-NOT-DELETE splicer.end(NWChem.Chemistry_QC_ModelFactory._inherits)
82   {
83 
84   private:
85     // Pointer back to IOR.
86     // Use this to dispatch back through IOR vtable.
87     Chemistry_QC_ModelFactory self;
88 
89     // DO-NOT-DELETE splicer.begin(NWChem.Chemistry_QC_ModelFactory._implementation)
90     // Insert-Code-Here {NWChem.Chemistry_QC_ModelFactory._implementation} (additional details)
91     std::string theory_;
92     std::string basis_;
93     std::string molecule_filename_;
94     std::string nwchem_filename_;
95     std::string config_filename_;
96     std::string scratch_directory_;
97     Chemistry::Molecule molecule_;
98     Chemistry::MoleculeFactory molecule_factory_;
99 
100     gov::cca::Services services_;
101 
102     //
103     // parameter stuff
104     //
105     gov::cca::Services myServices;
106     gov::cca::ports::ParameterPortFactory ppf_;
107     gov::cca::ports::ParameterPort pp_;
108 
109     StringParameter *scratchParameter;
110     StringParameter *coordParameter;
111     StringParameter *configParameter;
112     StringParameter *basisSetParameter;
113     StringParameter *theoryParameter;
114     BoolParameter *utest;
115     bool dynTestDone;  // dynamic parameter test
116 
117         //ConfigurableParameterPort*
118         //setupParameters(ConfigurableParameterFactory *cfp);
119         //extra public method
120   public:
121 
122         //bool updateParameterPort(ConfigurableParameterPort *opp);
123 
124     // DO-NOT-DELETE splicer.end(NWChem.Chemistry_QC_ModelFactory._implementation)
125 
126   private:
127     // private default constructor (required)
Chemistry_QC_ModelFactory_impl()128     Chemistry_QC_ModelFactory_impl()
129     {}
130 
131   public:
132     // sidl constructor (required)
133     // Note: alternate Skel constructor doesn't call addref()
134     // (fixes bug #275)
Chemistry_QC_ModelFactory_impl(struct NWChem_Chemistry_QC_ModelFactory__object * s)135     Chemistry_QC_ModelFactory_impl( struct
136       NWChem_Chemistry_QC_ModelFactory__object * s ) : self(s,true) { _ctor(); }
137 
138     // user defined construction
139     void _ctor();
140 
141     // virtual destructor (required)
~Chemistry_QC_ModelFactory_impl()142     virtual ~Chemistry_QC_ModelFactory_impl() { _dtor(); }
143 
144     // user defined destruction
145     void _dtor();
146 
147     // static class initializer
148     static void _load();
149 
150   public:
151 
152 
153     /**
154      * Set the theory name for Model's created with get_model.
155      * @param theory A string giving the name of the theory,
156      * for example, B3LYP.
157      */
158     void
159     set_theory (
160       /* in */ const ::std::string& theory
161     )
162     throw ()
163     ;
164 
165 
166     /**
167      * Set the basis set name for Model's created with get_model.
168      * @param basis The basis set name to use, for example, aug-cc-pVDZ.
169      */
170     void
171     set_basis (
172       /* in */ const ::std::string& basis
173     )
174     throw ()
175     ;
176 
177 
178     /**
179      * Set the Molecule to use for Model's created with get_model.
180      * @param molecule An object of type Molecule.
181      */
182     void
183     set_molecule (
184       /* in */ ::Chemistry::Molecule molecule
185     )
186     throw ()
187     ;
188 
189 
190     /**
191      * Set the object to use to compute integrals for Model's
192      * created with get_model.
193      * @param intfact An object of type
194      * GaussianBasis.IntegralEvaluatorFactory.
195      */
196     void
197     set_integral_factory (
198       /* in */ ::Chemistry::QC::GaussianBasis::IntegralEvaluatorFactory intfact
199     )
200     throw ()
201     ;
202 
203 
204     /**
205      * Returns a newly created Model.  Before get_model can be called,
206      * set_theory, set_basis, and set_molecule must be called.
207      * @return The new Model instance.
208      */
209     ::Chemistry::QC::Model
210     get_model() throw (
211       ::sidl::BaseException
212     );
213 
214     /**
215      * This can be called when this Model object is no longer needed.
216      * No other members may be called after finalize.
217      */
218     int32_t
219     finalize() throw ()
220     ;
221 
222     /**
223      * Starts up a component presence in the calling framework.
224      * @param services the component instance's handle on the framework world.
225      * Contracts concerning Svc and setServices:
226      *
227      * The component interaction with the CCA framework
228      * and Ports begins on the call to setServices by the framework.
229      *
230      * This function is called exactly once for each instance created
231      * by the framework.
232      *
233      * The argument Svc will never be nil/null.
234      *
235      * Those uses ports which are automatically connected by the framework
236      * (so-called service-ports) may be obtained via getPort during
237      * setServices.
238      */
239     void
240     setServices (
241       /* in */ ::gov::cca::Services services
242     )
243     throw (
244       ::gov::cca::CCAException
245     );
246 
247   };  // end class Chemistry_QC_ModelFactory_impl
248 
249 } // end namespace NWChem
250 
251 // DO-NOT-DELETE splicer.begin(NWChem.Chemistry_QC_ModelFactory._misc)
252 // Insert-Code-Here {NWChem.Chemistry_QC_ModelFactory._misc} (miscellaneous things)
253 // DO-NOT-DELETE splicer.end(NWChem.Chemistry_QC_ModelFactory._misc)
254 
255 #endif
256