clscf.h

00001 //
00002 // clscf.h --- definition of the closed shell 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_clscf_h
00029 #define _chemistry_qc_scf_clscf_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 
00043 class CLSCF: public SCF {
00044   protected:
00045     Ref<PointGroup> most_recent_pg_;
00046     int user_occupations_;
00047     int tndocc_;
00048     int nirrep_;
00049     int *initial_ndocc_;
00050     int *ndocc_;
00051 
00052     ResultRefSymmSCMatrix cl_fock_;
00053 
00054   public:
00055     CLSCF(StateIn&);
00070     CLSCF(const Ref<KeyVal>&);
00071     ~CLSCF();
00072 
00073     void save_data_state(StateOut&);
00074 
00075     void print(std::ostream&o=ExEnv::out0()) const;
00076 
00077     double occupation(int irrep, int vectornum);
00078 
00079     int n_fock_matrices() const;
00084     RefSymmSCMatrix fock(int i);
00086     RefSymmSCMatrix effective_fock();
00087 
00088     RefSymmSCMatrix density();
00089 
00090     void symmetry_changed();
00091     
00092     // returns 0
00093     int spin_polarized();
00094 
00095   protected:
00096     // these are temporary data, so they should not be checkpointed
00097     RefSymmSCMatrix cl_dens_;
00098     RefSymmSCMatrix cl_dens_diff_;
00099     RefSymmSCMatrix cl_gmat_;
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     // The Hartree-Fock derivatives
00124     void two_body_deriv_hf(double*grad,double exchange_fraction);
00125 };
00126 
00127 }
00128 
00129 #endif
00130 
00131 // Local Variables:
00132 // mode: c++
00133 // c-file-style: "ETS"
00134 // End:

Generated at Mon Dec 3 23:23:34 2007 for MPQC 2.3.1 using the documentation package Doxygen 1.5.2.