MPQC  3.0.0-alpha
bounds.h
1 //
2 // bounds.h
3 //
4 // Copyright (C) 2007 Edward Valeev
5 //
6 // Author: Edward Valeev <evaleev@vt.edu>
7 // Maintainer: EV
8 //
9 // This file is part of the SC Toolkit.
10 //
11 // The SC Toolkit is free software; you can redistribute it and/or modify
12 // it under the terms of the GNU Library General Public License as published by
13 // the Free Software Foundation; either version 2, or (at your option)
14 // any later version.
15 //
16 // The SC Toolkit is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU Library General Public License for more details.
20 //
21 // You should have received a copy of the GNU Library General Public License
22 // along with the SC Toolkit; see the file COPYING.LIB. If not, write to
23 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24 //
25 // The U.S. Government is granted a limited license as per AL 91-7.
26 //
27 
28 #ifndef _chemistry_qc_libint2_bounds_h
29 #define _chemistry_qc_libint2_bounds_h
30 
31 #include <util/misc/scexception.h>
32 #include <chemistry/qc/basis/intparams.h>
33 #include <chemistry/qc/libint2/int2e.h>
34 
35 namespace sc {
36 
38  class Log2Bounds : virtual public RefCount {
39  protected:
40  // Set to non-zero to debug this and derived classes
41  static const int debugclass_ = 0;
42  public:
43  typedef signed char int_bound_t;
44  enum { int_bound_min = SCHAR_MIN, int_bound_max = SCHAR_MAX };
45  Log2Bounds() {}
46  virtual ~Log2Bounds() {}
47 
49  virtual int log2_bound(int sh1, int sh2, int sh3, int sh4) const =0;
50  static int_bound_t bound_cast(double);
51  };
52 
54  template <class Int2e>
55  class BoundsLibint2 : public Log2Bounds {
56  public:
57  typedef Log2Bounds::int_bound_t int_bound_t;
58 
59  BoundsLibint2(Integral*integral,
60  const Ref<GaussianBasisSet>& b1,
61  const Ref<GaussianBasisSet>& b2,
62  const Ref<GaussianBasisSet>& b3,
63  const Ref<GaussianBasisSet>& b4,
64  size_t storage,
65  const Ref<IntParams>& params);
66  ~BoundsLibint2();
67 
68  int log2_bound(int sh1, int sh2, int sh3, int sh4) const;
69 
70  private:
71  std::vector<int_bound_t> Q12_;
72  std::vector<int_bound_t> Q34_;
73  int nsh2_;
74  int nsh4_;
75  bool equiv_12_34_;
76  bool equiv_12_43_;
77  bool equiv_1_2_;
78  bool equiv_3_4_;
79 
80  };
81 
82 }
83 
84 #endif // header guard
85 
86 // Local Variables:
87 // mode: c++
88 // c-file-style: "CLJ"
89 // End:
sc::Ref
A template class that maintains references counts.
Definition: ref.h:361
sc::Log2Bounds::log2_bound
virtual int log2_bound(int sh1, int sh2, int sh3, int sh4) const =0
computes bound for a given type of integrals
sc::Integral
The Integral abstract class acts as a factory to provide objects that compute one and two electron in...
Definition: integral.h:111
sc::RefCount
The base class for all reference counted objects.
Definition: ref.h:192
sc::BoundsLibint2
Computes log2 bounds for a particular Int2e evaluator.
Definition: bounds.h:55
sc::Log2Bounds
Computes log2 bounds.
Definition: bounds.h:38
sc
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
sc::BoundsLibint2::log2_bound
int log2_bound(int sh1, int sh2, int sh3, int sh4) const
computes bound for a given type of integrals
Definition: bounds.timpl.h:191

Generated at Sun Jan 26 2020 23:23:58 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.