# effh.h

    00001 //
    00002 // effh.h --- definition of the effective fock builder classes
    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_scf_effh_h
    00029 #define _chemistry_qc_scf_effh_h
    00030
    00031 #ifdef __GNUC__
    00032 #pragma interface
    00033 #endif
    00034
    00035 #include <math/scmat/blkiter.h>
    00036 #include <math/scmat/blocked.h>
    00037 #include <chemistry/qc/scf/scf.h>
    00038
    00039 namespace sc {
    00040
    00041 class AccumEffectiveH: public BlockedSCElementOp2 {
    00042   protected:
    00043     SCF *scf_;
    00044     double coef_[18];
    00045
    00046     virtual void init() =0;
    00047
    00048     // hindex is 0 for the closed and 1 for the open shell fock matrix
    00049     // shelli and shellj are 0 for closed, 1 for open, and 2 for virtual
    00050     int index(int hindex, int shelli, int shellj);
    00051
    00052     // converts an occupation number to a shell number
    00053     int shell(double);
    00054
    00055     double& coef(int i, int j, int k) { return coef_[index(i,j,k)]; }
    00056
    00057   public:
    00058     AccumEffectiveH(SCF*);
    00059     virtual ~AccumEffectiveH();
    00060
    00061     virtual void process(SCMatrixBlockIter&,SCMatrixBlockIter&);
    00062 };
    00063
    00064 //  Guest & Saunders general form
    00065 //        C        O         V
    00066 //    ----------
    00067 //    |        |
    00068 // C  |   fc   |
    00069 //    |        |
    00070 //    -------------------
    00071 //    |        |        |
    00072 // O  | 2fc-fo |   fc   |
    00073 //    |        |        |
    00074 //    ----------------------------
    00075 //    |        |        |        |
    00076 // V  |   fc   |   fo   |   fc   |
    00077 //    |        |        |        |
    00078 //    ----------------------------
    00079 class GSGeneralEffH: public AccumEffectiveH {
    00080   protected:
    00081     void init();
    00082
    00083   public:
    00084     GSGeneralEffH(SCF*);
    00085     ~GSGeneralEffH();
    00086 };
    00087
    00088 //  Guest & Saunders' form for high spin
    00089 //        C        O         V
    00090 //    ----------
    00091 //    |        |
    00092 // C  | 2fc-fo |
    00093 //    |        |
    00094 //    -------------------
    00095 //    |        |        |
    00096 // O  | 2fc-fo | 2fc-fo |
    00097 //    |        |        |
    00098 //    ----------------------------
    00099 //    |        |        |        |
    00100 // V  |   fc   |   fo   | 2fc-fo |
    00101 //    |        |        |        |
    00102 //    ----------------------------
    00103 class GSHighSpinEffH: public AccumEffectiveH {
    00104   protected:
    00105     void init();
    00106
    00107   public:
    00108     GSHighSpinEffH(SCF*);
    00109     ~GSHighSpinEffH();
    00110 };
    00111
    00112 //  test form
    00113 //        C        O         V
    00114 //    ----------
    00115 //    |        |
    00116 // C  |   fo   |
    00117 //    |        |
    00118 //    -------------------
    00119 //    |        |        |
    00120 // O  | 2fc-fo |   fo   |
    00121 //    |        |        |
    00122 //    ----------------------------
    00123 //    |        |        |        |
    00124 // V  |   fc   |   fo   |   fo   |
    00125 //    |        |        |        |
    00126 //    ----------------------------
    00127 class TestEffH: public AccumEffectiveH {
    00128   protected:
    00129     void init();
    00130
    00131   public:
    00132     TestEffH(SCF*);
    00133     ~TestEffH();
    00134 };
    00135
    00136 //  form for converged wavefunction
    00137 //        C        O         V
    00138 //    ----------
    00139 //    |        |
    00140 // C  |   fc   |
    00141 //    |        |
    00142 //    -------------------
    00143 //    |        |        |
    00144 // O  | 2fc-fo |   fo   |
    00145 //    |        |        |
    00146 //    ----------------------------
    00147 //    |        |        |        |
    00148 // V  |   fc   |   fo   |   fo   |
    00149 //    |        |        |        |
    00150 //    ----------------------------
    00151 class PsiEffH: public AccumEffectiveH {
    00152   protected:
    00153     void init();
    00154
    00155   public:
    00156     PsiEffH(SCF*);
    00157     ~PsiEffH();
    00158 };
    00159
    00160 }
    00161
    00162 #endif
    00163
    00164 // Local Variables:
    00165 // mode: c++
    00166 // c-file-style: "ETS"
    00167 // End: