Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

eri.h

00001 // 00002 // eri.h 00003 // 00004 // Copyright (C) 2001 Edward Valeev 00005 // 00006 // Author: Edward Valeev <edward.valeev@chemistry.gatech.edu> 00007 // Maintainer: EV 00008 // 00009 // This file is part of the SC Toolkit. 00010 // 00011 // The SC Toolkit is free software; you can redistribute it and/or modify 00012 // it under the terms of the GNU Library General Public License as published by 00013 // the Free Software Foundation; either version 2, or (at your option) 00014 // any later version. 00015 // 00016 // The SC Toolkit is distributed in the hope that it will be useful, 00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 // GNU Library General Public License for more details. 00020 // 00021 // You should have received a copy of the GNU Library General Public License 00022 // along with the SC Toolkit; see the file COPYING.LIB. If not, write to 00023 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 00024 // 00025 // The U.S. Government is granted a limited license as per AL 91-7. 00026 // 00027 00028 #ifdef __GNUG__ 00029 #pragma interface 00030 #endif 00031 00032 #ifndef _chemistry_qc_cints_eri_h 00033 #define _chemistry_qc_cints_eri_h 00034 00035 #include <limits.h> 00036 00037 #include <util/ref/ref.h> 00038 #include <chemistry/qc/basis/basis.h> 00039 #include <chemistry/qc/cints/shellpairs.h> 00040 #include <chemistry/qc/intv3/fjt.h> 00041 #include <chemistry/qc/cints/int2e.h> 00042 extern "C" { 00043 #include <libint/libint.h> 00044 } 00045 00046 namespace sc { 00047 00048 class Integral; 00049 00051 class EriCints: public Int2eCints { 00052 private: 00053 00054 // Storage for target integrals 00055 double *target_ints_buffer_; 00056 00057 /*--- Intermediate scratch arrays (may be used in new[] and delete[]) ---*/ 00058 double *cart_ints_; // cartesian integrals, in by-contraction-quartet order 00059 double *sphharm_ints_; // transformed integrals, in by-contraction-quartet order 00060 double *perm_ints_; // redundant target integrals in shell quartet order, shells permuted 00061 00062 /*--- Pointers to scratch arrays (never used in new[] and delete[]) ---*/ 00063 double *prim_ints_; // this points to the appropriate location for raw integrals 00064 double *contr_quartets_; 00065 double *shell_quartet_; 00066 00067 /*--- Precomputed data ---*/ 00068 Ref<ShellPairsCints> shell_pairs12_; 00069 Ref<ShellPairsCints> shell_pairs34_; 00070 00071 /*--- Internally used "interfaces" ---*/ 00072 struct { 00073 int p12, p34, p13p24; // flags indicating if functions were permuted 00074 ShellPairCints *shell_pair12, *shell_pair34; // Shell pairs corresponding to the original 00075 // (before permutation) order of shell 00076 int *op1, *op2, *op3, *op4; // pointers to the primitive indices in the original order 00078 double A[3], B[3], C[3], D[3]; 00079 double AB2, CD2; 00080 int gc1, gc2, gc3, gc4; 00081 int p1, p2, p3, p4; 00082 int am; 00083 } quartet_info_; 00084 void eri_quartet_data_(prim_data *Data, double scale); 00085 /*--- Compute engines ---*/ 00086 Libint_t Libint_; 00087 Ref<FJT> Fm_Eval_; 00088 00089 public: 00090 EriCints(Integral *, 00091 const Ref<GaussianBasisSet>&, 00092 const Ref<GaussianBasisSet>&, 00093 const Ref<GaussianBasisSet>&, 00094 const Ref<GaussianBasisSet>&, 00095 size_t storage); 00096 ~EriCints(); 00097 00098 double *buffer(TwoBodyInt::tbint_type te_type) const { 00099 if (te_type == TwoBodyInt::eri) return target_ints_buffer_; 00100 else return 0; 00101 } 00102 00103 static size_t storage_required(const Ref<GaussianBasisSet>& b1, 00104 const Ref<GaussianBasisSet>& b2 = 0, 00105 const Ref<GaussianBasisSet>& b3 = 0, 00106 const Ref<GaussianBasisSet>& b4 = 0); 00107 00108 // evaluate ERIs (Coulomb) 00109 void compute_quartet(int*, int*, int*, int*); 00110 }; 00111 00112 #include <chemistry/qc/cints/eri_quartet_data.h> 00113 00114 /* LibintStaticInterface is an initializer class for the static part 00115 of libint's interface (one per executable) */ 00116 class LibintStaticInterface { 00117 bool ready; 00118 00119 public: 00120 LibintStaticInterface() { init_libint_base(); ready = true; } 00121 ~LibintStaticInterface() { ready = false; } 00122 }; 00123 00124 } 00125 00126 #endif 00127 00128 // Local Variables: 00129 // mode: c++ 00130 // c-file-style: "CLJ" 00131 // End:

Generated at Sat Dec 18 15:14:21 2004 for MPQC 2.2.3 using the documentation package Doxygen 1.3.7-20040617.