Sophie

Sophie

distrib > Mageia > 2 > i586 > by-pkgid > 006f25f0acc4b3df764eea70a130a63f > files > 540

gnome-chemistry-utils-devel-0.13.5-4.mga2.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>The Gnome Chemistry Utils: bond.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.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">The Gnome Chemistry Utils&#160;<span id="projectnumber">0.13.5</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</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>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_e8e4833ad39bcb8c999c6b13aa077049.html">libs</a>      </li>
      <li class="navelem"><a class="el" href="dir_3ef3fbf7a050ca9d76c05bd6c83d6907.html">gcu</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">gcu/bond.h</div>  </div>
</div>
<div class="contents">
<a href="gcu_2bond_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- C++ -*-</span>
<a name="l00002"></a>00002 
<a name="l00003"></a>00003 <span class="comment">/*</span>
<a name="l00004"></a>00004 <span class="comment"> * Gnome Chemistry Utils</span>
<a name="l00005"></a>00005 <span class="comment"> * bond.h</span>
<a name="l00006"></a>00006 <span class="comment"> *</span>
<a name="l00007"></a>00007 <span class="comment"> * Copyright (C) 2002-2011 Jean Bréfort &lt;jean.brefort@normalesup.org&gt;</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * This program is free software; you can redistribute it and/or</span>
<a name="l00010"></a>00010 <span class="comment"> * modify it under the terms of the GNU General Public License as</span>
<a name="l00011"></a>00011 <span class="comment"> * published by the Free Software Foundation; either version 2 of the</span>
<a name="l00012"></a>00012 <span class="comment"> * License, or (at your option) any later version.</span>
<a name="l00013"></a>00013 <span class="comment"> *</span>
<a name="l00014"></a>00014 <span class="comment"> * This program is distributed in the hope that it will be useful,</span>
<a name="l00015"></a>00015 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00016"></a>00016 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00017"></a>00017 <span class="comment"> * GNU General Public License for more details.</span>
<a name="l00018"></a>00018 <span class="comment"> *</span>
<a name="l00019"></a>00019 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00020"></a>00020 <span class="comment"> * along with this program; if not, write to the Free Software</span>
<a name="l00021"></a>00021 <span class="comment"> * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301</span>
<a name="l00022"></a>00022 <span class="comment"> * USA</span>
<a name="l00023"></a>00023 <span class="comment"> */</span>
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="preprocessor">#ifndef GCU_BOND_H</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define GCU_BOND_H</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;list&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &quot;<a class="code" href="object_8h.html">object.h</a>&quot;</span>
<a name="l00030"></a>00030 
<a name="l00032"></a>00032 <span class="keyword">namespace </span>gcu
<a name="l00033"></a>00033 {
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="keyword">class </span>Atom;
<a name="l00036"></a>00036 <span class="keyword">class </span>Cycle;
<a name="l00037"></a>00037 
<a name="l00042"></a><a class="code" href="classgcu_1_1Bond.html">00042</a> <span class="keyword">class </span><a class="code" href="classgcu_1_1Bond.html">Bond</a>: <span class="keyword">public</span> <a class="code" href="classgcu_1_1Object.html">Object</a>
<a name="l00043"></a>00043 {
<a name="l00044"></a>00044 <span class="keyword">public</span>:
<a name="l00048"></a>00048         <a class="code" href="classgcu_1_1Bond.html#aa4f971822cec7ebc2dd740a4edd7ea00">Bond</a> ();
<a name="l00057"></a>00057         <a class="code" href="classgcu_1_1Bond.html#aa4f971822cec7ebc2dd740a4edd7ea00">Bond</a> (<a class="code" href="classgcu_1_1Atom.html">Atom</a>* first, <a class="code" href="classgcu_1_1Atom.html">Atom</a>* last, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> order);
<a name="l00061"></a>00061         <span class="keyword">virtual</span> <a class="code" href="classgcu_1_1Bond.html#a42e68562f9ed5db56e2248f5cfa570f0">~Bond</a> ();
<a name="l00062"></a>00062 
<a name="l00068"></a>00068         <span class="keyword">virtual</span> <a class="code" href="classgcu_1_1Atom.html">Atom</a>* <a class="code" href="classgcu_1_1Bond.html#a258bd137853571dfed1fb65e5b9a23b7">GetAtom</a> (<span class="keywordtype">int</span> which) <span class="keyword">const</span>; <span class="comment">//0 = first, 1 = last, others reserved (for multicentered bonds?)</span>
<a name="l00075"></a>00075 <span class="comment"></span>        <span class="keyword">virtual</span> <a class="code" href="classgcu_1_1Atom.html">Atom</a>* <a class="code" href="classgcu_1_1Bond.html#a258bd137853571dfed1fb65e5b9a23b7">GetAtom</a> (<a class="code" href="classgcu_1_1Atom.html">Atom</a>* pAtom, <span class="keywordtype">int</span> which = 0) <span class="keyword">const</span>;       <span class="comment">//&quot;which&quot; is just a place holder for multicenter bonds; returns an atom different from pAtom</span>
<a name="l00076"></a>00076                                                                                                                         <span class="comment">//i.e. the other end of the bond</span>
<a name="l00077"></a>00077         <span class="keyword">virtual</span> <a class="code" href="classgcu_1_1Atom.html">Atom</a> <span class="keyword">const</span> * <a class="code" href="classgcu_1_1Bond.html#a258bd137853571dfed1fb65e5b9a23b7">GetAtom</a> (<a class="code" href="classgcu_1_1Atom.html">Atom</a> <span class="keyword">const</span> * pAtom, <span class="keywordtype">int</span> which = 0) <span class="keyword">const</span>;
<a name="l00081"></a>00081         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="classgcu_1_1Bond.html#a34518464642cb9ba44b472f8ef6444b0">GetOrder</a> () <span class="keyword">const</span>;
<a name="l00087"></a>00087         <span class="keywordtype">void</span> <a class="code" href="classgcu_1_1Bond.html#aa3442e178bc0c5126e671093519c5c0e">SetOrder</a> (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> Order);
<a name="l00092"></a>00092         <span class="keyword">virtual</span> xmlNodePtr <a class="code" href="classgcu_1_1Bond.html#a32ea64a60ece754c6b23ebea562bcc7f">Save</a> (xmlDocPtr xml) <span class="keyword">const</span>;
<a name="l00098"></a>00098         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classgcu_1_1Bond.html#ae1bcca3ea3e234e33987df3a75fd69fa">Load</a> (xmlNodePtr node);
<a name="l00104"></a>00104         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classgcu_1_1Bond.html#ae4334fddde1b10a0b214e15ac3ace3a2">IncOrder</a> (<span class="keywordtype">int</span> n = 1);
<a name="l00111"></a>00111         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classgcu_1_1Bond.html#a5c07dfc965d7ff0bcdf31d3cd984b3f5">LoadNode</a> (xmlNodePtr node);
<a name="l00119"></a>00119         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classgcu_1_1Bond.html#a286b3771c349b417f6c4454ca19a737f">SaveNode</a> (xmlDocPtr xml, xmlNodePtr node) <span class="keyword">const</span>;
<a name="l00127"></a>00127         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classgcu_1_1Bond.html#a15d7c0d54ba3cb8e9d2886ff331bb1d1">Move</a> (<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keywordtype">double</span> z = 0.);
<a name="l00135"></a>00135         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classgcu_1_1Bond.html#a2d60a39d5316071e2f49a220348885cf">Transform2D</a> (<a class="code" href="classgcu_1_1Matrix2D.html">Matrix2D</a>&amp; m, <span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y);
<a name="l00136"></a>00136 
<a name="l00144"></a>00144         <span class="keywordtype">bool</span> <a class="code" href="classgcu_1_1Bond.html#a37bf95b6f996cd4201c3c8e2566a717a">SetProperty</a> (<span class="keywordtype">unsigned</span> property, <span class="keywordtype">char</span> <span class="keyword">const</span> *value);
<a name="l00145"></a>00145 
<a name="l00152"></a>00152         std::string <a class="code" href="classgcu_1_1Bond.html#a21346716e777dc738c25bbd78fd35d62">GetProperty</a> (<span class="keywordtype">unsigned</span> property) <span class="keyword">const</span>;
<a name="l00153"></a>00153 
<a name="l00157"></a>00157         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classgcu_1_1Bond.html#a53a6463cbee81f5deb05dd2dd12a3692">AddCycle</a> (<a class="code" href="classgcu_1_1Cycle.html">Cycle</a>* pCycle);
<a name="l00158"></a>00158 
<a name="l00162"></a>00162         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classgcu_1_1Bond.html#ad03a409e582f602e9dc5cc6f767df379">RemoveCycle</a> (<a class="code" href="classgcu_1_1Cycle.html">Cycle</a>* pCycle);
<a name="l00163"></a>00163 
<a name="l00167"></a>00167         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classgcu_1_1Bond.html#a1391f6a56f4bc037d6967e53f81b1893">RemoveAllCycles</a> ();
<a name="l00168"></a>00168 
<a name="l00172"></a><a class="code" href="classgcu_1_1Bond.html#a75360621dc7035f97f351708e492772a">00172</a>         <span class="keywordtype">unsigned</span> <a class="code" href="classgcu_1_1Bond.html#a75360621dc7035f97f351708e492772a">IsCyclic</a> () {<span class="keywordflow">return</span> <a class="code" href="classgcu_1_1Bond.html#a90fbb5deb015bb9ad2c4984e4ee3d045">m_Cycles</a>.size ();}
<a name="l00173"></a>00173 
<a name="l00181"></a>00181         <a class="code" href="classgcu_1_1Cycle.html">Cycle</a>* <a class="code" href="classgcu_1_1Bond.html#a02c2683a36b514930cdaa313838f5ead">GetFirstCycle</a> (std::list&lt;Cycle*&gt;::iterator&amp; i, <a class="code" href="classgcu_1_1Cycle.html">Cycle</a> * pCycle);
<a name="l00182"></a>00182 
<a name="l00190"></a>00190         <a class="code" href="classgcu_1_1Cycle.html">Cycle</a>* <a class="code" href="classgcu_1_1Bond.html#a9e1d6476780eba50ed468049661e0fe6">GetNextCycle</a> (std::list&lt;Cycle*&gt;::iterator&amp; i, <a class="code" href="classgcu_1_1Cycle.html">Cycle</a> * pCycle);
<a name="l00191"></a>00191 
<a name="l00197"></a>00197         <span class="keywordtype">bool</span> <a class="code" href="classgcu_1_1Bond.html#a7454f0f9d5d45d65637d14268570e53f">IsInCycle</a> (<a class="code" href="classgcu_1_1Cycle.html">Cycle</a>* pCycle);
<a name="l00198"></a>00198 
<a name="l00202"></a>00202         <span class="keywordtype">double</span> <a class="code" href="classgcu_1_1Bond.html#a37dfb2b3cd40f3d31cb9c665789debe4">Get2DLength</a> ();
<a name="l00203"></a>00203 
<a name="l00209"></a>00209         <span class="keywordtype">double</span> <a class="code" href="classgcu_1_1Bond.html#a03b8624cbc178a8ec4bcf9427988c464">GetAngle2DRad</a> (<a class="code" href="classgcu_1_1Atom.html">Atom</a>* pAtom);
<a name="l00210"></a>00210 
<a name="l00218"></a>00218         <span class="keywordtype">bool</span> <a class="code" href="classgcu_1_1Bond.html#aa4e7dfe7534172a293836f00d0f20557">ReplaceAtom</a> (<a class="code" href="classgcu_1_1Atom.html">Atom</a>* oldAtom, <a class="code" href="classgcu_1_1Atom.html">Atom</a>* newAtom);
<a name="l00219"></a>00219 
<a name="l00223"></a>00223         <span class="keywordtype">void</span> <a class="code" href="classgcu_1_1Bond.html#a25e547136984cade24ca9d1a7db7b0b9">OnLoaded</a> ();
<a name="l00224"></a>00224 
<a name="l00228"></a>00228         std::string <a class="code" href="classgcu_1_1Bond.html#a73fa8e10d0f906019ff18cec1724e194">Name</a> ();
<a name="l00229"></a>00229 
<a name="l00230"></a>00230 <span class="keyword">protected</span>:
<a name="l00234"></a><a class="code" href="classgcu_1_1Bond.html#a9e7a0678e397de8485d8fb0283e44189">00234</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="classgcu_1_1Bond.html#a9e7a0678e397de8485d8fb0283e44189">m_order</a>;
<a name="l00238"></a><a class="code" href="classgcu_1_1Bond.html#af614faae330ea00d759076238abea71d">00238</a>         <a class="code" href="classgcu_1_1Atom.html">Atom</a> *<a class="code" href="classgcu_1_1Bond.html#af614faae330ea00d759076238abea71d">m_Begin</a>;
<a name="l00242"></a><a class="code" href="classgcu_1_1Bond.html#a889d4abbc7e5a7cd2e46e088d4420eb6">00242</a>         <a class="code" href="classgcu_1_1Atom.html">Atom</a> *<a class="code" href="classgcu_1_1Bond.html#a889d4abbc7e5a7cd2e46e088d4420eb6">m_End</a>;<span class="comment">// only 2 centered bonds, other bonds should be covered by derived classes</span>
<a name="l00243"></a>00243 
<a name="l00247"></a><a class="code" href="classgcu_1_1Bond.html#a90fbb5deb015bb9ad2c4984e4ee3d045">00247</a>         std::list&lt;Cycle*&gt; <a class="code" href="classgcu_1_1Bond.html#a90fbb5deb015bb9ad2c4984e4ee3d045">m_Cycles</a>;
<a name="l00248"></a>00248 };
<a name="l00249"></a>00249 
<a name="l00250"></a>00250 } <span class="comment">// namespace gcu</span>
<a name="l00251"></a>00251 
<a name="l00252"></a>00252 <span class="preprocessor">#endif // GCU_BOND_H</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Fri Nov 11 2011 18:01:05 for The Gnome Chemistry Utils by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>