MPQC 2.3.1
|
00001 // 00002 // gaussshell.h 00003 // 00004 // Copyright (C) 1996 Limit Point Systems, Inc. 00005 // 00006 // Author: Curtis Janssen <cljanss@limitpt.com> 00007 // Maintainer: LPS 00008 // 00009 // This file is part of the SC Toolkit. 00010 // 00011 // The SC Toolkit is free software; you can redistribute it and/or modify 00012 // it under the terms of the GNU Library General Public License as published by 00013 // the Free Software Foundation; either version 2, or (at your option) 00014 // any later version. 00015 // 00016 // The SC Toolkit is distributed in the hope that it will be useful, 00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 // GNU Library General Public License for more details. 00020 // 00021 // You should have received a copy of the GNU Library General Public License 00022 // along with the SC Toolkit; see the file COPYING.LIB. If not, write to 00023 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 00024 // 00025 // The U.S. Government is granted a limited license as per AL 91-7. 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 namespace sc { 00041 00042 class CartesianIter; 00043 class SphericalTransformIter; 00044 class Integral; 00045 00047 class GaussianShell: public SavableState 00048 { 00049 public: 00050 enum PrimitiveType { Normalized, Unnormalized }; 00051 enum GaussianType { Cartesian, Pure }; 00052 private: 00053 int nprim; 00054 int ncon; 00055 int* l; 00056 int* puream; 00057 double* exp; 00058 double** coef; // contraction coefficients for unnormalized primitives 00059 00060 // computed data: 00061 int nfunc; 00062 int min_am_; 00063 int max_am_; 00064 int ncart_; 00065 int has_pure_; 00066 void init_computed_data(); 00067 00068 double shell_normalization(int); 00069 void convert_coef(); 00070 void normalize_shell(); 00071 PrimitiveType keyval_init(const Ref<KeyVal>&,int,int); 00072 static const char* amtypes; 00073 static const char* AMTYPES; 00074 00075 int test_monobound(double &r, double &bound) const; 00076 public: 00097 GaussianShell( 00098 int ncn, 00099 int nprm, 00100 double* e, 00101 int* am, 00102 int* pure, 00103 double** c, 00104 PrimitiveType pt = GaussianShell::Normalized, 00105 bool do_normalize_shell = true); 00110 GaussianShell( 00111 int ncn, 00112 int nprm, 00113 double* e, 00114 int* am, 00115 GaussianType pure, 00116 double** c, 00117 PrimitiveType pt = GaussianShell::Normalized); 00119 GaussianShell(const Ref<KeyVal>&); 00121 GaussianShell(StateIn&); 00125 GaussianShell(const Ref<KeyVal>&,int pure); 00126 ~GaussianShell(); 00127 void save_data_state(StateOut&); 00129 int nprimitive() const { return nprim; } 00131 int ncontraction() const { return ncon; } 00133 int nfunction() const { return nfunc; } 00135 int max_angular_momentum() const { return max_am_; } 00137 int min_angular_momentum() const { return min_am_; } 00139 int max_cartesian() const; 00141 int am(int con) const { return l[con]; } 00143 int max_am() const { return max_am_; } 00145 int min_am() const { return min_am_; } 00147 char amchar(int con) const { return amtypes[l[con]]; } 00149 int nfunction(int con) const; 00151 int ncartesian() const { return ncart_; } 00154 int ncartesian_with_aminc(int aminc) const; 00156 int ncartesian(int con) const { return ((l[con]+2)*(l[con]+1))>>1; } 00158 int is_cartesian(int con) const { return !puream[con]; } 00160 int is_pure(int con) const { return puream[con]; } 00162 int has_pure() const { return has_pure_; } 00164 double coefficient_unnorm(int con,int prim) const {return coef[con][prim];} 00166 double coefficient_norm(int con,int prim) const; 00168 double exponent(int iprim) const { return exp[iprim]; } 00169 00172 int values(CartesianIter **, SphericalTransformIter **, 00173 const SCVector3& r, double* basis_values); 00176 int grad_values(CartesianIter **, SphericalTransformIter **, 00177 const SCVector3& R, 00178 double* g_values, 00179 double* basis_values=0) const; 00182 int hessian_values(CartesianIter **, SphericalTransformIter **, 00183 const SCVector3& R, 00184 double* h_values, double* g_values=0, 00185 double* basis_values=0) const; 00186 00190 double relative_overlap(const Ref<Integral>&, 00191 int con, int func1, int func2) const; 00196 double relative_overlap(int con, 00197 int a1, int b1, int c1, 00198 int a2, int b2, int c2) const; 00199 00201 int equiv(const GaussianShell *s); 00202 00205 double extent(double threshold) const; 00206 00210 double monobound(double r) const; 00211 00212 void print(std::ostream& =ExEnv::out0()) const; 00213 }; 00214 00215 } 00216 00217 #endif 00218 00219 // Local Variables: 00220 // mode: c++ 00221 // c-file-style: "CLJ" 00222 // End: