Google

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 
00037 namespace sc {
00038 
00041 class SOTransformFunction {
00042   public:
00044     double coef;
00046     int aofunc;
00048     int sofunc;
00050     int irrep;
00051 };
00052 
00056 class SOTransformShell {
00057   public:
00059     int aoshell;
00061     int nfunc;
00063     SOTransformFunction *func;
00064     SOTransformShell();
00065     ~SOTransformShell();
00067     void add_func(int irrep, double coef, int aofunc, int sofunc);
00068 };
00069 
00073 class SOTransform {
00074   public:
00075     int naoshell_allocated;
00077     int naoshell;
00079     SOTransformShell *aoshell;
00080     SOTransform();
00081     ~SOTransform();
00082     void set_naoshell(int n);
00084     void add_transform(int aoshell, int irrep,
00085                        double coef, int aofunc, int sofunc);
00086 };
00087 
00090 class SOBasis : public RefCount {
00091   protected:
00092     Ref<GaussianBasisSet> basis_;
00093     int nshell_;
00094     int nirrep_;
00095     int *ncomp_;
00096     int **nfunc_;
00097     int *naofunc_;
00098     int **funcoff_;
00099 
00100     int *nfunc_in_irrep_;
00101     int *func_;
00102     int *irrep_;
00103     int *func_within_irrep_;
00104 
00105     SOTransform *trans_;
00106 
00107   public:
00109     SOBasis(const Ref<GaussianBasisSet> &, const Ref<Integral>&);
00110     ~SOBasis();
00111 
00113     int nshell() const { return nshell_; }
00115     int nirrep() const { return nirrep_; }
00116     int ncomponent(int iirrep) const { return ncomp_[iirrep]; }
00118     int nfunction_in_irrep(int irrep) const { return nfunc_in_irrep_[irrep]; }
00120     int function_offset_for_irrep(int irrep) const;
00122     int nfunction(int ishell) const;
00125     int naofunction(int ishell) const { return naofunc_[ishell]; }
00127     int nfunction(int ishell, int iirrep) const;
00130     int max_nfunction_in_shell() const;
00134     int function_offset_within_shell(int ishell, int iirrep) const;
00135 
00138     int function(int ishell);
00139 
00141     int irrep(int ishell, int ifunc) const;
00143     int function_within_irrep(int ishell, int ifunc) const;
00144 
00146     const SOTransform &trans(int i) const { return trans_[i]; }
00147 
00148     void print(std::ostream &o=ExEnv::out0()) const;
00149 };
00150 
00151 
00152 inline int
00153 SOBasis::function(int ishell)
00154 {
00155   return func_[ishell];
00156 }
00157 
00158 inline int
00159 SOBasis::irrep(int ishell, int ifunc) const
00160 {
00161   return irrep_[func_[ishell]+ifunc];
00162 }
00163 
00164 inline int
00165 SOBasis::function_offset_for_irrep(int irrep) const
00166 {
00167   int r = 0;
00168   for (int i=0; i<irrep; i++) {
00169       r += nfunc_in_irrep_[i];
00170     }
00171   return r;
00172 }
00173 
00174 inline int
00175 SOBasis::function_within_irrep(int ishell, int ifunc) const
00176 {
00177   return func_within_irrep_[func_[ishell]+ifunc];
00178 }
00179 
00180 inline int
00181 SOBasis::nfunction(int ishell, int iirrep) const
00182 {
00183   return nfunc_[ishell][iirrep];
00184 }
00185 
00186 inline int
00187 SOBasis::function_offset_within_shell(int ishell, int iirrep) const
00188 {
00189   return funcoff_[ishell][iirrep];
00190 }
00191 
00192 }
00193 
00194 #endif
00195 
00196 // Local Variables:
00197 // mode: c++
00198 // c-file-style: "CLJ"
00199 // End:

Generated at Fri Jan 10 08:14:09 2003 for MPQC 2.1.3 using the documentation package Doxygen 1.2.14.