<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>MPQC: mp2r12_energy.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.9 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> </ul> </div> <h1>mp2r12_energy.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//</span> <a name="l00002"></a>00002 <span class="comment">// mp2r12_energy.h</span> <a name="l00003"></a>00003 <span class="comment">//</span> <a name="l00004"></a>00004 <span class="comment">// Copyright (C) 2003 Edward Valeev</span> <a name="l00005"></a>00005 <span class="comment">//</span> <a name="l00006"></a>00006 <span class="comment">// Author: Edward Valeev <edward.valeev@chemistry.gatech.edu></span> <a name="l00007"></a>00007 <span class="comment">// Maintainer: EV</span> <a name="l00008"></a>00008 <span class="comment">//</span> <a name="l00009"></a>00009 <span class="comment">// This file is part of the SC Toolkit.</span> <a name="l00010"></a>00010 <span class="comment">//</span> <a name="l00011"></a>00011 <span class="comment">// The SC Toolkit is free software; you can redistribute it and/or modify</span> <a name="l00012"></a>00012 <span class="comment">// it under the terms of the GNU Library General Public License as published by</span> <a name="l00013"></a>00013 <span class="comment">// the Free Software Foundation; either version 2, or (at your option)</span> <a name="l00014"></a>00014 <span class="comment">// any later version.</span> <a name="l00015"></a>00015 <span class="comment">//</span> <a name="l00016"></a>00016 <span class="comment">// The SC Toolkit is distributed in the hope that it will be useful,</span> <a name="l00017"></a>00017 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00018"></a>00018 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> <a name="l00019"></a>00019 <span class="comment">// GNU Library General Public License for more details.</span> <a name="l00020"></a>00020 <span class="comment">//</span> <a name="l00021"></a>00021 <span class="comment">// You should have received a copy of the GNU Library General Public License</span> <a name="l00022"></a>00022 <span class="comment">// along with the SC Toolkit; see the file COPYING.LIB. If not, write to</span> <a name="l00023"></a>00023 <span class="comment">// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.</span> <a name="l00024"></a>00024 <span class="comment">//</span> <a name="l00025"></a>00025 <span class="comment">// The U.S. Government is granted a limited license as per AL 91-7.</span> <a name="l00026"></a>00026 <span class="comment">//</span> <a name="l00027"></a>00027 <a name="l00028"></a>00028 <span class="preprocessor">#ifdef __GNUG__</span> <a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#pragma interface</span> <a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00031"></a>00031 <span class="preprocessor"></span> <a name="l00032"></a>00032 <span class="preprocessor">#ifndef _chemistry_qc_mbptr12_mp2r12energy_h</span> <a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define _chemistry_qc_mbptr12_mp2r12energy_h</span> <a name="l00034"></a>00034 <span class="preprocessor"></span> <a name="l00035"></a>00035 <span class="preprocessor">#include <util/ref/ref.h></span> <a name="l00036"></a>00036 <span class="preprocessor">#include <chemistry/qc/mbptr12/linearr12.h></span> <a name="l00037"></a>00037 <span class="comment">//#include <chemistry/qc/mbptr12/vxb_eval.h></span> <a name="l00038"></a>00038 <span class="preprocessor">#include <chemistry/qc/mbptr12/r12int_eval.h></span> <a name="l00039"></a>00039 <span class="preprocessor">#include <chemistry/qc/mbptr12/twobodygrid.h></span> <a name="l00040"></a>00040 <a name="l00041"></a>00041 <span class="keyword">namespace </span>sc { <a name="l00042"></a>00042 <a name="l00045"></a><a class="code" href="classsc_1_1MP2R12Energy.html">00045</a> <span class="keyword">class </span><a class="code" href="classsc_1_1MP2R12Energy.html" title="Class MP2R12Energy is the object that computes and maintains MP2-R12 energies.">MP2R12Energy</a> : <span class="keyword">virtual</span> <span class="keyword">public</span> <a class="code" href="classsc_1_1SavableState.html" title="Base class for objects that can save/restore state.">SavableState</a> { <a name="l00046"></a>00046 <a name="l00047"></a>00047 <a class="code" href="classsc_1_1Ref.html">Ref<R12IntEval></a> r12eval_; <a name="l00048"></a>00048 LinearR12::StandardApproximation stdapprox_; <a name="l00049"></a>00049 <span class="keywordtype">bool</span> ebc_; <a name="l00050"></a>00050 <span class="keywordtype">int</span> debug_; <a name="l00051"></a>00051 <span class="keywordtype">bool</span> evaluated_; <a name="l00052"></a>00052 <a name="l00053"></a>00053 <a class="code" href="classsc_1_1RefSCVector.html" title="The RefSCVector class is a smart pointer to an SCVector specialization.">RefSCVector</a> er12_aa_, er12_ab_, emp2r12_aa_, emp2r12_ab_; <a name="l00054"></a>00054 <span class="comment">// The coefficients are stored ij by kl, where kl is the r12-multiplied pair</span> <a name="l00055"></a>00055 <a class="code" href="classsc_1_1RefSCMatrix.html" title="The RefSCMatrix class is a smart pointer to an SCMatrix specialization.">RefSCMatrix</a> Caa_, Cab_; <a name="l00056"></a>00056 <a name="l00057"></a>00057 <span class="keywordtype">double</span> emp2tot_aa_() <span class="keyword">const</span>; <a name="l00058"></a>00058 <span class="keywordtype">double</span> emp2tot_ab_() <span class="keyword">const</span>; <a name="l00059"></a>00059 <span class="keywordtype">double</span> er12tot_aa_(); <a name="l00060"></a>00060 <span class="keywordtype">double</span> er12tot_ab_(); <a name="l00061"></a>00061 <a name="l00062"></a>00062 <span class="comment">// Initialize SCVectors and SCMatrices</span> <a name="l00063"></a>00063 <span class="keywordtype">void</span> init_(); <a name="l00064"></a>00064 <a name="l00065"></a>00065 <span class="comment">// Computes values of all 2-body products from</span> <a name="l00066"></a>00066 <span class="comment">// space1 and space2 if electron 1 is at r1 and</span> <a name="l00067"></a>00067 <span class="comment">// electron 2 is at r2. equiv specifies whether electrons</span> <a name="l00068"></a>00068 <span class="comment">// are equivalent (same spin) or not</span> <a name="l00069"></a>00069 <a class="code" href="classsc_1_1RefSCVector.html" title="The RefSCVector class is a smart pointer to an SCVector specialization.">RefSCVector</a> compute_2body_values_(<span class="keywordtype">bool</span> equiv, <span class="keyword">const</span> <a class="code" href="classsc_1_1Ref.html">Ref<MOIndexSpace></a>& space1, <span class="keyword">const</span> <a class="code" href="classsc_1_1Ref.html">Ref<MOIndexSpace></a>& space2, <a name="l00070"></a>00070 <span class="keyword">const</span> SCVector3& r1, <span class="keyword">const</span> SCVector3& r2) <span class="keyword">const</span>; <a name="l00071"></a>00071 <a name="l00072"></a>00072 <span class="keyword">public</span>: <a name="l00073"></a>00073 <a name="l00074"></a>00074 <a class="code" href="classsc_1_1MP2R12Energy.html" title="Class MP2R12Energy is the object that computes and maintains MP2-R12 energies.">MP2R12Energy</a>(<a class="code" href="classsc_1_1StateIn.html" title="Restores objects that derive from SavableState.">StateIn</a>&); <a name="l00075"></a>00075 <a class="code" href="classsc_1_1MP2R12Energy.html" title="Class MP2R12Energy is the object that computes and maintains MP2-R12 energies.">MP2R12Energy</a>(<a class="code" href="classsc_1_1Ref.html">Ref<R12IntEval></a>& r12eval, LinearR12::StandardApproximation stdapp, <span class="keywordtype">int</span> debug); <a name="l00076"></a>00076 ~<a class="code" href="classsc_1_1MP2R12Energy.html" title="Class MP2R12Energy is the object that computes and maintains MP2-R12 energies.">MP2R12Energy</a>(); <a name="l00077"></a>00077 <a name="l00078"></a>00078 <span class="keywordtype">void</span> <a class="code" href="classsc_1_1MP2R12Energy.html#683c5f2338a665e4bce6e8fc7021190e" title="Save the base classes (with save_data_state) and the members in the same order that...">save_data_state</a>(<a class="code" href="classsc_1_1StateOut.html" title="Serializes objects that derive from SavableState.">StateOut</a>&); <a name="l00079"></a>00079 <span class="keywordtype">void</span> obsolete(); <a name="l00080"></a>00080 <span class="keywordtype">void</span> <a class="code" href="classsc_1_1MP2R12Energy.html#fe07b3de4ad13a02e3c6c2f045a57292" title="Print the object.">print</a>(std::ostream&o=<a class="code" href="classsc_1_1ExEnv.html#360216acd1f990e999c0ed46cb350b1f" title="Return an ostream that writes from node 0.">ExEnv::out0</a>()) <span class="keyword">const</span>; <a name="l00081"></a>00081 <span class="keywordtype">void</span> print_pair_energies(<span class="keywordtype">bool</span> spinadapted, std::ostream&so=<a class="code" href="classsc_1_1ExEnv.html#360216acd1f990e999c0ed46cb350b1f" title="Return an ostream that writes from node 0.">ExEnv::out0</a>()); <a name="l00082"></a>00082 <a name="l00083"></a>00083 <a class="code" href="classsc_1_1Ref.html">Ref<R12IntEval></a> r12eval() <span class="keyword">const</span>; <a name="l00084"></a>00084 LinearR12::StandardApproximation stdapp() <span class="keyword">const</span>; <a name="l00087"></a>00087 <span class="keywordtype">bool</span> <a class="code" href="classsc_1_1MP2R12Energy.html#751e27fdb777a5d9f0735c79e1c9005f" title="Returns whether Generalized Brillouin Condition (GBC) was used in evaluation of the...">gbc</a>() <span class="keyword">const</span>; <a name="l00090"></a>00090 <span class="keywordtype">bool</span> <a class="code" href="classsc_1_1MP2R12Energy.html#fe655d79eaad93794dc79d67cee2c939" title="Returns whether Extended Brillouin Condition (EBC) was used in evaluation of the...">ebc</a>() <span class="keyword">const</span>; <a name="l00091"></a>00091 <span class="keywordtype">void</span> set_debug(<span class="keywordtype">int</span> debug); <a name="l00092"></a>00092 <span class="keywordtype">int</span> get_debug() <span class="keyword">const</span>; <a name="l00093"></a>00093 <a name="l00094"></a>00094 <a class="code" href="classsc_1_1RefSCDimension.html" title="The RefSCDimension class is a smart pointer to an SCDimension specialization.">RefSCDimension</a> dim_aa() <span class="keyword">const</span>; <a name="l00095"></a>00095 <a class="code" href="classsc_1_1RefSCDimension.html" title="The RefSCDimension class is a smart pointer to an SCDimension specialization.">RefSCDimension</a> dim_ab() <span class="keyword">const</span>; <a name="l00096"></a>00096 <a class="code" href="classsc_1_1RefSCDimension.html" title="The RefSCDimension class is a smart pointer to an SCDimension specialization.">RefSCDimension</a> dim_s() <span class="keyword">const</span>; <a name="l00097"></a>00097 <a class="code" href="classsc_1_1RefSCDimension.html" title="The RefSCDimension class is a smart pointer to an SCDimension specialization.">RefSCDimension</a> dim_t() <span class="keyword">const</span>; <a name="l00098"></a>00098 <a name="l00100"></a>00100 <span class="keywordtype">void</span> <a class="code" href="classsc_1_1MP2R12Energy.html#d0e060e48fed0e9034e36d567b4bd675" title="Computes the first-order R12 wave function and MP2-R12 energy.">compute</a>(); <a name="l00103"></a>00103 <span class="keywordtype">double</span> <a class="code" href="classsc_1_1MP2R12Energy.html#d2097ea0acf65b5b271c25180232bdcc" title="Computes the value of the alpha-alpha pair function ij when electrons 1 and 2 reside...">compute_pair_function_aa</a>(<span class="keywordtype">int</span> ij, <span class="keyword">const</span> SCVector3& r1, <span class="keyword">const</span> SCVector3& r2); <a name="l00106"></a>00106 <span class="keywordtype">double</span> <a class="code" href="classsc_1_1MP2R12Energy.html#dca003d3fd2cac3a746c9c28df953834" title="Computes the value of the alpha-beta pair function ij when electrons 1 and 2 reside...">compute_pair_function_ab</a>(<span class="keywordtype">int</span> ij, <span class="keyword">const</span> SCVector3& r1, <span class="keyword">const</span> SCVector3& r2); <a name="l00108"></a>00108 <span class="keywordtype">void</span> <a class="code" href="classsc_1_1MP2R12Energy.html#d2097ea0acf65b5b271c25180232bdcc" title="Computes the value of the alpha-alpha pair function ij when electrons 1 and 2 reside...">compute_pair_function_aa</a>(<span class="keywordtype">int</span> ij, <span class="keyword">const</span> <a class="code" href="classsc_1_1Ref.html">Ref<TwoBodyGrid></a>& tbgrid); <a name="l00110"></a>00110 <span class="keywordtype">void</span> <a class="code" href="classsc_1_1MP2R12Energy.html#dca003d3fd2cac3a746c9c28df953834" title="Computes the value of the alpha-beta pair function ij when electrons 1 and 2 reside...">compute_pair_function_ab</a>(<span class="keywordtype">int</span> ij, <span class="keyword">const</span> <a class="code" href="classsc_1_1Ref.html">Ref<TwoBodyGrid></a>& tbgrid); <a name="l00111"></a>00111 <a name="l00113"></a>00113 <a class="code" href="classsc_1_1RefSCVector.html" title="The RefSCVector class is a smart pointer to an SCVector specialization.">RefSCVector</a> <a class="code" href="classsc_1_1MP2R12Energy.html#45c242942faa6fc29c2bf022bd5af596" title="Returns the vector of MP2 alpha-alpha pair energies.">emp2_aa</a>() <span class="keyword">const</span>; <a name="l00115"></a>00115 <a class="code" href="classsc_1_1RefSCVector.html" title="The RefSCVector class is a smart pointer to an SCVector specialization.">RefSCVector</a> <a class="code" href="classsc_1_1MP2R12Energy.html#1cb8ea174f340eced145c20c3dfa1cfd" title="Returns the vector of MP2 alpha-beta pair energies.">emp2_ab</a>() <span class="keyword">const</span>; <a name="l00117"></a>00117 <a class="code" href="classsc_1_1RefSCVector.html" title="The RefSCVector class is a smart pointer to an SCVector specialization.">RefSCVector</a> <a class="code" href="classsc_1_1MP2R12Energy.html#980c79e41668129e21d4a593f5bbb188" title="Returns the vector of R12 corrections to MP2-R12 alpha-alpha pair energies.">er12_aa</a>() <span class="keyword">const</span>; <a name="l00119"></a>00119 <a class="code" href="classsc_1_1RefSCVector.html" title="The RefSCVector class is a smart pointer to an SCVector specialization.">RefSCVector</a> <a class="code" href="classsc_1_1MP2R12Energy.html#81be7ab4f17f0a4ef4b3d890cf4c3ef6" title="Returns the vector of R12 correction to MP2-R12 alpha-beta pair energies.">er12_ab</a>() <span class="keyword">const</span>; <a name="l00121"></a>00121 <a class="code" href="classsc_1_1RefSCVector.html" title="The RefSCVector class is a smart pointer to an SCVector specialization.">RefSCVector</a> <a class="code" href="classsc_1_1MP2R12Energy.html#5d831f36489c6ec5b6dd5910a6d03bf8" title="Returns the vector of MP2-R12 alpha-alpha pair energies.">emp2r12_aa</a>() <span class="keyword">const</span>; <a name="l00123"></a>00123 <a class="code" href="classsc_1_1RefSCVector.html" title="The RefSCVector class is a smart pointer to an SCVector specialization.">RefSCVector</a> <a class="code" href="classsc_1_1MP2R12Energy.html#b2e0ae4e6b0b4607217fa44a2023a21b" title="Returns the vector of MP2-R12 alpha-beta pair energies.">emp2r12_ab</a>() <span class="keyword">const</span>; <a name="l00125"></a>00125 <span class="keywordtype">double</span> <a class="code" href="classsc_1_1MP2R12Energy.html#1ac0af5febe3763f185ff9b6a7639c31" title="Returns total MP2-R12 correlation energy.">energy</a>(); <a name="l00126"></a>00126 <a name="l00131"></a>00131 <a class="code" href="classsc_1_1RefSCMatrix.html" title="The RefSCMatrix class is a smart pointer to an SCMatrix specialization.">RefSCMatrix</a> <a class="code" href="classsc_1_1MP2R12Energy.html#4b88169076153e4e042ab17a70feac01" title="Returns the matrix of amplitudes of alpha-alpha r12-multiplied occupied orbital pairs...">C_aa</a>(); <a name="l00136"></a>00136 <a class="code" href="classsc_1_1RefSCMatrix.html" title="The RefSCMatrix class is a smart pointer to an SCMatrix specialization.">RefSCMatrix</a> <a class="code" href="classsc_1_1MP2R12Energy.html#105e8e69b40bf9bb368fb4904c222bc3" title="Returns the matrix of amplitudes of alpha-beta r12-multiplied occupied orbital pairs...">C_ab</a>(); <a name="l00141"></a>00141 <a class="code" href="classsc_1_1RefSCMatrix.html" title="The RefSCMatrix class is a smart pointer to an SCMatrix specialization.">RefSCMatrix</a> <a class="code" href="classsc_1_1MP2R12Energy.html#1d3c2aa6408ecaabc57e1deaa1494747" title="Returns the matrix of amplitudes of alpha-alpha virtuals orbital pairs in the first-order...">T2_aa</a>(); <a name="l00146"></a>00146 <a class="code" href="classsc_1_1RefSCMatrix.html" title="The RefSCMatrix class is a smart pointer to an SCMatrix specialization.">RefSCMatrix</a> <a class="code" href="classsc_1_1MP2R12Energy.html#9f2f291e25506b867a823b9dd41af23f" title="Returns the matrix of amplitudes of alpha-beta virtuals orbital pairs in the first-order...">T2_ab</a>(); <a name="l00147"></a>00147 <a name="l00148"></a>00148 }; <a name="l00149"></a>00149 <a name="l00150"></a>00150 } <a name="l00151"></a>00151 <a name="l00152"></a>00152 <span class="preprocessor">#endif</span> <a name="l00153"></a>00153 <span class="preprocessor"></span> <a name="l00154"></a>00154 <span class="comment">// Local Variables:</span> <a name="l00155"></a>00155 <span class="comment">// mode: c++</span> <a name="l00156"></a>00156 <span class="comment">// c-file-style: "CLJ"</span> <a name="l00157"></a>00157 <span class="comment">// End:</span> <a name="l00158"></a>00158 <a name="l00159"></a>00159 </pre></div></div> <hr> <address> <small> Generated at Wed Oct 14 14:12:10 2009 for <a href="http://www.mpqc.org">MPQC</a> 2.3.1 using the documentation package <a href="http://www.doxygen.org">Doxygen</a> 1.5.9. </small> </address> </body> </html>