<!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>obwfn.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:38 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>obwfn.h</h1><div class="fragment"><pre>00001 <font class="comment">//</font> 00002 <font class="comment">// obwfn.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_obwfn_h</font> 00029 <font class="preprocessor"></font><font class="preprocessor">#define _chemistry_qc_wfn_obwfn_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 <chemistry/qc/wfn/wfn.h></font> 00036 00037 <font class="keyword">namespace </font>sc { 00038 <a name="l00041"></a><a class="code" href="class_sc__OneBodyWavefunction.html">00041</a> <font class="keyword">class </font>OneBodyWavefunction: <font class="keyword">public</font> Wavefunction { 00042 <font class="keyword">protected</font>: 00043 ResultRefSymmSCMatrix density_; 00044 AccResultRefSCMatrix oso_eigenvectors_; 00045 AccResultRefDiagSCMatrix eigenvalues_; 00046 <font class="keywordtype">int</font> nirrep_; 00047 <font class="keywordtype">int</font> *nvecperirrep_; 00048 <font class="keywordtype">double</font> *occupations_; 00049 <font class="keywordtype">double</font> *alpha_occupations_; 00050 <font class="keywordtype">double</font> *beta_occupations_; 00051 00052 <font class="keywordtype">void</font> init_sym_info(); 00053 00054 <font class="comment">// oldocc is converted to newocc using the correlation</font> 00055 <font class="comment">// table between initial_pg_ and the current point group</font> 00056 <font class="comment">// returns 1 if successful and 0 otherwise. newocc is</font> 00057 <font class="comment">// delete[]'ed and new'ed.</font> 00058 <font class="keywordtype">int</font> form_occupations(<font class="keywordtype">int</font> *&newocc, <font class="keyword">const</font> <font class="keywordtype">int</font> *oldocc); 00059 00060 <font class="keyword">public</font>: 00061 <a class="code" href="class_sc__OneBodyWavefunction.html#a1">OneBodyWavefunction</a>(StateIn&); 00072 <a class="code" href="class_sc__OneBodyWavefunction.html#a1">OneBodyWavefunction</a>(<font class="keyword">const</font> Ref<KeyVal>&); 00073 ~OneBodyWavefunction(); 00074 00075 <font class="keywordtype">void</font> <a class="code" href="class_sc__OneBodyWavefunction.html#a3">save_data_state</a>(StateOut&); 00076 00077 <font class="keywordtype">int</font> <a class="code" href="class_sc__OneBodyWavefunction.html#a4">nelectron</a>(); 00078 00080 RefSCMatrix <a class="code" href="class_sc__OneBodyWavefunction.html#a5">so_to_mo</a>(); 00082 RefSCMatrix <a class="code" href="class_sc__OneBodyWavefunction.html#a6">orthog_so_to_mo</a>(); 00084 RefSCMatrix <a class="code" href="class_sc__OneBodyWavefunction.html#a7">mo_to_so</a>(); 00087 RefSCMatrix <a class="code" href="class_sc__OneBodyWavefunction.html#a8">mo_to_orthog_so</a>(); 00088 00090 RefSCMatrix <a class="code" href="class_sc__OneBodyWavefunction.html#a9">eigenvectors</a>(); 00092 <font class="keyword">virtual</font> RefSCMatrix <a class="code" href="class_sc__OneBodyWavefunction.html#a10">oso_eigenvectors</a>() = 0; 00094 <font class="keyword">virtual</font> RefDiagSCMatrix <a class="code" href="class_sc__OneBodyWavefunction.html#a11">eigenvalues</a>() = 0; 00097 <font class="keyword">virtual</font> <font class="keywordtype">double</font> <a class="code" href="class_sc__OneBodyWavefunction.html#a12">occupation</a>(<font class="keywordtype">int</font> irrep, <font class="keywordtype">int</font> vectornum) = 0; 00100 <font class="keywordtype">double</font> <a class="code" href="class_sc__OneBodyWavefunction.html#a12">occupation</a>(<font class="keywordtype">int</font> vectornum); 00101 00103 <font class="keyword">virtual</font> <font class="keywordtype">int</font> <a class="code" href="class_sc__OneBodyWavefunction.html#a14">spin_unrestricted</a>() = 0; 00104 00107 <font class="keyword">virtual</font> <font class="keywordtype">double</font> <a class="code" href="class_sc__OneBodyWavefunction.html#a15">alpha_occupation</a>(<font class="keywordtype">int</font> irrep, <font class="keywordtype">int</font> vectornum); 00110 <font class="keyword">virtual</font> <font class="keywordtype">double</font> <a class="code" href="class_sc__OneBodyWavefunction.html#a16">beta_occupation</a>(<font class="keywordtype">int</font> irrep, <font class="keywordtype">int</font> vectornum); 00113 <font class="keywordtype">double</font> <a class="code" href="class_sc__OneBodyWavefunction.html#a15">alpha_occupation</a>(<font class="keywordtype">int</font> vectornum); 00116 <font class="keywordtype">double</font> <a class="code" href="class_sc__OneBodyWavefunction.html#a16">beta_occupation</a>(<font class="keywordtype">int</font> vectornum); 00117 00118 <font class="comment">// Return alpha and beta electron densities</font> 00119 <font class="keyword">virtual</font> RefSCMatrix oso_alpha_eigenvectors(); 00120 <font class="keyword">virtual</font> RefSCMatrix oso_beta_eigenvectors(); 00121 <font class="keyword">virtual</font> RefSCMatrix alpha_eigenvectors(); 00122 <font class="keyword">virtual</font> RefSCMatrix beta_eigenvectors(); 00123 <font class="keyword">virtual</font> RefDiagSCMatrix alpha_eigenvalues(); 00124 <font class="keyword">virtual</font> RefDiagSCMatrix beta_eigenvalues(); 00125 00126 <font class="keyword">virtual</font> RefDiagSCMatrix 00127 projected_eigenvalues(<font class="keyword">const</font> Ref<OneBodyWavefunction>&, <font class="keywordtype">int</font> alp=1); 00130 <font class="keyword">virtual</font> RefSCMatrix <a class="code" href="class_sc__OneBodyWavefunction.html#a26">projected_eigenvectors</a>(<font class="keyword">const</font> Ref<OneBodyWavefunction>&, 00131 <font class="keywordtype">int</font> alp=1); 00134 <font class="keyword">virtual</font> RefSCMatrix <a class="code" href="class_sc__OneBodyWavefunction.html#a27">hcore_guess</a>(); 00138 <font class="keyword">virtual</font> RefSCMatrix <a class="code" href="class_sc__OneBodyWavefunction.html#a27">hcore_guess</a>(RefDiagSCMatrix &val); 00139 00140 <font class="keywordtype">void</font> <a class="code" href="class_sc__OneBodyWavefunction.html#a29">symmetry_changed</a>(); 00141 00142 <font class="keywordtype">double</font> orbital(<font class="keyword">const</font> SCVector3& r, <font class="keywordtype">int</font> iorb); 00143 <font class="keywordtype">double</font> orbital_density(<font class="keyword">const</font> SCVector3& r, <font class="keywordtype">int</font> iorb, <font class="keywordtype">double</font>* orbval = 0); 00144 00145 <font class="keywordtype">void</font> <a class="code" href="class_sc__OneBodyWavefunction.html#a32">print</a>(std::ostream&o=ExEnv::out0()) <font class="keyword">const</font>; 00146 }; 00147 00148 00149 <font class="comment">// This is useful as an initial guess for other one body wavefunctions</font> 00150 <font class="keyword">class </font>HCoreWfn: <font class="keyword">public</font> OneBodyWavefunction { 00151 <font class="keyword">private</font>: 00152 <font class="keywordtype">int</font> nirrep_; 00153 <font class="keywordtype">int</font> *docc_; 00154 <font class="keywordtype">int</font> *socc_; 00155 <font class="keywordtype">int</font> total_charge_; 00156 <font class="keywordtype">int</font> user_occ_; 00157 00158 <font class="keywordtype">void</font> fill_occ(<font class="keyword">const</font> RefDiagSCMatrix &evals, 00159 <font class="keywordtype">int</font> ndocc, <font class="keywordtype">int</font> *docc, <font class="keywordtype">int</font> nsocc = 0, <font class="keywordtype">int</font> *socc = 0); 00160 00161 <font class="keywordtype">void</font> compute(); 00162 00163 <font class="keyword">public</font>: 00164 HCoreWfn(StateIn&); 00165 HCoreWfn(<font class="keyword">const</font> Ref<KeyVal>&); 00166 ~HCoreWfn(); 00167 00168 <font class="keywordtype">void</font> save_data_state(StateOut&); 00169 00170 <font class="keywordtype">double</font> occupation(<font class="keywordtype">int</font> irrep, <font class="keywordtype">int</font> vectornum); 00171 00172 RefSCMatrix oso_eigenvectors(); 00173 RefDiagSCMatrix eigenvalues(); 00174 RefSymmSCMatrix density(); 00175 <font class="keywordtype">int</font> spin_polarized(); 00176 <font class="keywordtype">int</font> spin_unrestricted(); 00177 00178 <font class="keywordtype">int</font> value_implemented() <font class="keyword">const</font>; 00179 }; 00180 00181 } 00182 00183 <font class="preprocessor">#endif</font> 00184 <font class="preprocessor"></font> 00185 <font class="comment">// Local Variables:</font> 00186 <font class="comment">// mode: c++</font> 00187 <font class="comment">// c-file-style: "ETS"</font> 00188 <font class="comment">// End:</font> </div></pre><hr> <address> <small> Generated at Mon Oct 14 14:16:38 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>