Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

gaussshell.h

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 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;  // contraction coefficients for unnormalized primitives
00057 
00058     // computed data:
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 // Local Variables:
00214 // mode: c++
00215 // c-file-style: "CLJ"
00216 // End:

Generated at Thu Oct 4 18:08:44 2001 for MPQC 2.0.0 using the documentation package Doxygen 1.2.5.