<!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: sc::SimpleCo Class Reference</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 class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><b>sc</b>::<a class="el" href="classsc_1_1SimpleCo.html">SimpleCo</a> </div> </div> <div class="contents"> <h1>sc::SimpleCo Class Reference</h1><!-- doxytag: class="sc::SimpleCo" --><!-- doxytag: inherits="sc::IntCoor" -->The <a class="el" href="classsc_1_1SimpleCo.html" title="The SimpleCo abstract class describes a simple internal coordinate of a molecule...">SimpleCo</a> abstract class describes a simple internal coordinate of a molecule. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="simple_8h_source.html">simple.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for sc::SimpleCo:</div> <div class="dynsection"> <p><center><img src="classsc_1_1SimpleCo.png" usemap="#sc::SimpleCo_map" border="0" alt=""></center> <map name="sc::SimpleCo_map"> <area href="classsc_1_1IntCoor.html" alt="sc::IntCoor" shape="rect" coords="395,224,543,248"> <area href="classsc_1_1SavableState.html" alt="sc::SavableState" shape="rect" coords="395,168,543,192"> <area href="classsc_1_1DescribedClass.html" alt="sc::DescribedClass" shape="rect" coords="395,112,543,136"> <area href="classsc_1_1RefCount.html" alt="sc::RefCount" shape="rect" coords="395,56,543,80"> <area href="classsc_1_1Identity.html" alt="sc::Identity" shape="rect" coords="395,0,543,24"> <area href="classsc_1_1BendSimpleCo.html" alt="sc::BendSimpleCo" shape="rect" coords="0,336,148,360"> <area href="classsc_1_1LinIPSimpleCo.html" alt="sc::LinIPSimpleCo" shape="rect" coords="158,336,306,360"> <area href="classsc_1_1LinOPSimpleCo.html" alt="sc::LinOPSimpleCo" shape="rect" coords="316,336,464,360"> <area href="classsc_1_1ScaledTorsSimpleCo.html" alt="sc::ScaledTorsSimpleCo" shape="rect" coords="474,336,622,360"> <area href="classsc_1_1StreSimpleCo.html" alt="sc::StreSimpleCo" shape="rect" coords="632,336,780,360"> <area href="classsc_1_1TorsSimpleCo.html" alt="sc::TorsSimpleCo" shape="rect" coords="790,336,938,360"> </map> </div> <p> <a href="classsc_1_1SimpleCo-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1SimpleCo.html#586dd9e1bb276feb0b7d5d1535163156">SimpleCo</a> (int, const char *=0)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">This constructor takes an integer argument which is the number of atoms needed to describe the coordinate. <a href="#586dd9e1bb276feb0b7d5d1535163156"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7d37707cc40982bd3618279c9c4c60d5"></a><!-- doxytag: member="sc::SimpleCo::SimpleCo" ref="7d37707cc40982bd3618279c9c4c60d5" args="(const Ref< KeyVal > &, int natom)" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1SimpleCo.html#7d37707cc40982bd3618279c9c4c60d5">SimpleCo</a> (const <a class="el" href="classsc_1_1Ref.html">Ref</a>< <a class="el" href="classsc_1_1KeyVal.html">KeyVal</a> > &, int natom)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The <a class="el" href="classsc_1_1KeyVal.html" title="The KeyVal class is designed to simplify the process of allowing a user to specify...">KeyVal</a> constructor requires the number of atoms. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6dbd635a6425345a2aab5a1d704eeba8"></a><!-- doxytag: member="sc::SimpleCo::natoms" ref="6dbd635a6425345a2aab5a1d704eeba8" args="() const " --> int </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1SimpleCo.html#6dbd635a6425345a2aab5a1d704eeba8">natoms</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of atoms in the coordinate. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af5648dcccfd8d318da90c4b003245c4"></a><!-- doxytag: member="sc::SimpleCo::operator[]" ref="af5648dcccfd8d318da90c4b003245c4" args="(int i) const " --> int </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1SimpleCo.html#af5648dcccfd8d318da90c4b003245c4">operator[]</a> (int i) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the index of the i'th atom in the coordinate. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1SimpleCo.html#e5d77a1e7645a1ed3e8e6f7141f3408c">save_data_state</a> (<a class="el" href="classsc_1_1StateOut.html">StateOut</a> &)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Save the base classes (with save_data_state) and the members in the same order that the <a class="el" href="classsc_1_1StateIn.html" title="Restores objects that derive from SavableState.">StateIn</a> CTOR initializes them. <a href="#e5d77a1e7645a1ed3e8e6f7141f3408c"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f961701f2e92400400ce6e50528367e1"></a><!-- doxytag: member="sc::SimpleCo::SimpleCo" ref="f961701f2e92400400ce6e50528367e1" args="(StateIn &)" --> </td><td class="memItemRight" valign="bottom"><b>SimpleCo</b> (<a class="el" href="classsc_1_1StateIn.html">StateIn</a> &)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b10f7f7009cfa5591a5f6e6a645c8359"></a><!-- doxytag: member="sc::SimpleCo::operator==" ref="b10f7f7009cfa5591a5f6e6a645c8359" args="(SimpleCo &)" --> virtual int </td><td class="memItemRight" valign="bottom"><b>operator==</b> (<a class="el" href="classsc_1_1SimpleCo.html">SimpleCo</a> &)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cbdc2cb2eceb8b72d4618e098980100f"></a><!-- doxytag: member="sc::SimpleCo::operator!=" ref="cbdc2cb2eceb8b72d4618e098980100f" args="(SimpleCo &u)" --> int </td><td class="memItemRight" valign="bottom"><b>operator!=</b> (<a class="el" href="classsc_1_1SimpleCo.html">SimpleCo</a> &u)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="15fbd34105a0a2ca5acacad0bbb34f43"></a><!-- doxytag: member="sc::SimpleCo::force_constant" ref="15fbd34105a0a2ca5acacad0bbb34f43" args="(Ref< Molecule > &)" --> double </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1SimpleCo.html#15fbd34105a0a2ca5acacad0bbb34f43">force_constant</a> (<a class="el" href="classsc_1_1Ref.html">Ref</a>< <a class="el" href="classsc_1_1Molecule.html">Molecule</a> > &)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns an approximate force constant (a la Almlof). <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1SimpleCo.html#3f1701a5bad283075e540472b907af34">update_value</a> (const <a class="el" href="classsc_1_1Ref.html">Ref</a>< <a class="el" href="classsc_1_1Molecule.html">Molecule</a> > &)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Recalculates the value of the coordinate based on the geometry in the <a class="el" href="classsc_1_1Molecule.html" title="The Molecule class contains information about molecules.">Molecule</a>. <a href="#3f1701a5bad283075e540472b907af34"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="aa198230dec60562506f26d8deda8a8c"></a><!-- doxytag: member="sc::SimpleCo::bmat" ref="aa198230dec60562506f26d8deda8a8c" args="(const Ref< Molecule > &, RefSCVector &bmat, double coef=1.0)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1SimpleCo.html#aa198230dec60562506f26d8deda8a8c">bmat</a> (const <a class="el" href="classsc_1_1Ref.html">Ref</a>< <a class="el" href="classsc_1_1Molecule.html">Molecule</a> > &, <a class="el" href="classsc_1_1RefSCVector.html">RefSCVector</a> &bmat, double coef=1.0)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Fill in a row of the B matrix. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b1228f1ce77f2877e691f5881316c5dc"></a><!-- doxytag: member="sc::SimpleCo::calc_force_con" ref="b1228f1ce77f2877e691f5881316c5dc" args="(Molecule &)=0" --> virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1SimpleCo.html#b1228f1ce77f2877e691f5881316c5dc">calc_force_con</a> (<a class="el" href="classsc_1_1Molecule.html">Molecule</a> &)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculates an approximate force constant and returns it's value. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1SimpleCo.html#10b1ebd40ffbaf10deab875dcbc3a021">calc_intco</a> (<a class="el" href="classsc_1_1Molecule.html">Molecule</a> &, double *=0, double=1)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate the value of the coordinate based on what's in <a class="el" href="classsc_1_1Molecule.html" title="The Molecule class contains information about molecules.">Molecule</a>. <a href="#10b1ebd40ffbaf10deab875dcbc3a021"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b3aa3352e10cf13dba404d67d303a040"></a><!-- doxytag: member="sc::SimpleCo::print_details" ref="b3aa3352e10cf13dba404d67d303a040" args="(const Ref< Molecule > &, std::ostream &=ExEnv::out0()) const " --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1SimpleCo.html#b3aa3352e10cf13dba404d67d303a040">print_details</a> (const <a class="el" href="classsc_1_1Ref.html">Ref</a>< <a class="el" href="classsc_1_1Molecule.html">Molecule</a> > &, std::ostream &=ExEnv::out0()) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Print the coordinate. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1SimpleCo.html#ec8ebf037fefbf66718483c991d6ee98">equivalent</a> (<a class="el" href="classsc_1_1Ref.html">Ref</a>< <a class="el" href="classsc_1_1IntCoor.html">IntCoor</a> > &)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Tests to see if two coordinates are equivalent to each other. <a href="#ec8ebf037fefbf66718483c991d6ee98"></a><br></td></tr> <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="85cf2b0bf1664952a8feb2c950fb29d8"></a><!-- doxytag: member="sc::SimpleCo::natoms_" ref="85cf2b0bf1664952a8feb2c950fb29d8" args="" --> int </td><td class="memItemRight" valign="bottom"><b>natoms_</b></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="423f0dec29c3e9cd5815bf0fc5cb79fa"></a><!-- doxytag: member="sc::SimpleCo::atoms" ref="423f0dec29c3e9cd5815bf0fc5cb79fa" args="" --> int * </td><td class="memItemRight" valign="bottom"><b>atoms</b></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> The <a class="el" href="classsc_1_1SimpleCo.html" title="The SimpleCo abstract class describes a simple internal coordinate of a molecule...">SimpleCo</a> abstract class describes a simple internal coordinate of a molecule. <p> The number atoms involved can be 2, 3 or 4 and is determined by the specialization of <a class="el" href="classsc_1_1SimpleCo.html" title="The SimpleCo abstract class describes a simple internal coordinate of a molecule...">SimpleCo</a>.<p> There are three ways to specify the atoms involved in the internal coordinate. The first way is a shorthand notation, just a vector of a label followed by the atom numbers (starting at 1) is given. For example, a stretch between two atoms, 1 and 2, is given, in the <a class="el" href="classsc_1_1ParsedKeyVal.html" title="Converts textual information into keyword/value assocations.">ParsedKeyVal</a> format, as <pre> stretch<StreSimpleCo>: [ R12 1 2 ] </pre><p> The other two ways to specify the atoms are more general. With them, it is possible to give parameters for the <a class="el" href="classsc_1_1IntCoor.html" title="The IntCoor abstract class describes an internal coordinate of a molecule.">IntCoor</a> base class (and thus give the value of the coordinate). In the first of these input formats, a vector associated with the keyword atoms gives the atom numbers. The following specification for stretch is equivalent to that above: <pre> stretch<StreSimpleCo>:( label = R12 atoms = [ 1 2 ] ) </pre><p> In the second, a vector, atom_labels, is given along with a <a class="el" href="classsc_1_1Molecule.html" title="The Molecule class contains information about molecules.">Molecule</a> object. The atom labels are looked up in the <a class="el" href="classsc_1_1Molecule.html" title="The Molecule class contains information about molecules.">Molecule</a> object to find the atom numbers. The following specification for stretch is equivalent to those above: <pre> molecule<Molecule>: ( { atom_labels atoms geometry } = { H1 H [ 1.0 0.0 0.0 ] H2 H [-1.0 0.0 0.0 ] } ) stretch<StreSimpleCo>:( label = R12 atom_labels = [ H1 H2 ] molecule = $:molecule ) </pre> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="586dd9e1bb276feb0b7d5d1535163156"></a><!-- doxytag: member="sc::SimpleCo::SimpleCo" ref="586dd9e1bb276feb0b7d5d1535163156" args="(int, const char *=0)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">sc::SimpleCo::SimpleCo </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname">, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> = <code>0</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> This constructor takes an integer argument which is the number of atoms needed to describe the coordinate. <p> A second optional char* argument is a label for the coordinate. This argument is passed on to the <a class="el" href="classsc_1_1IntCoor.html" title="The IntCoor abstract class describes an internal coordinate of a molecule.">IntCoor</a> constructor. </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="10b1ebd40ffbaf10deab875dcbc3a021"></a><!-- doxytag: member="sc::SimpleCo::calc_intco" ref="10b1ebd40ffbaf10deab875dcbc3a021" args="(Molecule &, double *=0, double=1)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual double sc::SimpleCo::calc_intco </td> <td>(</td> <td class="paramtype"><a class="el" href="classsc_1_1Molecule.html">Molecule</a> & </td> <td class="paramname">, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double * </td> <td class="paramname"> = <code>0</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> = <code>1</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Calculate the value of the coordinate based on what's in <a class="el" href="classsc_1_1Molecule.html" title="The Molecule class contains information about molecules.">Molecule</a>. <p> If given a double*, fill in that part of the B matrix. If the bmatrix is to be calculated, the third argument gives the coefficient. </div> </div><p> <a class="anchor" name="ec8ebf037fefbf66718483c991d6ee98"></a><!-- doxytag: member="sc::SimpleCo::equivalent" ref="ec8ebf037fefbf66718483c991d6ee98" args="(Ref< IntCoor > &)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int sc::SimpleCo::equivalent </td> <td>(</td> <td class="paramtype"><a class="el" href="classsc_1_1Ref.html">Ref</a>< <a class="el" href="classsc_1_1IntCoor.html">IntCoor</a> > & </td> <td class="paramname"> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Tests to see if two coordinates are equivalent to each other. <p> This is false if the atoms don't match. <p>Implements <a class="el" href="classsc_1_1IntCoor.html#257baf6ad2f5acbde08a53921889881d">sc::IntCoor</a>.</p> </div> </div><p> <a class="anchor" name="e5d77a1e7645a1ed3e8e6f7141f3408c"></a><!-- doxytag: member="sc::SimpleCo::save_data_state" ref="e5d77a1e7645a1ed3e8e6f7141f3408c" args="(StateOut &)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void sc::SimpleCo::save_data_state </td> <td>(</td> <td class="paramtype"><a class="el" href="classsc_1_1StateOut.html">StateOut</a> & </td> <td class="paramname"> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Save the base classes (with save_data_state) and the members in the same order that the <a class="el" href="classsc_1_1StateIn.html" title="Restores objects that derive from SavableState.">StateIn</a> CTOR initializes them. <p> This must be implemented by the derived class if the class has data. <p>Reimplemented from <a class="el" href="classsc_1_1IntCoor.html#948f573e29ca6a9a3d025547ced8a2b1">sc::IntCoor</a>.</p> </div> </div><p> <a class="anchor" name="3f1701a5bad283075e540472b907af34"></a><!-- doxytag: member="sc::SimpleCo::update_value" ref="3f1701a5bad283075e540472b907af34" args="(const Ref< Molecule > &)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void sc::SimpleCo::update_value </td> <td>(</td> <td class="paramtype">const <a class="el" href="classsc_1_1Ref.html">Ref</a>< <a class="el" href="classsc_1_1Molecule.html">Molecule</a> > & </td> <td class="paramname"> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Recalculates the value of the coordinate based on the geometry in the <a class="el" href="classsc_1_1Molecule.html" title="The Molecule class contains information about molecules.">Molecule</a>. <p> <p>Implements <a class="el" href="classsc_1_1IntCoor.html#8828313a2c5909e0338488ae4fb30785">sc::IntCoor</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="simple_8h_source.html">simple.h</a></ul> </div> <hr> <address> <small> Generated at Wed Oct 14 14:12:13 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>