MPQC 2.3.1

- Main Page
- Related Pages
- Classes
- Files

- File List

ossscf.h

    00001 //
    00002 // ossscf.h --- definition of the open shell singlet 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_ossscf_h
    00029 #define _chemistry_qc_scf_ossscf_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 OSSSCF: 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     ResultRefSymmSCMatrix cl_fock_;
    00051     ResultRefSymmSCMatrix op_focka_;
    00052     ResultRefSymmSCMatrix op_fockb_;
    00053
    00054   public:
    00055     OSSSCF(StateIn&);
    00056     OSSSCF(const Ref<KeyVal>&);
    00057     ~OSSSCF();
    00058
    00059     void save_data_state(StateOut&);
    00060
    00061     void print(std::ostream&o=ExEnv::out0()) const;
    00062
    00063     double occupation(int ir, int vectornum);
    00064     double alpha_occupation(int irrep, int vectornum);
    00065     double beta_occupation(int irrep, int vectornum);
    00066
    00067     int n_fock_matrices() const;
    00068     RefSymmSCMatrix fock(int);
    00069     RefSymmSCMatrix effective_fock();
    00070     RefSymmSCMatrix density();
    00071     RefSymmSCMatrix alpha_density();
    00072     RefSymmSCMatrix beta_density();
    00073
    00074     void symmetry_changed();
    00075
    00076     int spin_polarized();
    00077
    00078   protected:
    00079     // these are temporary data, so they should not be checkpointed
    00080     RefSymmSCMatrix cl_dens_;
    00081     RefSymmSCMatrix cl_dens_diff_;
    00082     RefSymmSCMatrix cl_gmat_;
    00083     RefSymmSCMatrix op_densa_;
    00084     RefSymmSCMatrix op_densa_diff_;
    00085     RefSymmSCMatrix op_gmata_;
    00086     RefSymmSCMatrix op_densb_;
    00087     RefSymmSCMatrix op_densb_diff_;
    00088     RefSymmSCMatrix op_gmatb_;
    00089
    00090     RefSymmSCMatrix cl_hcore_;
    00091
    00092     void set_occupations(const RefDiagSCMatrix& evals);
    00093
    00094     // scf things
    00095     void init_vector();
    00096     void done_vector();
    00097     void reset_density();
    00098     double new_density();
    00099     double scf_energy();
    00100
    00101     Ref<SCExtrapData> extrap_data();
    00102
    00103     // gradient things
    00104     void init_gradient();
    00105     void done_gradient();
    00106
    00107     RefSymmSCMatrix lagrangian();
    00108     RefSymmSCMatrix gradient_density();
    00109
    00110     // hessian things
    00111     void init_hessian();
    00112     void done_hessian();
    00113 };
    00114
    00115 }
    00116
    00117 #endif
    00118
    00119 // Local Variables:
    00120 // mode: c++
    00121 // c-file-style: "ETS"
    00122 // End: