MPQC  2.3.1
extent.h
1 //
2 // extent.h
3 //
4 
5 #ifndef _chemistry_qc_basis_extent_h
6 #define _chemistry_qc_basis_extent_h
7 
8 #ifdef __GNUC__
9 #pragma interface
10 #endif
11 
12 #include <vector>
13 
14 #include <float.h>
15 #include <chemistry/qc/basis/basis.h>
16 
17 namespace sc {
18 
19 struct ExtentData {
20  int shell;
21  double bound;
22  ExtentData() {}
23  ExtentData(int s, double b): shell(s), bound(b) {}
24 };
25 
26 class ShellExtent: public RefCount {
27  double lower_[3];
28  double resolution_;
29  int n_[3];
30  std::vector<ExtentData> *contributing_shells_;
31  std::vector<ExtentData> null_;
32 
33  std::vector<ExtentData> &data(int *b);
34  double distance(double loc, int axis, int origin, int point);
35  std::vector<ExtentData> &data(int x, int y, int z);
36  public:
37  ShellExtent();
38  ~ShellExtent();
39  void init(const Ref<GaussianBasisSet>&,
40  double resolution = 1.0, double tolerance = DBL_EPSILON);
43  const std::vector<ExtentData> &contributing_shells(int x, int y, int z)
44  { return data(x,y,z); }
45  const std::vector<ExtentData> &contributing_shells(double x, double y, double z);
46  void print(std::ostream &o = ExEnv::out0());
47  const int *n() const { return n_; }
48  int n(int ixyz) const { return n_[ixyz]; }
49  double lower(int ixyz) const { return lower_[ixyz]; }
50  double upper(int ixyz) const { return resolution_*n_[ixyz] + lower_[ixyz]; }
51  double resolution() const { return resolution_; }
52 };
53 
54 }
55 
56 #endif
57 
58 // Local Variables:
59 // mode: c++
60 // c-file-style: "CLJ"
61 // End:
sc::Ref< GaussianBasisSet >
sc::ExtentData
Definition: extent.h:19
sc::ShellExtent
Definition: extent.h:26
point
Definition: implicit.h:5
sc::ExEnv::out0
static std::ostream & out0()
Return an ostream that writes from node 0.
sc::ShellExtent::contributing_shells
const std::vector< ExtentData > & contributing_shells(int x, int y, int z)
Returns the shells that are nonzero at coordinates x, y, z.
Definition: extent.h:43
sc::RefCount
The base class for all reference counted objects.
Definition: ref.h:194

Generated at Sun Jan 26 2020 23:33:03 for MPQC 2.3.1 using the documentation package Doxygen 1.8.16.