Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

orthog.h

00001 00002 // 00003 // orthog.h -- orthogonalize the basis set 00004 // 00005 // Copyright (C) 1996 Limit Point Systems, Inc. 00006 // 00007 // Author: Curtis Janssen <cljanss@ca.sandia.gov> 00008 // Maintainer: LPS 00009 // 00010 // This file is part of the SC Toolkit. 00011 // 00012 // The SC Toolkit is free software; you can redistribute it and/or modify 00013 // it under the terms of the GNU Library General Public License as published by 00014 // the Free Software Foundation; either version 2, or (at your option) 00015 // any later version. 00016 // 00017 // The SC Toolkit is distributed in the hope that it will be useful, 00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 // GNU Library General Public License for more details. 00021 // 00022 // You should have received a copy of the GNU Library General Public License 00023 // along with the SC Toolkit; see the file COPYING.LIB. If not, write to 00024 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 00025 // 00026 // The U.S. Government is granted a limited license as per AL 91-7. 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 // The tolerance for linearly independent basis functions. 00050 // The intepretation depends on the orthogonalization method. 00051 double lindep_tol_; 00052 // The orthogonalization method 00053 OrthogMethod orthog_method_; 00054 // The orthogonalization matrices 00055 RefSCMatrix orthog_trans_; 00056 RefSCMatrix orthog_trans_inverse_; 00057 // The maximum and minimum residuals from the orthogonalization 00058 // procedure. The interpretation depends on the method used. 00059 // For symmetry and canonical, these are the min and max overlap 00060 // eigenvalues. These are the residuals for the basis functions 00061 // that actually end up being used. 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_; // this kit is used for the result matrices 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

Generated at Sat Dec 18 15:14:22 2004 for MPQC 2.2.3 using the documentation package Doxygen 1.3.7-20040617.