MPQC  3.0.0-alpha
extent.h
1 //
2 // extent.h
3 //
4 
5 #ifndef _chemistry_qc_basis_extent_h
6 #define _chemistry_qc_basis_extent_h
7 
8 #include <vector>
9 
10 #include <float.h>
11 #include <chemistry/qc/basis/basis.h>
12 
13 namespace sc {
14 
15 struct ExtentData {
16  int shell;
17  double bound;
18  ExtentData() {}
19  ExtentData(int s, double b): shell(s), bound(b) {}
20 };
21 
22 class ShellExtent: public RefCount {
23  double lower_[3];
24  double resolution_;
25  int n_[3];
26  std::vector<ExtentData> *contributing_shells_;
27  std::vector<ExtentData> null_;
28 
29  std::vector<ExtentData> &data(int *b);
30  double distance(double loc, int axis, int origin, int point);
31  std::vector<ExtentData> &data(int x, int y, int z);
32  public:
33  ShellExtent();
34  ~ShellExtent();
35  void init(const Ref<GaussianBasisSet>&,
36  double resolution = 1.0, double tolerance = DBL_EPSILON);
39  const std::vector<ExtentData> &contributing_shells(int x, int y, int z)
40  { return data(x,y,z); }
41  const std::vector<ExtentData> &contributing_shells(double x, double y, double z);
42  void print(std::ostream &o = ExEnv::out0());
43  const int *n() const { return n_; }
44  int n(int ixyz) const { return n_[ixyz]; }
45  double lower(int ixyz) const { return lower_[ixyz]; }
46  double upper(int ixyz) const { return resolution_*n_[ixyz] + lower_[ixyz]; }
47  double resolution() const { return resolution_; }
48 };
49 
50 }
51 
52 #endif
53 
54 // Local Variables:
55 // mode: c++
56 // c-file-style: "CLJ"
57 // End:
sc::Ref
A template class that maintains references counts.
Definition: ref.h:361
sc::ExtentData
Definition: extent.h:15
sc::ShellExtent
Definition: extent.h:22
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:39
sc::RefCount
The base class for all reference counted objects.
Definition: ref.h:192
sc
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14

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