00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _chemistry_qc_basis_gaussshell_h
00029 #define _chemistry_qc_basis_gaussshell_h
00030
00031 #ifdef __GNUC__
00032 #pragma interface
00033 #endif
00034
00035 #include <iostream>
00036 #include <util/state/state.h>
00037 #include <math/scmat/vector3.h>
00038 #include <util/keyval/keyval.h>
00039
00040 class CartesianIter;
00041 class SphericalTransformIter;
00042 class Integral;
00043
00045 class GaussianShell: public SavableState
00046 {
00047 public:
00048 enum PrimitiveType { Normalized, Unnormalized };
00049 enum GaussianType { Cartesian, Pure };
00050 private:
00051 int nprim;
00052 int ncon;
00053 int* l;
00054 int* puream;
00055 double* exp;
00056 double** coef;
00057
00058
00059 int nfunc;
00060 int min_am_;
00061 int max_am_;
00062 int ncart_;
00063 int has_pure_;
00064 void init_computed_data();
00065
00066 double shell_normalization(int);
00067 void convert_coef();
00068 void normalize_shell();
00069 PrimitiveType keyval_init(const Ref<KeyVal>&,int,int);
00070 static const char* amtypes;
00071 static const char* AMTYPES;
00072
00073 int test_monobound(double &r, double &bound) const;
00074 public:
00092 GaussianShell(
00093 int ncn,
00094 int nprm,
00095 double* e,
00096 int* am,
00097 int* pure,
00098 double** c,
00099 PrimitiveType pt = GaussianShell::Normalized);
00104 GaussianShell(
00105 int ncn,
00106 int nprm,
00107 double* e,
00108 int* am,
00109 GaussianType pure,
00110 double** c,
00111 PrimitiveType pt = GaussianShell::Normalized);
00113 GaussianShell(const Ref<KeyVal>&);
00115 GaussianShell(StateIn&);
00119 GaussianShell(const Ref<KeyVal>&,int pure);
00120 ~GaussianShell();
00121 void save_data_state(StateOut&);
00123 int nprimitive() const { return nprim; }
00125 int ncontraction() const { return ncon; }
00127 int nfunction() const { return nfunc; }
00129 int max_angular_momentum() const { return max_am_; }
00131 int min_angular_momentum() const { return min_am_; }
00133 int max_cartesian() const;
00135 int am(int con) const { return l[con]; }
00137 int max_am() const { return max_am_; }
00139 int min_am() const { return min_am_; }
00141 char amchar(int con) const { return amtypes[l[con]]; }
00143 int nfunction(int con) const;
00145 int ncartesian() const { return ncart_; }
00148 int ncartesian_with_aminc(int aminc) const;
00150 int ncartesian(int con) const { return ((l[con]+2)*(l[con]+1))>>1; }
00152 int is_cartesian(int con) const { return !puream[con]; }
00154 int is_pure(int con) const { return puream[con]; }
00156 int has_pure() const { return has_pure_; }
00158 double coefficient_unnorm(int con,int prim) const {return coef[con][prim];}
00160 double coefficient_norm(int con,int prim) const;
00162 double exponent(int iprim) const { return exp[iprim]; }
00163
00166 int values(CartesianIter **, SphericalTransformIter **,
00167 const SCVector3& r, double* basis_values);
00170 int grad_values(CartesianIter **, SphericalTransformIter **,
00171 const SCVector3& R,
00172 double* g_values,
00173 double* basis_values=0) const;
00176 int hessian_values(CartesianIter **, SphericalTransformIter **,
00177 const SCVector3& R,
00178 double* h_values, double* g_values=0,
00179 double* basis_values=0) const;
00180
00184 double relative_overlap(const Ref<Integral>&,
00185 int con, int func1, int func2) const;
00190 double relative_overlap(int con,
00191 int a1, int b1, int c1,
00192 int a2, int b2, int c2) const;
00193
00195 int equiv(const GaussianShell *s);
00196
00199 double extent(double threshold) const;
00200
00204 double monobound(double r) const;
00205
00206 void print(std::ostream& =ExEnv::out()) const;
00207 };
00208
00209
00210
00211 #endif
00212
00213
00214
00215
00216