00001
00002
00003
00004
00005 #ifndef _chemistry_qc_basis_extent_h
00006 #define _chemistry_qc_basis_extent_h
00007
00008 #ifdef __GNUC__
00009 #pragma interface
00010 #endif
00011
00012 #include <float.h>
00013 #include <chemistry/qc/basis/basis.h>
00014
00015 namespace sc {
00016
00017 struct ExtentData {
00018 int shell;
00019 double bound;
00020 ExtentData() {}
00021 ExtentData(int s, double b): shell(s), bound(b) {}
00022 };
00023
00024 ARRAY_dec(ExtentData);
00025
00026 class ShellExtent: public RefCount {
00027 double lower_[3];
00028 double resolution_;
00029 int n_[3];
00030 ArrayExtentData *contributing_shells_;
00031 ArrayExtentData null_;
00032
00033 ArrayExtentData &data(int *b);
00034 double distance(double loc, int axis, int origin, int point);
00035 ArrayExtentData &data(int x, int y, int z);
00036 public:
00037 ShellExtent();
00038 ~ShellExtent();
00039 void init(const Ref<GaussianBasisSet>&,
00040 double resolution = 1.0, double tolerance = DBL_EPSILON);
00043 const ArrayExtentData &contributing_shells(int x, int y, int z)
00044 { return data(x,y,z); }
00045 const ArrayExtentData &contributing_shells(double x, double y, double z);
00046 void print(std::ostream &o = ExEnv::out0());
00047 const int *n() const { return n_; }
00048 int n(int ixyz) const { return n_[ixyz]; }
00049 double lower(int ixyz) const { return lower_[ixyz]; }
00050 double resolution() const { return resolution_; }
00051 };
00052
00053 }
00054
00055 #endif
00056
00057
00058
00059
00060