1 // 2 // File: MPQC_IntegralEvaluator4_Impl.hh 3 // Symbol: MPQC.IntegralEvaluator4-v0.2 4 // Symbol Type: class 5 // Babel Version: 0.10.2 6 // Description: Server-side implementation for MPQC.IntegralEvaluator4 7 // 8 // WARNING: Automatically generated; only changes within splicers preserved 9 // 10 // babel-version = 0.10.2 11 // 12 13 #ifndef included_MPQC_IntegralEvaluator4_Impl_hh 14 #define included_MPQC_IntegralEvaluator4_Impl_hh 15 16 #ifndef included_sidl_cxx_hh 17 #include "sidl_cxx.hh" 18 #endif 19 #ifndef included_MPQC_IntegralEvaluator4_IOR_h 20 #include "MPQC_IntegralEvaluator4_IOR.h" 21 #endif 22 // 23 // Includes for all method dependencies. 24 // 25 #ifndef included_Chemistry_QC_GaussianBasis_DerivCenters_hh 26 #include "Chemistry_QC_GaussianBasis_DerivCenters.hh" 27 #endif 28 #ifndef included_Chemistry_QC_GaussianBasis_Molecular_hh 29 #include "Chemistry_QC_GaussianBasis_Molecular.hh" 30 #endif 31 #ifndef included_MPQC_IntegralEvaluator4_hh 32 #include "MPQC_IntegralEvaluator4.hh" 33 #endif 34 #ifndef included_sidl_BaseInterface_hh 35 #include "sidl_BaseInterface.hh" 36 #endif 37 #ifndef included_sidl_ClassInfo_hh 38 #include "sidl_ClassInfo.hh" 39 #endif 40 41 42 // DO-NOT-DELETE splicer.begin(MPQC.IntegralEvaluator4._includes) 43 #include <chemistry/qc/basis/gaussbas.h> 44 #include <chemistry/qc/intv3/cartitv3.h> 45 #include <chemistry/qc/intv3/intv3.h> 46 #ifdef HAVE_CINTS 47 #include <chemistry/qc/cints/cints.h> 48 #endif 49 using namespace sc; 50 // DO-NOT-DELETE splicer.end(MPQC.IntegralEvaluator4._includes) 51 52 namespace MPQC { 53 54 /** 55 * Symbol "MPQC.IntegralEvaluator4" (version 0.2) 56 */ 57 class IntegralEvaluator4_impl 58 // DO-NOT-DELETE splicer.begin(MPQC.IntegralEvaluator4._inherits) 59 60 /** IntegralEvaluator4_impl implements a class interface for 61 supplying 4-center molecular integrals. 62 63 This is an implementation of a SIDL interface. 64 The stub code is generated by the Babel tool. Do not make 65 modifications outside of splicer blocks, as these will be lost. 66 This is a server implementation for a Babel class, the Babel 67 client code is provided by the cca-chem-generic package. 68 */ 69 70 // Put additional inheritance here... 71 // DO-NOT-DELETE splicer.end(MPQC.IntegralEvaluator4._inherits) 72 { 73 74 private: 75 // Pointer back to IOR. 76 // Use this to dispatch back through IOR vtable. 77 IntegralEvaluator4 self; 78 79 // DO-NOT-DELETE splicer.begin(MPQC.IntegralEvaluator4._implementation) 80 Chemistry::Molecule molecule_; 81 std::string evaluator_label_; 82 Ref<sc::GaussianBasisSet> bs1_; 83 Ref<sc::GaussianBasisSet> bs2_; 84 Ref<sc::GaussianBasisSet> bs3_; 85 Ref<sc::GaussianBasisSet> bs4_; 86 Ref<sc::Integral> integral_; 87 Ref<sc::TwoBodyInt> eval_; 88 Ref<sc::TwoBodyDerivInt> deriv_eval_; 89 int max_nshell4_; 90 sidl::array<double> sidl_buffer_; 91 const double* sc_buffer_; 92 enum { two_body, two_body_deriv}; 93 int int_type_; 94 int deriv_level_; 95 std::string package_; 96 97 // reorder stuff 98 int bufn_; 99 int **reorder_; 100 double *buf_; 101 double *temp_buffer_; 102 int index_, con2_offset_, con3_offset_, con4_offset_, con_offset_, 103 local2_offset_, local3_offset_, local4_offset_, 104 c1_base_, c2_base_, c3_base_, c4_base_, 105 s1_is_cart_, s2_is_cart_, s3_is_cart_, s4_is_cart_, 106 s1_nfunc_, s2_nfunc_, s3_nfunc_, s4_nfunc_, 107 nc1_, nc2_, nc3_, nc4_; 108 sc::GaussianShell *s1_, *s2_, *s3_, *s4_; 109 110 void reorder_intv3(int64_t,int64_t,int64_t,int64_t); 111 void reorder_quartet( sc::GaussianShell*, sc::GaussianShell*, 112 sc::GaussianShell*, sc::GaussianShell*, 113 int, int, int, int, int ); 114 void reorder_intv3_inline(int64_t,int64_t,int64_t,int64_t); 115 void initialize_reorder_intv3(); 116 void reorder_c4(int,int,int,int,int,int); 117 // DO-NOT-DELETE splicer.end(MPQC.IntegralEvaluator4._implementation) 118 119 private: 120 // private default constructor (required) IntegralEvaluator4_impl()121 IntegralEvaluator4_impl() 122 {} 123 124 public: 125 // sidl constructor (required) 126 // Note: alternate Skel constructor doesn't call addref() 127 // (fixes bug #275) IntegralEvaluator4_impl(struct MPQC_IntegralEvaluator4__object * s)128 IntegralEvaluator4_impl( struct MPQC_IntegralEvaluator4__object * s ) : 129 self(s,true) { _ctor(); } 130 131 // user defined construction 132 void _ctor(); 133 134 // virtual destructor (required) ~IntegralEvaluator4_impl()135 virtual ~IntegralEvaluator4_impl() { _dtor(); } 136 137 // user defined destruction 138 void _dtor(); 139 140 // static class initializer 141 static void _load(); 142 143 public: 144 145 /** 146 * user defined non-static method. 147 */ 148 void 149 set_integral_package ( 150 /* in */ const ::std::string& label 151 ) 152 throw () 153 ; 154 155 156 /** 157 * Initialize the evaluator. 158 * @param bs1 Molecular basis on center 1. 159 * @param bs2 Molecular basis on center 2. 160 * @param bs3 Molecular basis on center 3. 161 * @param bs4 Molecular basis on center 4. 162 * @param label String specifying integral type. 163 * @param max_deriv Max derivative to compute. 164 */ 165 void 166 initialize ( 167 /* in */ ::Chemistry::QC::GaussianBasis::Molecular bs1, 168 /* in */ ::Chemistry::QC::GaussianBasis::Molecular bs2, 169 /* in */ ::Chemistry::QC::GaussianBasis::Molecular bs3, 170 /* in */ ::Chemistry::QC::GaussianBasis::Molecular bs4, 171 /* in */ const ::std::string& label, 172 /* in */ int64_t max_deriv 173 ) 174 throw () 175 ; 176 177 178 /** 179 * Get the buffer pointer. 180 * @return Buffer pointer. 181 */ 182 void* 183 get_buffer() throw () 184 ; 185 186 /** 187 * Compute a shell quartet of integrals. 188 * @param shellnum1 Gaussian shell number 1. 189 * @param shellnum2 Gaussian shell number 2. 190 * @param shellnum3 Gaussian shell number 3. 191 * @param shellnum4 Gaussian shell number 4. 192 * @param deriv_level Derivative level. 193 * @param deriv_ctr Derivative center descriptor. 194 */ 195 void 196 compute ( 197 /* in */ int64_t shellnum1, 198 /* in */ int64_t shellnum2, 199 /* in */ int64_t shellnum3, 200 /* in */ int64_t shellnum4, 201 /* in */ int64_t deriv_level, 202 /* in */ ::Chemistry::QC::GaussianBasis::DerivCenters deriv_ctr 203 ) 204 throw () 205 ; 206 207 208 /** 209 * Compute a shell quartet of integrals and return as a borrowed 210 * sidl array. 211 * @param shellnum1 Gaussian shell number 1. 212 * @param shellnum2 Gaussian shell number 2. 213 * @param shellnum3 Guassian shell number 3. 214 * @param shellnum4 Gaussian shell number 4. 215 * @param deriv_level Derivative level. 216 * @param deriv_ctr Derivative center descriptor. 217 * @return Borrowed sidl array buffer. 218 */ 219 ::sidl::array<double> 220 compute_array ( 221 /* in */ int64_t shellnum1, 222 /* in */ int64_t shellnum2, 223 /* in */ int64_t shellnum3, 224 /* in */ int64_t shellnum4, 225 /* in */ int64_t deriv_level, 226 /* in */ ::Chemistry::QC::GaussianBasis::DerivCenters deriv_ctr 227 ) 228 throw () 229 ; 230 231 }; // end class IntegralEvaluator4_impl 232 233 } // end namespace MPQC 234 235 // DO-NOT-DELETE splicer.begin(MPQC.IntegralEvaluator4._misc) 236 // Put miscellaneous things here... 237 // DO-NOT-DELETE splicer.end(MPQC.IntegralEvaluator4._misc) 238 239 #endif 240