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

sobasis.h

00001 //
00002 // sobasis.h --- definition of the Integral class
00003 //
00004 // Copyright (C) 1998 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_sobasis_h
00029 #define _chemistry_qc_basis_sobasis_h
00030 
00031 #ifdef __GNUC__
00032 #pragma interface
00033 #endif
00034 
00035 #include <chemistry/qc/basis/basis.h>
00036 
00039 class SOTransformFunction {
00040   public:
00042     double coef;
00044     int aofunc;
00046     int sofunc;
00048     int irrep;
00049 };
00050 
00054 class SOTransformShell {
00055   public:
00057     int aoshell;
00059     int nfunc;
00061     SOTransformFunction *func;
00062     SOTransformShell();
00063     ~SOTransformShell();
00065     void add_func(int irrep, double coef, int aofunc, int sofunc);
00066 };
00067 
00071 class SOTransform {
00072   public:
00073     int naoshell_allocated;
00075     int naoshell;
00077     SOTransformShell *aoshell;
00078     SOTransform();
00079     ~SOTransform();
00080     void set_naoshell(int n);
00082     void add_transform(int aoshell, int irrep,
00083                        double coef, int aofunc, int sofunc);
00084 };
00085 
00088 class SOBasis : public RefCount {
00089   protected:
00090     Ref<GaussianBasisSet> basis_;
00091     int nshell_;
00092     int nirrep_;
00093     int *ncomp_;
00094     int **nfunc_;
00095     int *naofunc_;
00096     int **funcoff_;
00097 
00098     int *nfunc_in_irrep_;
00099     int *func_;
00100     int *irrep_;
00101     int *func_within_irrep_;
00102 
00103     SOTransform *trans_;
00104 
00105   public:
00107     SOBasis(const Ref<GaussianBasisSet> &, const Ref<Integral>&);
00108     ~SOBasis();
00109 
00111     int nshell() const { return nshell_; }
00113     int nirrep() const { return nirrep_; }
00114     int ncomponent(int iirrep) const { return ncomp_[iirrep]; }
00116     int nfunction_in_irrep(int irrep) const { return nfunc_in_irrep_[irrep]; }
00118     int function_offset_for_irrep(int irrep) const;
00120     int nfunction(int ishell) const;
00123     int naofunction(int ishell) const { return naofunc_[ishell]; }
00125     int nfunction(int ishell, int iirrep) const;
00128     int max_nfunction_in_shell() const;
00132     int function_offset_within_shell(int ishell, int iirrep) const;
00133 
00136     int function(int ishell);
00137 
00139     int irrep(int ishell, int ifunc) const;
00141     int function_within_irrep(int ishell, int ifunc) const;
00142 
00144     const SOTransform &trans(int i) const { return trans_[i]; }
00145 
00146     void print(std::ostream &o=ExEnv::out()) const;
00147 };
00148 
00149 
00150 inline int
00151 SOBasis::function(int ishell)
00152 {
00153   return func_[ishell];
00154 }
00155 
00156 inline int
00157 SOBasis::irrep(int ishell, int ifunc) const
00158 {
00159   return irrep_[func_[ishell]+ifunc];
00160 }
00161 
00162 inline int
00163 SOBasis::function_offset_for_irrep(int irrep) const
00164 {
00165   int r = 0;
00166   for (int i=0; i<irrep; i++) {
00167       r += nfunc_in_irrep_[i];
00168     }
00169   return r;
00170 }
00171 
00172 inline int
00173 SOBasis::function_within_irrep(int ishell, int ifunc) const
00174 {
00175   return func_within_irrep_[func_[ishell]+ifunc];
00176 }
00177 
00178 inline int
00179 SOBasis::nfunction(int ishell, int iirrep) const
00180 {
00181   return nfunc_[ishell][iirrep];
00182 }
00183 
00184 inline int
00185 SOBasis::function_offset_within_shell(int ishell, int iirrep) const
00186 {
00187   return funcoff_[ishell][iirrep];
00188 }
00189 
00190 #endif
00191 
00192 // Local Variables:
00193 // mode: c++
00194 // c-file-style: "CLJ"
00195 // End:

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