00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
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
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
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
00104 void init_gradient();
00105 void done_gradient();
00106
00107 RefSymmSCMatrix lagrangian();
00108 RefSymmSCMatrix gradient_density();
00109
00110
00111 void init_hessian();
00112 void done_hessian();
00113 };
00114
00115 }
00116
00117 #endif
00118
00119
00120
00121
00122