![]()
|
gaussshell.h00001 //
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:
00094 GaussianShell(
00095 int ncn,
00096 int nprm,
00097 double* e,
00098 int* am,
00099 int* pure,
00100 double** c,
00101 PrimitiveType pt = GaussianShell::Normalized);
00106 GaussianShell(
00107 int ncn,
00108 int nprm,
00109 double* e,
00110 int* am,
00111 GaussianType pure,
00112 double** c,
00113 PrimitiveType pt = GaussianShell::Normalized);
00115 GaussianShell(const Ref<KeyVal>&);
00117 GaussianShell(StateIn&);
00121 GaussianShell(const Ref<KeyVal>&,int pure);
00122 ~GaussianShell();
00123 void save_data_state(StateOut&);
00125 int nprimitive() const { return nprim; }
00127 int ncontraction() const { return ncon; }
00129 int nfunction() const { return nfunc; }
00131 int max_angular_momentum() const { return max_am_; }
00133 int min_angular_momentum() const { return min_am_; }
00135 int max_cartesian() const;
00137 int am(int con) const { return l[con]; }
00139 int max_am() const { return max_am_; }
00141 int min_am() const { return min_am_; }
00143 char amchar(int con) const { return amtypes[l[con]]; }
00145 int nfunction(int con) const;
00147 int ncartesian() const { return ncart_; }
00150 int ncartesian_with_aminc(int aminc) const;
00152 int ncartesian(int con) const { return ((l[con]+2)*(l[con]+1))>>1; }
00154 int is_cartesian(int con) const { return !puream[con]; }
00156 int is_pure(int con) const { return puream[con]; }
00158 int has_pure() const { return has_pure_; }
00160 double coefficient_unnorm(int con,int prim) const {return coef[con][prim];}
00162 double coefficient_norm(int con,int prim) const;
00164 double exponent(int iprim) const { return exp[iprim]; }
00165
00168 int values(CartesianIter **, SphericalTransformIter **,
00169 const SCVector3& r, double* basis_values);
00172 int grad_values(CartesianIter **, SphericalTransformIter **,
00173 const SCVector3& R,
00174 double* g_values,
00175 double* basis_values=0) const;
00178 int hessian_values(CartesianIter **, SphericalTransformIter **,
00179 const SCVector3& R,
00180 double* h_values, double* g_values=0,
00181 double* basis_values=0) const;
00182
00186 double relative_overlap(const Ref<Integral>&,
00187 int con, int func1, int func2) const;
00192 double relative_overlap(int con,
00193 int a1, int b1, int c1,
00194 int a2, int b2, int c2) const;
00195
00197 int equiv(const GaussianShell *s);
00198
00201 double extent(double threshold) const;
00202
00206 double monobound(double r) const;
00207
00208 void print(std::ostream& =ExEnv::out0()) const;
00209 };
00210
00211 }
00212
00213 #endif
00214
00215 // Local Variables:
00216 // mode: c++
00217 // c-file-style: "CLJ"
00218 // End:
Generated at Fri Jan 10 08:14:08 2003 for MPQC 2.1.3 using the documentation package Doxygen 1.2.14. |