<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta name="robots" content="noindex"> <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>wfn.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body bgcolor="#ffffff"> <!-- Generated by Doxygen 1.2.5 on Mon Oct 14 14:16:39 2002 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="pages.html">Related Pages</a> </center> <hr><h1>wfn.h</h1><div class="fragment"><pre>00001 <font class="comment">//</font> 00002 <font class="comment">// wfn.h</font> 00003 <font class="comment">//</font> 00004 <font class="comment">// Copyright (C) 1996 Limit Point Systems, Inc.</font> 00005 <font class="comment">//</font> 00006 <font class="comment">// Author: Curtis Janssen <cljanss@limitpt.com></font> 00007 <font class="comment">// Maintainer: LPS</font> 00008 <font class="comment">//</font> 00009 <font class="comment">// This file is part of the SC Toolkit.</font> 00010 <font class="comment">//</font> 00011 <font class="comment">// The SC Toolkit is free software; you can redistribute it and/or modify</font> 00012 <font class="comment">// it under the terms of the GNU Library General Public License as published by</font> 00013 <font class="comment">// the Free Software Foundation; either version 2, or (at your option)</font> 00014 <font class="comment">// any later version.</font> 00015 <font class="comment">//</font> 00016 <font class="comment">// The SC Toolkit is distributed in the hope that it will be useful,</font> 00017 <font class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</font> 00018 <font class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</font> 00019 <font class="comment">// GNU Library General Public License for more details.</font> 00020 <font class="comment">//</font> 00021 <font class="comment">// You should have received a copy of the GNU Library General Public License</font> 00022 <font class="comment">// along with the SC Toolkit; see the file COPYING.LIB. If not, write to</font> 00023 <font class="comment">// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.</font> 00024 <font class="comment">//</font> 00025 <font class="comment">// The U.S. Government is granted a limited license as per AL 91-7.</font> 00026 <font class="comment">//</font> 00027 00028 <font class="preprocessor">#ifndef _chemistry_qc_wfn_wfn_h</font> 00029 <font class="preprocessor"></font><font class="preprocessor">#define _chemistry_qc_wfn_wfn_h</font> 00030 <font class="preprocessor"></font> 00031 <font class="preprocessor">#ifdef __GNUC__</font> 00032 <font class="preprocessor"></font><font class="preprocessor">#pragma interface</font> 00033 <font class="preprocessor"></font><font class="preprocessor">#endif</font> 00034 <font class="preprocessor"></font> 00035 <font class="preprocessor">#include <iostream></font> 00036 00037 <font class="preprocessor">#include <util/misc/compute.h></font> 00038 <font class="preprocessor">#include <math/scmat/matrix.h></font> 00039 <font class="preprocessor">#include <math/scmat/vector3.h></font> 00040 <font class="preprocessor">#include <chemistry/molecule/energy.h></font> 00041 <font class="preprocessor">#include <chemistry/qc/basis/basis.h></font> 00042 <font class="preprocessor">#include <chemistry/qc/basis/integral.h></font> 00043 00044 <font class="keyword">namespace </font>sc { 00045 <a name="l00047"></a><a class="code" href="class_sc__Wavefunction.html">00047</a> <font class="keyword">class </font>Wavefunction: <font class="keyword">public</font> MolecularEnergy { 00048 <font class="keyword">public</font>: 00049 <a name="l00051"></a><a class="code" href="class_sc__Wavefunction.html#s3">00051</a> <font class="keyword">enum</font> OrthogMethod { Symmetric=1, Canonical=2, GramSchmidt=3 }; 00052 00053 <font class="keyword">private</font>: 00054 RefSCDimension aodim_; 00055 RefSCDimension sodim_; 00056 Ref<SCMatrixKit> basiskit_; 00057 00058 ResultRefSymmSCMatrix overlap_; 00059 ResultRefSymmSCMatrix hcore_; 00060 ResultRefSCMatrix natural_orbitals_; 00061 ResultRefDiagSCMatrix natural_density_; 00062 00063 <font class="keywordtype">double</font> * bs_values; 00064 <font class="keywordtype">double</font> * bsg_values; 00065 00066 Ref<GaussianBasisSet> gbs_; 00067 Ref<Integral> integral_; 00068 00069 <font class="comment">// The tolerance for linearly independent basis functions.</font> 00070 <font class="comment">// The intepretation depends on the orthogonalization method.</font> 00071 <font class="keywordtype">double</font> lindep_tol_; 00072 <font class="comment">// The orthogonalization method</font> 00073 OrthogMethod orthog_method_; 00074 <font class="comment">// The dimension in the orthogonalized SO basis</font> 00075 RefSCDimension osodim_; 00076 <font class="comment">// The orthogonalization matrices</font> 00077 RefSCMatrix orthog_trans_; 00078 RefSCMatrix orthog_trans_inverse_; 00079 <font class="comment">// The maximum and minimum residuals from the orthogonalization</font> 00080 <font class="comment">// procedure. The interpretation depends on the method used.</font> 00081 <font class="comment">// For symmetry and canonical, these are the min and max overlap</font> 00082 <font class="comment">// eigenvalues. These are the residuals for the basis functions</font> 00083 <font class="comment">// that actually end up being used.</font> 00084 <font class="keywordtype">double</font> min_orthog_res_; 00085 <font class="keywordtype">double</font> max_orthog_res_; 00086 00087 <font class="keywordtype">int</font> print_nao_; 00088 <font class="keywordtype">int</font> print_npa_; 00089 00090 <font class="keywordtype">void</font> compute_overlap_eig(RefSCMatrix& overlap_eigvec, 00091 RefDiagSCMatrix& overlap_isqrt_eigval, 00092 RefDiagSCMatrix& overlap_sqrt_eigval); 00093 <font class="keywordtype">void</font> compute_symmetric_orthog(); 00094 <font class="keywordtype">void</font> compute_canonical_orthog(); 00095 <font class="keywordtype">void</font> compute_gs_orthog(); 00096 <font class="keywordtype">void</font> compute_orthog_trans(); 00097 00098 <font class="keyword">protected</font>: 00099 00100 <font class="keywordtype">int</font> debug_; 00101 00102 <font class="keywordtype">double</font> min_orthog_res()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> min_orthog_res_; } 00103 <font class="keywordtype">double</font> max_orthog_res()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> max_orthog_res_; } 00104 00105 <font class="keywordtype">void</font> copy_orthog_info(<font class="keyword">const</font> Ref<Wavefunction> &); 00106 00107 <font class="keyword">public</font>: 00108 <a class="code" href="class_sc__Wavefunction.html#a1">Wavefunction</a>(StateIn&); 00141 <a class="code" href="class_sc__Wavefunction.html#a1">Wavefunction</a>(<font class="keyword">const</font> Ref<KeyVal>&); 00142 <font class="keyword">virtual</font> ~Wavefunction(); 00143 00144 <font class="keywordtype">void</font> <a class="code" href="class_sc__Wavefunction.html#a3">save_data_state</a>(StateOut&); 00145 00146 <font class="keywordtype">double</font> <a class="code" href="class_sc__Wavefunction.html#a12">density</a>(<font class="keyword">const</font> SCVector3&); 00147 <font class="keywordtype">double</font> density_gradient(<font class="keyword">const</font> SCVector3&,<font class="keywordtype">double</font>*); 00148 <font class="keywordtype">double</font> natural_orbital(<font class="keyword">const</font> SCVector3& r, <font class="keywordtype">int</font> iorb); 00149 <font class="keywordtype">double</font> natural_orbital_density(<font class="keyword">const</font> SCVector3& r, 00150 <font class="keywordtype">int</font> orb, <font class="keywordtype">double</font>* orbval = 0); 00151 <font class="keywordtype">double</font> orbital(<font class="keyword">const</font> SCVector3& r, <font class="keywordtype">int</font> iorb, <font class="keyword">const</font> RefSCMatrix& orbs); 00152 00153 <font class="keywordtype">double</font> orbital_density(<font class="keyword">const</font> SCVector3& r, 00154 <font class="keywordtype">int</font> iorb, 00155 <font class="keyword">const</font> RefSCMatrix& orbs, 00156 <font class="keywordtype">double</font>* orbval = 0); 00157 00159 <font class="keywordtype">double</font> <a class="code" href="class_sc__Wavefunction.html#a10">charge</a>(); 00161 <font class="keyword">virtual</font> <font class="keywordtype">int</font> <a class="code" href="class_sc__Wavefunction.html#a11">nelectron</a>() = 0; 00162 00164 <font class="keyword">virtual</font> RefSymmSCMatrix <a class="code" href="class_sc__Wavefunction.html#a12">density</a>() = 0; 00166 <font class="keyword">virtual</font> RefSymmSCMatrix <a class="code" href="class_sc__Wavefunction.html#a13">ao_density</a>(); 00168 <font class="keyword">virtual</font> RefSCMatrix <a class="code" href="class_sc__Wavefunction.html#a14">natural_orbitals</a>(); 00170 <font class="keyword">virtual</font> RefDiagSCMatrix <a class="code" href="class_sc__Wavefunction.html#a15">natural_density</a>(); 00171 00173 <font class="keyword">virtual</font> <font class="keywordtype">int</font> <a class="code" href="class_sc__Wavefunction.html#a16">spin_polarized</a>() = 0; 00174 00176 <font class="keyword">virtual</font> RefSymmSCMatrix <a class="code" href="class_sc__Wavefunction.html#a17">alpha_density</a>(); 00178 <font class="keyword">virtual</font> RefSymmSCMatrix <a class="code" href="class_sc__Wavefunction.html#a18">beta_density</a>(); 00180 <font class="keyword">virtual</font> RefSymmSCMatrix <a class="code" href="class_sc__Wavefunction.html#a19">alpha_ao_density</a>(); 00182 <font class="keyword">virtual</font> RefSymmSCMatrix <a class="code" href="class_sc__Wavefunction.html#a20">beta_ao_density</a>(); 00183 00185 <font class="keyword">virtual</font> RefSCMatrix <a class="code" href="class_sc__Wavefunction.html#a21">nao</a>(<font class="keywordtype">double</font> *atom_charges=0); 00186 00188 <font class="keyword">virtual</font> RefSymmSCMatrix <a class="code" href="class_sc__Wavefunction.html#a22">overlap</a>(); 00190 <font class="keyword">virtual</font> RefSymmSCMatrix <a class="code" href="class_sc__Wavefunction.html#a23">core_hamiltonian</a>(); 00191 00193 RefSCDimension <a class="code" href="class_sc__Wavefunction.html#a24">ao_dimension</a>(); 00195 RefSCDimension <a class="code" href="class_sc__Wavefunction.html#a25">so_dimension</a>(); 00197 RefSCDimension <a class="code" href="class_sc__Wavefunction.html#a26">oso_dimension</a>(); 00199 Ref<SCMatrixKit> <a class="code" href="class_sc__Wavefunction.html#a27">basis_matrixkit</a>(); 00201 Ref<GaussianBasisSet> <a class="code" href="class_sc__Wavefunction.html#a28">basis</a>() <font class="keyword">const</font>; 00203 Ref<Integral> <a class="code" href="class_sc__Wavefunction.html#a29">integral</a>(); 00204 00205 <font class="comment">// override symmetry_changed from MolecularEnergy</font> 00206 <font class="keywordtype">void</font> <a class="code" href="class_sc__Wavefunction.html#a30">symmetry_changed</a>(); 00207 00214 RefSCMatrix <a class="code" href="class_sc__Wavefunction.html#a31">so_to_orthog_so</a>(); 00215 00218 RefSCMatrix <a class="code" href="class_sc__Wavefunction.html#a32">so_to_orthog_so_inverse</a>(); 00219 <a name="l00221"></a><a class="code" href="class_sc__Wavefunction.html#a33">00221</a> OrthogMethod <a class="code" href="class_sc__Wavefunction.html#a33">orthog_method</a>()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> orthog_method_; } 00222 <a name="l00224"></a><a class="code" href="class_sc__Wavefunction.html#a34">00224</a> <font class="keywordtype">double</font> <a class="code" href="class_sc__Wavefunction.html#a34">lindep_tol</a>()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> lindep_tol_; } 00225 00226 <font class="keywordtype">void</font> <a class="code" href="class_sc__Wavefunction.html#a35">obsolete</a>(); 00227 00228 <font class="keywordtype">void</font> <a class="code" href="class_sc__Wavefunction.html#a36">print</a>(std::ostream& = ExEnv::out0()) <font class="keyword">const</font>; 00229 }; 00230 00231 } 00232 00233 <font class="preprocessor">#endif</font> 00234 <font class="preprocessor"></font> 00235 <font class="comment">// Local Variables:</font> 00236 <font class="comment">// mode: c++</font> 00237 <font class="comment">// c-file-style: "ETS"</font> 00238 <font class="comment">// End:</font> </div></pre><hr> <address> <small> Generated at Mon Oct 14 14:16:39 2002 for <a href="http://aros.ca.sandia.gov/~cljanss/mpqc">MPQC</a> 2.1.2 using the documentation package <a href="http://www.stack.nl/~dimitri/doxygen/index.html">Doxygen</a> 1.2.5. </small> </address> </body> </html>