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_hsosscf_h
00029 #define _chemistry_qc_scf_hsosscf_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 HSOSSCF: public SCF {
00044 protected:
00045 Ref<PointGroup> most_recent_pg_;
00046 int user_occupations_;
00047 int tndocc_;
00048 int tnsocc_;
00049 int nirrep_;
00050 int *initial_ndocc_;
00051 int *initial_nsocc_;
00052 int *ndocc_;
00053 int *nsocc_;
00054
00055 ResultRefSymmSCMatrix cl_fock_;
00056 ResultRefSymmSCMatrix op_fock_;
00057
00058 public:
00059 HSOSSCF(StateIn&);
00102 HSOSSCF(const Ref<KeyVal>&);
00103 ~HSOSSCF();
00104
00105 void save_data_state(StateOut&);
00106
00107 void print(std::ostream&o=ExEnv::out0()) const;
00108
00109 double occupation(int irrep, int vectornum);
00110 double alpha_occupation(int irrep, int vectornum);
00111 double beta_occupation(int irrep, int vectornum);
00112
00113 int n_fock_matrices() const;
00114 RefSymmSCMatrix fock(int);
00115 RefSymmSCMatrix effective_fock();
00116
00117 void symmetry_changed();
00118
00119
00120 int spin_polarized();
00121 RefSymmSCMatrix density();
00122 RefSymmSCMatrix alpha_density();
00123 RefSymmSCMatrix beta_density();
00124
00125 protected:
00126
00127 RefSymmSCMatrix cl_dens_;
00128 RefSymmSCMatrix cl_dens_diff_;
00129 RefSymmSCMatrix cl_gmat_;
00130 RefSymmSCMatrix op_dens_;
00131 RefSymmSCMatrix op_dens_diff_;
00132 RefSymmSCMatrix op_gmat_;
00133
00134 RefSymmSCMatrix cl_hcore_;
00135
00136 void set_occupations(const RefDiagSCMatrix& evals);
00137
00138
00139 void init_vector();
00140 void done_vector();
00141 void reset_density();
00142 double new_density();
00143 double scf_energy();
00144
00145 Ref<SCExtrapData> extrap_data();
00146
00147
00148 void init_gradient();
00149 void done_gradient();
00150
00151 RefSymmSCMatrix lagrangian();
00152 RefSymmSCMatrix gradient_density();
00153
00154
00155 void init_hessian();
00156 void done_hessian();
00157
00158
00159 void two_body_deriv_hf(double*grad,double exchange_fraction);
00160 };
00161
00162 }
00163
00164 #endif
00165
00166
00167
00168
00169