<!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: 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>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">// energy.h</span> <a name="l00003"></a>00003 <span class="comment">//</span> <a name="l00004"></a>00004 <span class="comment">// Copyright (C) 1996 Limit Point Systems, Inc.</span> <a name="l00005"></a>00005 <span class="comment">//</span> <a name="l00006"></a>00006 <span class="comment">// Author: Curtis Janssen <cljanss@limitpt.com></span> <a name="l00007"></a>00007 <span class="comment">// Maintainer: LPS</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">#ifndef _chemistry_molecule_energy_h</span> <a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define _chemistry_molecule_energy_h</span> <a name="l00030"></a>00030 <span class="preprocessor"></span> <a name="l00031"></a>00031 <span class="preprocessor">#ifdef __GNUC__</span> <a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#pragma interface</span> <a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00034"></a>00034 <span class="preprocessor"></span> <a name="l00035"></a>00035 <span class="preprocessor">#include <iostream></span> <a name="l00036"></a>00036 <a name="l00037"></a>00037 <span class="preprocessor">#include <math/optimize/function.h></span> <a name="l00038"></a>00038 <span class="preprocessor">#include <math/optimize/conv.h></span> <a name="l00039"></a>00039 <span class="preprocessor">#include <chemistry/molecule/molecule.h></span> <a name="l00040"></a>00040 <span class="preprocessor">#include <chemistry/molecule/coor.h></span> <a name="l00041"></a>00041 <span class="preprocessor">#include <chemistry/molecule/hess.h></span> <a name="l00042"></a>00042 <a name="l00043"></a>00043 <span class="keyword">namespace </span>sc { <a name="l00044"></a>00044 <a name="l00048"></a><a class="code" href="classsc_1_1MolecularEnergy.html">00048</a> <span class="keyword">class </span><a class="code" href="classsc_1_1MolecularEnergy.html" title="The MolecularEnergy abstract class inherits from the Function class.">MolecularEnergy</a>: <span class="keyword">public</span> <a class="code" href="classsc_1_1Function.html" title="The Function class is an abstract base class that, given a set of coordinates, will...">Function</a> { <a name="l00049"></a>00049 <span class="keyword">private</span>: <a name="l00050"></a>00050 <a class="code" href="classsc_1_1RefSCDimension.html" title="The RefSCDimension class is a smart pointer to an SCDimension specialization.">RefSCDimension</a> moldim_; <span class="comment">// the number of cartesian variables</span> <a name="l00051"></a>00051 <a class="code" href="classsc_1_1Ref.html">Ref<MolecularCoor></a> mc_; <a name="l00052"></a>00052 <a class="code" href="classsc_1_1Ref.html">Ref<Molecule></a> mol_; <a name="l00053"></a>00053 <a class="code" href="classsc_1_1Ref.html">Ref<MolecularHessian></a> hess_; <a name="l00054"></a>00054 <a class="code" href="classsc_1_1Ref.html">Ref<MolecularHessian></a> guesshess_; <a name="l00055"></a>00055 <a name="l00056"></a>00056 <a class="code" href="classsc_1_1RefSCVector.html" title="The RefSCVector class is a smart pointer to an SCVector specialization.">RefSCVector</a> cartesian_gradient_; <a name="l00057"></a>00057 <a class="code" href="classsc_1_1RefSymmSCMatrix.html" title="The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization...">RefSymmSCMatrix</a> cartesian_hessian_; <a name="l00058"></a>00058 <a name="l00060"></a>00060 <span class="keywordtype">bool</span> ckpt_; <a name="l00062"></a>00062 <span class="keywordtype">char</span> *ckpt_file_; <a name="l00064"></a>00064 <span class="keywordtype">int</span> ckpt_freq_; <a name="l00065"></a>00065 <a name="l00066"></a>00066 <span class="keyword">protected</span>: <a name="l00067"></a>00067 <a class="code" href="classsc_1_1Ref.html">Ref<PointGroup></a> initial_pg_; <a name="l00068"></a>00068 <a name="l00069"></a>00069 <span class="keywordtype">void</span> failure(<span class="keyword">const</span> <span class="keywordtype">char</span> *); <a name="l00070"></a>00070 <a name="l00072"></a>00072 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsc_1_1MolecularEnergy.html#91f22cfda8dc508d1ce94479bf81ae41" title="This is just a wrapper around set_value().">set_energy</a>(<span class="keywordtype">double</span>); <a name="l00073"></a>00073 <a name="l00076"></a>00076 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsc_1_1MolecularEnergy.html#441d0e26ed9cea2fc38d81dc88dc5ea2" title="These are passed gradients and hessian in cartesian coordinates.">set_gradient</a>(<a class="code" href="classsc_1_1RefSCVector.html" title="The RefSCVector class is a smart pointer to an SCVector specialization.">RefSCVector</a>&); <a name="l00077"></a>00077 <span class="keyword">virtual</span> <span class="keywordtype">void</span> set_hessian(<a class="code" href="classsc_1_1RefSymmSCMatrix.html" title="The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization...">RefSymmSCMatrix</a>&); <a name="l00078"></a>00078 <a name="l00079"></a>00079 <span class="keywordtype">void</span> x_to_molecule(); <a name="l00080"></a>00080 <span class="keywordtype">void</span> molecule_to_x(); <a name="l00081"></a>00081 <a name="l00082"></a>00082 <span class="keywordtype">int</span> print_molecule_when_changed_; <a name="l00083"></a>00083 <span class="keyword">public</span>: <a name="l00084"></a>00084 <a class="code" href="classsc_1_1MolecularEnergy.html" title="The MolecularEnergy abstract class inherits from the Function class.">MolecularEnergy</a>(<span class="keyword">const</span> <a class="code" href="classsc_1_1MolecularEnergy.html" title="The MolecularEnergy abstract class inherits from the Function class.">MolecularEnergy</a>&); <a name="l00135"></a>00135 <a class="code" href="classsc_1_1MolecularEnergy.html" title="The MolecularEnergy abstract class inherits from the Function class.">MolecularEnergy</a>(<span class="keyword">const</span> <a class="code" href="classsc_1_1Ref.html">Ref<KeyVal></a>&); <a name="l00136"></a>00136 <a class="code" href="classsc_1_1MolecularEnergy.html" title="The MolecularEnergy abstract class inherits from the Function class.">MolecularEnergy</a>(<a class="code" href="classsc_1_1StateIn.html" title="Restores objects that derive from SavableState.">StateIn</a>&); <a name="l00137"></a>00137 ~<a class="code" href="classsc_1_1MolecularEnergy.html" title="The MolecularEnergy abstract class inherits from the Function class.">MolecularEnergy</a>(); <a name="l00138"></a>00138 <a name="l00139"></a>00139 <span class="keywordtype">void</span> <a class="code" href="classsc_1_1MolecularEnergy.html#1ec669bc0334cafd4e6f462827df6f5e" 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="l00140"></a>00140 <a name="l00142"></a>00142 <span class="keywordtype">void</span> <a class="code" href="classsc_1_1MolecularEnergy.html#a31ded722594ff736ce127bd02493170" title="Set up checkpointing.">set_checkpoint</a>(); <a name="l00143"></a>00143 <span class="keywordtype">void</span> set_checkpoint_file(<span class="keyword">const</span> <span class="keywordtype">char</span>*); <a name="l00144"></a>00144 <span class="keywordtype">void</span> set_checkpoint_freq(<span class="keywordtype">int</span> freq); <a name="l00146"></a>00146 <span class="keywordtype">bool</span> <a class="code" href="classsc_1_1MolecularEnergy.html#c74725251f86f8dc26a098ed911bbaf3" title="Check if need to checkpoint.">if_to_checkpoint</a>() <span class="keyword">const</span>; <a name="l00147"></a>00147 <span class="keyword">const</span> <span class="keywordtype">char</span>* checkpoint_file() <span class="keyword">const</span>; <a name="l00148"></a>00148 <span class="keywordtype">int</span> checkpoint_freq() <span class="keyword">const</span>; <a name="l00149"></a>00149 <a name="l00150"></a>00150 <a class="code" href="classsc_1_1MolecularEnergy.html" title="The MolecularEnergy abstract class inherits from the Function class.">MolecularEnergy</a> & operator=(<span class="keyword">const</span> <a class="code" href="classsc_1_1MolecularEnergy.html" title="The MolecularEnergy abstract class inherits from the Function class.">MolecularEnergy</a>&); <a name="l00151"></a>00151 <a name="l00153"></a>00153 <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classsc_1_1MolecularEnergy.html#39c918d7aefc3d389ec8ecbe54f10637" title="A wrapper around value();.">energy</a>(); <a name="l00154"></a>00154 <a name="l00155"></a>00155 <span class="keyword">virtual</span> <a class="code" href="classsc_1_1Ref.html">Ref<Molecule></a> molecule() <span class="keyword">const</span>; <a name="l00156"></a>00156 <span class="keyword">virtual</span> <a class="code" href="classsc_1_1RefSCDimension.html" title="The RefSCDimension class is a smart pointer to an SCDimension specialization.">RefSCDimension</a> moldim() <span class="keyword">const</span>; <a name="l00157"></a>00157 <a name="l00158"></a>00158 <span class="keywordtype">void</span> <a class="code" href="classsc_1_1MolecularEnergy.html#4500df28d0592e910df86571d84588ee" title="Compute a quick, approximate hessian.">guess_hessian</a>(<a class="code" href="classsc_1_1RefSymmSCMatrix.html" title="The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization...">RefSymmSCMatrix</a>&); <a name="l00159"></a>00159 <a class="code" href="classsc_1_1RefSymmSCMatrix.html" title="The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization...">RefSymmSCMatrix</a> inverse_hessian(<a class="code" href="classsc_1_1RefSymmSCMatrix.html" title="The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization...">RefSymmSCMatrix</a>&); <a name="l00160"></a>00160 <a name="l00163"></a>00163 <a class="code" href="classsc_1_1RefSymmSCMatrix.html" title="The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization...">RefSymmSCMatrix</a> <a class="code" href="classsc_1_1MolecularEnergy.html#7ca73b0e3a11675cca9992b0d1bf262f" title="If a molecule hessian object is given, it will be used to provide a hessian.">hessian</a>(); <a name="l00164"></a>00164 <span class="keywordtype">int</span> hessian_implemented() <span class="keyword">const</span>; <a name="l00165"></a>00165 <a name="l00166"></a>00166 <span class="keywordtype">void</span> <a class="code" href="classsc_1_1MolecularEnergy.html#c60a11846b974541a1abeb88dbccdd6a" title="Set and retrieve the coordinate values.">set_x</a>(<span class="keyword">const</span> <a class="code" href="classsc_1_1RefSCVector.html" title="The RefSCVector class is a smart pointer to an SCVector specialization.">RefSCVector</a>&); <a name="l00167"></a>00167 <a name="l00169"></a>00169 <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_1MolecularEnergy.html#25eb3e9547d3f6b62810d5670e3995ba" title="Return the cartesian coordinates.">get_cartesian_x</a>(); <a name="l00171"></a>00171 <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_1MolecularEnergy.html#3984fd5f1ad86f80c91e76970c1c00b2" title="Return the cartesian gradient.">get_cartesian_gradient</a>(); <a name="l00173"></a>00173 <a class="code" href="classsc_1_1RefSymmSCMatrix.html" title="The RefSymmSCMatrix class is a smart pointer to an SCSymmSCMatrix specialization...">RefSymmSCMatrix</a> <a class="code" href="classsc_1_1MolecularEnergy.html#0419a944538171a7d15f750f475c8171" title="Return the cartesian hessian.">get_cartesian_hessian</a>(); <a name="l00174"></a>00174 <a name="l00175"></a>00175 <a class="code" href="classsc_1_1Ref.html">Ref<MolecularCoor></a> molecularcoor() { <span class="keywordflow">return</span> mc_; } <a name="l00176"></a>00176 <a name="l00179"></a>00179 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsc_1_1MolecularEnergy.html#e6d35df9fa023502ffaffa9a5e15b918" title="Call this if you have changed the molecular symmetry of the molecule contained by...">symmetry_changed</a>(); <a name="l00180"></a>00180 <a name="l00181"></a>00181 <a class="code" href="classsc_1_1Ref.html" title="A template class that maintains references counts.">Ref<NonlinearTransform></a> <a class="code" href="classsc_1_1MolecularEnergy.html#10f7fa4c6c89628ddbfca08a7aafbb5b" title="An optimizer can call change coordinates periodically to give the function an opportunity...">change_coordinates</a>(); <a name="l00182"></a>00182 <a name="l00184"></a>00184 <span class="keywordtype">void</span> <a class="code" href="classsc_1_1MolecularEnergy.html#a2ee8c2bc231e365279c9da15216d6df" title="Nicely print n x 3 data that are stored in a vector.">print_natom_3</a>(<span class="keyword">const</span> <a class="code" href="classsc_1_1RefSCVector.html" title="The RefSCVector class is a smart pointer to an SCVector specialization.">RefSCVector</a> &, <a name="l00185"></a>00185 <span class="keyword">const</span> <span class="keywordtype">char</span> *t=0, 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="l00186"></a>00186 <span class="keywordtype">void</span> <a class="code" href="classsc_1_1MolecularEnergy.html#a2ee8c2bc231e365279c9da15216d6df" title="Nicely print n x 3 data that are stored in a vector.">print_natom_3</a>(<span class="keywordtype">double</span> **, <span class="keyword">const</span> <span class="keywordtype">char</span> *t=0, 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="l00187"></a>00187 <span class="keywordtype">void</span> <a class="code" href="classsc_1_1MolecularEnergy.html#a2ee8c2bc231e365279c9da15216d6df" title="Nicely print n x 3 data that are stored in a vector.">print_natom_3</a>(<span class="keywordtype">double</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *t=0, 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="l00188"></a>00188 <a name="l00189"></a>00189 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsc_1_1MolecularEnergy.html#6ab2f4cd626cfeade997271f1300df5b" title="Print information about the object.">print</a>(std::ostream& = <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="l00190"></a>00190 }; <a name="l00191"></a>00191 <a name="l00192"></a>00192 <a name="l00193"></a>00193 <span class="keyword">class </span>SumMolecularEnergy: <span class="keyword">public</span> <a class="code" href="classsc_1_1MolecularEnergy.html" title="The MolecularEnergy abstract class inherits from the Function class.">MolecularEnergy</a> { <a name="l00194"></a>00194 <span class="keyword">protected</span>: <a name="l00195"></a>00195 <span class="keywordtype">int</span> n_; <a name="l00196"></a>00196 <a class="code" href="classsc_1_1Ref.html">Ref<MolecularEnergy></a> *mole_; <a name="l00197"></a>00197 <span class="keywordtype">double</span> *coef_; <a name="l00198"></a>00198 <span class="keywordtype">void</span> compute(); <a name="l00199"></a>00199 <span class="keyword">public</span>: <a name="l00200"></a>00200 SumMolecularEnergy(<span class="keyword">const</span> <a class="code" href="classsc_1_1Ref.html">Ref<KeyVal></a> &); <a name="l00201"></a>00201 SumMolecularEnergy(<a class="code" href="classsc_1_1StateIn.html" title="Restores objects that derive from SavableState.">StateIn</a>&); <a name="l00202"></a>00202 ~SumMolecularEnergy(); <a name="l00203"></a>00203 <a name="l00204"></a>00204 <span class="keywordtype">void</span> save_data_state(<a class="code" href="classsc_1_1StateOut.html" title="Serializes objects that derive from SavableState.">StateOut</a>&); <a name="l00205"></a>00205 <a name="l00206"></a>00206 <span class="keywordtype">int</span> value_implemented() <span class="keyword">const</span>; <a name="l00207"></a>00207 <span class="keywordtype">int</span> gradient_implemented() <span class="keyword">const</span>; <a name="l00208"></a>00208 <span class="keywordtype">int</span> hessian_implemented() <span class="keyword">const</span>; <a name="l00209"></a>00209 <a name="l00210"></a>00210 <span class="keywordtype">void</span> set_x(<span class="keyword">const</span> <a class="code" href="classsc_1_1RefSCVector.html" title="The RefSCVector class is a smart pointer to an SCVector specialization.">RefSCVector</a>&); <a name="l00211"></a>00211 }; <a name="l00212"></a>00212 <a name="l00213"></a>00213 <a name="l00214"></a>00214 <span class="comment">/* The MolEnergyConvergence class derives from the Convergence class. The</span> <a name="l00215"></a>00215 <span class="comment">MolEnergyConvergence class allows the user to request that cartesian</span> <a name="l00216"></a>00216 <span class="comment">coordinates be used in evaluating the convergence criteria. This is</span> <a name="l00217"></a>00217 <span class="comment">useful, since the internal coordinates can be somewhat arbitary. If the</span> <a name="l00218"></a>00218 <span class="comment">optimization is constrained, then the fixed internal coordinates will be</span> <a name="l00219"></a>00219 <span class="comment">projected out of the cartesian gradients. The input is similar to that for</span> <a name="l00220"></a>00220 <span class="comment">Convergence class with the exception that giving none of the convergence</span> <a name="l00221"></a>00221 <span class="comment">criteria keywords is the same as providing the following input to the</span> <a name="l00222"></a>00222 <span class="comment">KeyVal constructor:</span> <a name="l00223"></a>00223 <span class="comment"></span> <a name="l00224"></a>00224 <span class="comment"><pre></span> <a name="l00225"></a>00225 <span class="comment"> conv<MolEnergyConvergence>: (</span> <a name="l00226"></a>00226 <span class="comment"> max_disp = 1.0e-4</span> <a name="l00227"></a>00227 <span class="comment"> max_grad = 1.0e-4</span> <a name="l00228"></a>00228 <span class="comment"> graddisp = 1.0e-4</span> <a name="l00229"></a>00229 <span class="comment"> )</span> <a name="l00230"></a>00230 <span class="comment"></pre></span> <a name="l00231"></a>00231 <span class="comment"></span> <a name="l00232"></a>00232 <span class="comment">For MolEnergyConverence to work, the Function object given to the Optimizer</span> <a name="l00233"></a>00233 <span class="comment">object must derive from MolecularEnergy.</span> <a name="l00234"></a>00234 <span class="comment">*/</span> <a name="l00235"></a>00235 <span class="keyword">class </span>MolEnergyConvergence: <span class="keyword">public</span> Convergence { <a name="l00236"></a>00236 <span class="keyword">protected</span>: <a name="l00237"></a>00237 Ref<MolecularEnergy> mole_; <a name="l00238"></a>00238 <span class="keywordtype">int</span> cartesian_; <a name="l00239"></a>00239 <a name="l00240"></a>00240 <span class="keywordtype">void</span> set_defaults(); <a name="l00241"></a>00241 <span class="keyword">public</span>: <a name="l00242"></a>00242 <span class="comment">// Standard constructors and destructor.</span> <a name="l00243"></a>00243 MolEnergyConvergence(); <a name="l00244"></a>00244 MolEnergyConvergence(StateIn&); <a name="l00262"></a>00262 MolEnergyConvergence(<span class="keyword">const</span> Ref<KeyVal>&); <a name="l00263"></a>00263 <span class="keyword">virtual</span> ~MolEnergyConvergence(); <a name="l00264"></a>00264 <a name="l00265"></a>00265 <span class="keywordtype">void</span> save_data_state(StateOut&); <a name="l00266"></a>00266 <a name="l00267"></a>00267 <span class="comment">// Set the current gradient and position information. These</span> <a name="l00268"></a>00268 <span class="comment">//will possibly grab the cartesian infomation if we have a</span> <a name="l00269"></a>00269 <span class="comment">//MolecularEnergy.</span> <a name="l00270"></a>00270 <span class="keywordtype">void</span> get_grad(<span class="keyword">const</span> Ref<Function> &); <a name="l00271"></a>00271 <span class="keywordtype">void</span> get_x(<span class="keyword">const</span> Ref<Function> &); <a name="l00272"></a>00272 <span class="keywordtype">void</span> set_nextx(<span class="keyword">const</span> RefSCVector &); <a name="l00273"></a>00273 <a name="l00274"></a>00274 <span class="comment">// Return nonzero if the optimization has converged.</span> <a name="l00275"></a>00275 <span class="keywordtype">int</span> converged(); <a name="l00276"></a>00276 }; <a name="l00277"></a>00277 <a name="l00278"></a>00278 } <a name="l00279"></a>00279 <a name="l00280"></a>00280 <span class="preprocessor">#endif</span> <a name="l00281"></a>00281 <span class="preprocessor"></span> <a name="l00282"></a>00282 <span class="comment">// Local Variables:</span> <a name="l00283"></a>00283 <span class="comment">// mode: c++</span> <a name="l00284"></a>00284 <span class="comment">// c-file-style: "CLJ"</span> <a name="l00285"></a>00285 <span class="comment">// End:</span> </pre></div></div> <hr> <address> <small> Generated at Wed Oct 14 14:12:09 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>