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 #ifdef __GNUG__
00029 #pragma interface
00030 #endif
00031
00032 #ifndef _chemistry_qc_libint2_bounds_h
00033 #define _chemistry_qc_libint2_bounds_h
00034
00035 #include <util/class/scexception.h>
00036 #include <chemistry/qc/basis/intparams.h>
00037 #include <chemistry/qc/libint2/int2e.h>
00038
00039 namespace sc {
00040
00042 class Log2Bounds : virtual public RefCount {
00043 protected:
00044
00045 static const int debugclass_ = 0;
00046 public:
00047 typedef signed char int_bound_t;
00048 enum { int_bound_min = SCHAR_MIN, int_bound_max = SCHAR_MAX };
00049 Log2Bounds() {}
00050 virtual ~Log2Bounds() {}
00051
00052 virtual int log2_bound(int sh1, int sh2, int sh3, int sh4) const =0;
00053 static int_bound_t bound_cast(double);
00054 };
00055
00057 template <class Int2e>
00058 class BoundsLibint2 : public Log2Bounds {
00059 public:
00060 typedef Log2Bounds::int_bound_t int_bound_t;
00061
00062 BoundsLibint2(Integral*integral,
00063 const Ref<GaussianBasisSet>& b1,
00064 const Ref<GaussianBasisSet>& b2,
00065 const Ref<GaussianBasisSet>& b3,
00066 const Ref<GaussianBasisSet>& b4,
00067 size_t storage,
00068 const Ref<IntParams>& params);
00069 ~BoundsLibint2();
00070
00072 int log2_bound(int sh1, int sh2, int sh3, int sh4) const;
00073
00074 private:
00075 std::vector<int_bound_t> Q12_;
00076 std::vector<int_bound_t> Q34_;
00077 int nsh2_;
00078 int nsh4_;
00079 bool equiv_12_34_;
00080 bool equiv_12_43_;
00081 bool equiv_1_2_;
00082 bool equiv_3_4_;
00083
00084 };
00085
00086 }
00087
00088 #endif // header guard
00089
00090
00091
00092
00093