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
00029 #ifndef _chemistry_qc_basis_orthog_h
00030 #define _chemistry_qc_basis_orthog_h
00031
00032 #include <math/scmat/matrix.h>
00033
00034 namespace sc {
00035
00037 class OverlapOrthog: public RefCount {
00038 public:
00039
00041 enum OrthogMethod { Symmetric=1, Canonical=2, GramSchmidt=3 };
00042
00043 private:
00044 int debug_;
00045
00046 RefSCDimension dim_;
00047 RefSCDimension orthog_dim_;
00048
00049
00050
00051 double lindep_tol_;
00052
00053 OrthogMethod orthog_method_;
00054
00055 RefSCMatrix orthog_trans_;
00056 RefSCMatrix orthog_trans_inverse_;
00057
00058
00059
00060
00061
00062 double min_orthog_res_;
00063 double max_orthog_res_;
00064
00065 void compute_overlap_eig(RefSCMatrix& overlap_eigvec,
00066 RefDiagSCMatrix& overlap_isqrt_eigval,
00067 RefDiagSCMatrix& overlap_sqrt_eigval);
00068 void compute_symmetric_orthog();
00069 void compute_canonical_orthog();
00070 void compute_gs_orthog();
00071 void compute_orthog_trans();
00072
00073 RefSymmSCMatrix overlap_;
00074 Ref<SCMatrixKit> result_kit_;
00075
00076 public:
00077 OverlapOrthog(OrthogMethod method,
00078 const RefSymmSCMatrix &overlap,
00079 const Ref<SCMatrixKit> &result_kit,
00080 double lindep_tolerance,
00081 int debug = 0);
00082
00083 void reinit(OrthogMethod method,
00084 const RefSymmSCMatrix &overlap,
00085 const Ref<SCMatrixKit> &result_kit,
00086 double lindep_tolerance,
00087 int debug = 0);
00088
00089 double min_orthog_res() const { return min_orthog_res_; }
00090 double max_orthog_res() const { return max_orthog_res_; }
00091
00092 Ref<OverlapOrthog> copy() const;
00093
00095 OrthogMethod orthog_method() const { return orthog_method_; }
00096
00098 double lindep_tol() const { return lindep_tol_; }
00099
00106 RefSCMatrix basis_to_orthog_basis();
00107
00111 RefSCMatrix basis_to_orthog_basis_inverse();
00112
00113 RefSCDimension dim();
00114 RefSCDimension orthog_dim();
00115 };
00116
00117 }
00118
00119 #endif