<!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>fdhess.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:36 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>fdhess.h</h1><div class="fragment"><pre>00001 <font class="comment">//</font> 00002 <font class="comment">// fdhess.h</font> 00003 <font class="comment">//</font> 00004 <font class="comment">// Copyright (C) 1997 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_molecule_fdhess_h</font> 00029 <font class="preprocessor"></font><font class="preprocessor">#define _chemistry_molecule_fdhess_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 <chemistry/molecule/hess.h></font> 00038 <font class="preprocessor">#include <chemistry/molecule/energy.h></font> 00039 00040 <font class="keyword">namespace </font>sc { 00041 <a name="l00043"></a><a class="code" href="class_sc__FinDispMolecularHessian.html">00043</a> <font class="keyword">class </font>FinDispMolecularHessian: <font class="keyword">public</font> MolecularHessian { 00044 <font class="keyword">protected</font>: 00045 Ref<MolecularEnergy> mole_; 00046 <font class="comment">// In case molecule must be given in lower symmetry, its actual</font> 00047 <font class="comment">// symmetry and the symmetry used to compute displacements is this</font> 00048 Ref<PointGroup> displacement_point_group_; 00049 <font class="comment">// The molecule's original point group for restoration at the end.</font> 00050 Ref<PointGroup> original_point_group_; 00051 <font class="comment">// The molecule's original geometry for restoration at the end and</font> 00052 <font class="comment">//computing displacements.</font> 00053 RefSCVector original_geometry_; 00054 <font class="comment">// the cartesian displacement size in bohr</font> 00055 <font class="keywordtype">double</font> disp_; 00056 <font class="comment">// the accuracy for gradient calculations</font> 00057 <font class="keywordtype">double</font> accuracy_; 00058 <font class="comment">// the number of completed displacements</font> 00059 <font class="keywordtype">int</font> ndisp_; 00060 <font class="comment">// the number of irreps in the displacement point group</font> 00061 <font class="keywordtype">int</font> nirrep_; 00062 <font class="comment">// whether or not to attempt a restart</font> 00063 <font class="keywordtype">int</font> restart_; 00064 <font class="comment">// the name of the restart file</font> 00065 <font class="keywordtype">char</font> *restart_file_; 00066 <font class="comment">// whether or not to checkpoint</font> 00067 <font class="keywordtype">int</font> checkpoint_; 00068 <font class="comment">// the name of the checkpoint file</font> 00069 <font class="keywordtype">char</font> *checkpoint_file_; 00070 <font class="comment">// only do the totally symmetric displacements</font> 00071 <font class="keywordtype">int</font> only_totally_symmetric_; 00072 <font class="comment">// eliminate the cubic terms by doing an extra displacement for</font> 00073 <font class="comment">//each of the totally symmetry coordinates</font> 00074 <font class="keywordtype">int</font> eliminate_cubic_terms_; 00075 <font class="comment">// use the gradient at the initial geometry to remove first order terms</font> 00076 <font class="comment">// (important if not at equilibrium geometry)</font> 00077 <font class="keywordtype">int</font> do_null_displacement_; 00078 <font class="comment">// print flag</font> 00079 <font class="keywordtype">int</font> debug_; 00080 <font class="comment">// a basis for the symmetrized cartesian coordinates</font> 00081 RefSCMatrix symbasis_; 00082 <font class="comment">// the gradients at each of the displacements</font> 00083 RefSCVector *gradients_; 00084 00085 <font class="keywordtype">void</font> get_disp(<font class="keywordtype">int</font> disp, <font class="keywordtype">int</font> &irrep, <font class="keywordtype">int</font> &index, <font class="keywordtype">double</font> &coef); 00086 <font class="keywordtype">void</font> do_hess_for_irrep(<font class="keywordtype">int</font> irrep, 00087 <font class="keyword">const</font> RefSymmSCMatrix &dhessian, 00088 <font class="keyword">const</font> RefSymmSCMatrix &xhessian); 00089 <font class="keywordtype">void</font> init(); 00090 <font class="keywordtype">void</font> restart(); 00091 <font class="keyword">public</font>: 00092 FinDispMolecularHessian(<font class="keyword">const</font> Ref<MolecularEnergy>&); 00093 FinDispMolecularHessian(<font class="keyword">const</font> Ref<KeyVal>&); 00094 FinDispMolecularHessian(StateIn&); 00095 ~FinDispMolecularHessian(); 00096 <font class="keywordtype">void</font> <a class="code" href="class_sc__FinDispMolecularHessian.html#a4">save_data_state</a>(StateOut&); 00097 00100 RefSymmSCMatrix <a class="code" href="class_sc__FinDispMolecularHessian.html#a5">compute_hessian_from_gradients</a>(); 00101 <font class="keywordtype">int</font> ndisplace() <font class="keyword">const</font>; 00102 <font class="keywordtype">int</font> ndisplacements_done()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> ndisp_; } 00103 RefSCMatrix displacements(<font class="keywordtype">int</font> irrep) <font class="keyword">const</font>; 00104 <font class="keywordtype">void</font> displace(<font class="keywordtype">int</font> disp); 00105 <font class="keywordtype">void</font> original_geometry(); 00106 <font class="keywordtype">void</font> set_gradient(<font class="keywordtype">int</font> disp, <font class="keyword">const</font> RefSCVector &grad); 00107 <font class="keywordtype">void</font> checkpoint_displacements(StateOut&); 00108 <font class="keywordtype">void</font> restore_displacements(StateIn&); 00109 00112 RefSymmSCMatrix <a class="code" href="class_sc__FinDispMolecularHessian.html#a14">cartesian_hessian</a>(); 00113 <a name="l00115"></a><a class="code" href="class_sc__FinDispMolecularHessian.html#a15">00115</a> <font class="keywordtype">void</font> <a class="code" href="class_sc__FinDispMolecularHessian.html#a15">set_checkpoint</a>(<font class="keywordtype">int</font> c)<font class="keyword"> </font>{ checkpoint_ = c; } <a name="l00117"></a><a class="code" href="class_sc__FinDispMolecularHessian.html#a16">00117</a> <font class="keywordtype">int</font> <a class="code" href="class_sc__FinDispMolecularHessian.html#a16">checkpoint</a>()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> checkpoint_; } 00118 00119 <font class="keywordtype">void</font> set_energy(<font class="keyword">const</font> Ref<MolecularEnergy> &energy); 00120 MolecularEnergy* energy() <font class="keyword">const</font>; 00121 00122 Ref<SCMatrixKit> matrixkit()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> mole_->matrixkit(); } 00123 RefSCDimension d3natom()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> mole_->moldim(); } 00124 }; 00125 00126 } 00127 00128 <font class="preprocessor">#endif</font> 00129 <font class="preprocessor"></font> 00130 <font class="comment">// Local Variables:</font> 00131 <font class="comment">// mode: c++</font> 00132 <font class="comment">// c-file-style: "CLJ"</font> 00133 <font class="comment">// End:</font> </div></pre><hr> <address> <small> Generated at Mon Oct 14 14:16:36 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>