Google

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

tcscf.h

00001 //
00002 // tcscf.h --- definition of the two-configuration SCF class
00003 //
00004 // Copyright (C) 1996 Limit Point Systems, Inc.
00005 //
00006 // Author: Edward Seidl <seidl@janed.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_tcscf_h
00029 #define _chemistry_qc_scf_tcscf_h
00030 
00031 #ifdef __GNUC__
00032 #pragma interface
00033 #endif
00034 
00035 #include <chemistry/qc/scf/scf.h>
00036 
00037 namespace sc {
00038 
00039 // //////////////////////////////////////////////////////////////////////////
00040 
00041 class TCSCF: public SCF {
00042  protected:
00043     int user_occupations_;
00044     int tndocc_;
00045     int nirrep_;
00046     int *ndocc_;
00047     int osa_;
00048     int osb_;
00049 
00050     double occa_;
00051     double occb_;
00052 
00053     double ci1_;
00054     double ci2_;
00055 
00056     ResultRefSymmSCMatrix focka_;
00057     ResultRefSymmSCMatrix fockb_;
00058     ResultRefSymmSCMatrix ka_;
00059     ResultRefSymmSCMatrix kb_;
00060     
00061   public:
00062     TCSCF(StateIn&);
00063     TCSCF(const Ref<KeyVal>&);
00064     ~TCSCF();
00065 
00066     void save_data_state(StateOut&);
00067 
00068     void print(std::ostream&o=ExEnv::out0()) const;
00069 
00070     double occupation(int ir, int vectornum);
00071     double alpha_occupation(int irrep, int vectornum);
00072     double beta_occupation(int irrep, int vectornum);
00073 
00074     int n_fock_matrices() const;
00075     RefSymmSCMatrix fock(int);
00076     RefSymmSCMatrix effective_fock();
00077     RefSymmSCMatrix density();
00078     RefSymmSCMatrix alpha_density();
00079     RefSymmSCMatrix beta_density();
00080 
00081     void symmetry_changed();
00082     
00083     int spin_polarized();
00084 
00085   protected:
00086     // these are temporary data, so they should not be checkpointed
00087     RefSymmSCMatrix cl_dens_;
00088     RefSymmSCMatrix cl_dens_diff_;
00089     RefSymmSCMatrix op_densa_;
00090     RefSymmSCMatrix op_densa_diff_;
00091     RefSymmSCMatrix op_densb_;
00092     RefSymmSCMatrix op_densb_diff_;
00093 
00094     RefSymmSCMatrix ao_gmata_;
00095     RefSymmSCMatrix ao_gmatb_;
00096     RefSymmSCMatrix ao_ka_;
00097     RefSymmSCMatrix ao_kb_;
00098     
00099     RefSymmSCMatrix cl_hcore_;
00100     
00101     void set_occupations(const RefDiagSCMatrix& evals);
00102 
00103     // scf things
00104     void init_vector();
00105     void done_vector();
00106     void reset_density();
00107     double new_density();
00108     double scf_energy();
00109 
00110     Ref<SCExtrapData> extrap_data();
00111     
00112     // gradient things
00113     void init_gradient();
00114     void done_gradient();
00115 
00116     RefSymmSCMatrix lagrangian();
00117     RefSymmSCMatrix gradient_density();
00118 
00119     // hessian things
00120     void init_hessian();
00121     void done_hessian();
00122 };
00123 
00124 }
00125 
00126 #endif
00127 
00128 // Local Variables:
00129 // mode: c++
00130 // c-file-style: "ETS"
00131 // End:

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