source: ThirdParty/mpqc_open/src/lib/chemistry/qc/basis/extent.h

Candidate_v1.6.1
Last change on this file was 860145, checked in by Frederik Heber <heber@…>, 8 years ago

Merge commit '0b990dfaa8c6007a996d030163a25f7f5fc8a7e7' as 'ThirdParty/mpqc_open'

  • Property mode set to 100644
File size: 1.6 KB
Line 
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
17namespace sc {
18
19struct ExtentData {
20 int shell;
21 double bound;
22 ExtentData() {}
23 ExtentData(int s, double b): shell(s), bound(b) {}
24};
25
26class 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);
41 /** Returns the shells that are nonzero at coordinates x, y, z.
42 The shells numbers are in ascending order. */
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:
Note: See TracBrowser for help on using the repository browser.