Sophie

Sophie

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

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: atom.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_19cf18cc2d5d898d5ac56b2f3abfcca6.html">gcr</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">gcr/atom.h</div>  </div>
</div>
<div class="contents">
<a href="gcr_2atom_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"> * gcr/atom.h</span>
<a name="l00006"></a>00006 <span class="comment"> *</span>
<a name="l00007"></a>00007 <span class="comment"> * Copyright (C) 2002-2010 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 GCR_ATOM_H</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define GCR_ATOM_H</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;<a class="code" href="gcu_2atom_8h.html">gcu/atom.h</a>&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;<a class="code" href="chemistry_8h.html">gcu/chemistry.h</a>&gt;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;<a class="code" href="macros_8h.html">gcu/macros.h</a>&gt;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;libxml/parser.h&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;libxml/parserInternals.h&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;libxml/xmlmemory.h&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;list&gt;</span>
<a name="l00035"></a>00035 
<a name="l00037"></a>00037 <span class="keyword">namespace </span>gcr
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039 
<a name="l00040"></a>00040 <span class="preprocessor">#define PREC 1e-3</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span>
<a name="l00045"></a><a class="code" href="classgcr_1_1Atom.html">00045</a> <span class="keyword">class </span><a class="code" href="classgcr_1_1Atom.html">Atom</a> : <span class="keyword">public</span> gcu::<a class="code" href="classgcr_1_1Atom.html">Atom</a>
<a name="l00046"></a>00046 {
<a name="l00047"></a>00047 <span class="keyword">public</span>:
<a name="l00048"></a>00048 <span class="comment">/*</span>
<a name="l00049"></a>00049 <span class="comment">The default constructor.</span>
<a name="l00050"></a>00050 <span class="comment">*/</span>
<a name="l00051"></a>00051         <a class="code" href="classgcr_1_1Atom.html#a98d209e08beb455c8d051512c08ce5c9">Atom</a> ();
<a name="l00052"></a>00052 <span class="comment">/*</span>
<a name="l00053"></a>00053 <span class="comment">The destructor of Atom.</span>
<a name="l00054"></a>00054 <span class="comment">*/</span>
<a name="l00055"></a>00055         <span class="keyword">virtual</span> <a class="code" href="classgcr_1_1Atom.html#a73697f87aee4cfb68f98b536755bab88">~Atom</a> ();
<a name="l00056"></a>00056 
<a name="l00057"></a>00057 <span class="keyword">public</span> :
<a name="l00058"></a>00058 <span class="comment">/*</span>
<a name="l00059"></a>00059 <span class="comment">@param Z: the atomic number of the new atom.</span>
<a name="l00060"></a>00060 <span class="comment">@param x: the x coordinate of the new atom.</span>
<a name="l00061"></a>00061 <span class="comment">@param y: the y coordinate of the new atom.</span>
<a name="l00062"></a>00062 <span class="comment">@param z: the z coordinate of the new atom.</span>
<a name="l00063"></a>00063 <span class="comment"></span>
<a name="l00064"></a>00064 <span class="comment">Creates an atom.</span>
<a name="l00065"></a>00065 <span class="comment">*/</span>
<a name="l00066"></a>00066         <a class="code" href="classgcr_1_1Atom.html#a98d209e08beb455c8d051512c08ce5c9">Atom</a> (<span class="keywordtype">int</span> Z, <span class="keywordtype">double</span> <a class="code" href="classgcu_1_1Atom.html#a845f98c4e1bb2fe68dfa3fc61a83f79d">x</a>, <span class="keywordtype">double</span> <a class="code" href="classgcu_1_1Atom.html#a483d6aec85bb09acf681d0070f46149c">y</a>, <span class="keywordtype">double</span> <a class="code" href="classgcu_1_1Atom.html#aca911471b8848a4c78205c328557a7cc">z</a>);
<a name="l00072"></a>00072         <a class="code" href="classgcr_1_1Atom.html#a98d209e08beb455c8d051512c08ce5c9">Atom</a> (<a class="code" href="classgcr_1_1Atom.html">Atom</a>&amp; caAtom);
<a name="l00073"></a>00073 <span class="comment">/*</span>
<a name="l00074"></a>00074 <span class="comment">@param caAtom: the Atom to copy.</span>
<a name="l00075"></a>00075 <span class="comment"></span>
<a name="l00076"></a>00076 <span class="comment">@return an Atom identical to caAtom.</span>
<a name="l00077"></a>00077 <span class="comment">*/</span>
<a name="l00078"></a>00078         <a class="code" href="classgcr_1_1Atom.html">Atom</a>&amp; operator= (<a class="code" href="classgcr_1_1Atom.html">Atom</a>&amp; caAtom);
<a name="l00079"></a>00079 
<a name="l00088"></a>00088         <span class="keywordtype">void</span> <a class="code" href="classgcr_1_1Atom.html#ace86c61de2c38197b30d5d23c447b4b4">SetColor</a> (<span class="keywordtype">float</span> red, <span class="keywordtype">float</span> green, <span class="keywordtype">float</span> blue, <span class="keywordtype">float</span> alpha);
<a name="l00092"></a>00092         <span class="keywordtype">void</span> <a class="code" href="classgcr_1_1Atom.html#aef9bd5861d63c10952efe8582b55292a">SetDefaultColor</a> ();
<a name="l00096"></a><a class="code" href="classgcr_1_1Atom.html#a99d8a6a48209b0e7bbfd6078ab9e8fab">00096</a>         <span class="keywordtype">bool</span> <a class="code" href="classgcr_1_1Atom.html#a99d8a6a48209b0e7bbfd6078ab9e8fab">HasCustomColor</a> () {<span class="keywordflow">return</span> <a class="code" href="classgcr_1_1Atom.html#ad18e392c7a17c1e418d83508dc6b26c3">m_bCustomColor</a>;}
<a name="l00106"></a>00106         <span class="keywordtype">void</span> <a class="code" href="classgcr_1_1Atom.html#a36dcef523fa4c6eb71b4f020eb067f72">GetColor</a> (<span class="keywordtype">double</span> *red, <span class="keywordtype">double</span> *green, <span class="keywordtype">double</span> *blue, <span class="keywordtype">double</span> *alpha);
<a name="l00107"></a>00107         <span class="keywordtype">void</span> <a class="code" href="classgcr_1_1Atom.html#a36dcef523fa4c6eb71b4f020eb067f72">GetColor</a> (GdkRGBA &amp;rgba);
<a name="l00113"></a>00113         <span class="keywordtype">void</span> <a class="code" href="classgcr_1_1Atom.html#acec707ec1f35fe18c7500612c281f8c9">SetSize</a> (<span class="keywordtype">double</span> <a class="code" href="classgcr_1_1Atom.html#a0dcbf3452280e92b00738e787f15f718">r</a>);
<a name="l00117"></a>00117         <span class="keywordtype">double</span> <a class="code" href="classgcr_1_1Atom.html#a1d3c7641a6c56fd56fe1ec69f065c84b">GetSize</a> ();
<a name="l00122"></a>00122         <span class="keywordtype">bool</span> <a class="code" href="classgcr_1_1Atom.html#a1ebf59daee72cfe08b8caed7d98c768e">operator== </a>(<a class="code" href="classgcr_1_1Atom.html">Atom</a>&amp; caAtom);
<a name="l00127"></a><a class="code" href="classgcr_1_1Atom.html#a8c96ad91bdbbe730889a91855c206c99">00127</a>         <span class="keywordtype">void</span> <a class="code" href="classgcr_1_1Atom.html#a8c96ad91bdbbe730889a91855c206c99">Cleave</a> () {<a class="code" href="classgcr_1_1Atom.html#ad7727f31cdf6ff46f6ec0fa3a98d8f21">m_nCleave</a>++;}
<a name="l00136"></a>00136         <span class="keywordtype">double</span> <a class="code" href="classgcr_1_1Atom.html#a89ebfaeb7445f75f384a058859f501b2">ScalProd</a> (<span class="keywordtype">int</span> h, <span class="keywordtype">int</span> k, <span class="keywordtype">int</span> l);
<a name="l00149"></a>00149         <span class="keywordtype">void</span> <a class="code" href="classgcr_1_1Atom.html#a920d6c025fa37efb16aefbf3cd9ff4b5">NetToCartesian</a> (<span class="keywordtype">double</span> a, <span class="keywordtype">double</span> b, <span class="keywordtype">double</span> c, <span class="keywordtype">double</span> alpha, <span class="keywordtype">double</span> beta, <span class="keywordtype">double</span> gamma);
<a name="l00162"></a>00162         <span class="keywordtype">double</span> <a class="code" href="classgcr_1_1Atom.html#a007b6c25a928381a6032618c3baca0a0">Distance</a> (<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keywordtype">double</span> z, <span class="keywordtype">bool</span> bFixed);
<a name="l00166"></a><a class="code" href="classgcr_1_1Atom.html#a0dcbf3452280e92b00738e787f15f718">00166</a>         <span class="keywordtype">double</span> <a class="code" href="classgcr_1_1Atom.html#a0dcbf3452280e92b00738e787f15f718">r</a> () {<span class="keywordflow">return</span> <a class="code" href="classgcr_1_1Atom.html#a6b99450fdf58328b1ef8f43d5e10f0e4">m_Radius</a>.<a class="code" href="structGcuAtomicRadius.html#aaa4d71c6b37a0dbbb83b2a324bc191e9">value</a>.<a class="code" href="structGcuDimensionalValue.html#a28363f6ce89960a95dbaf7ac8f502e7e">value</a>;}
<a name="l00170"></a><a class="code" href="classgcr_1_1Atom.html#aef8153ea849f5fc669c260d2614c633e">00170</a>         <span class="keyword">const</span> <a class="code" href="structGcuAtomicRadius.html">GcuAtomicRadius</a>&amp; <a class="code" href="classgcr_1_1Atom.html#aef8153ea849f5fc669c260d2614c633e">GetRadius</a> () {<span class="keywordflow">return</span> <a class="code" href="classgcr_1_1Atom.html#a6b99450fdf58328b1ef8f43d5e10f0e4">m_Radius</a>;}
<a name="l00174"></a>00174         <span class="keywordtype">void</span> <a class="code" href="classgcr_1_1Atom.html#a49ed0650f5fdeea1d5ce6364af9c77ca">SetRadius</a> (<span class="keyword">const</span> <a class="code" href="structGcuAtomicRadius.html">GcuAtomicRadius</a>&amp; <a class="code" href="classgcr_1_1Atom.html#a0dcbf3452280e92b00738e787f15f718">r</a>);
<a name="l00178"></a><a class="code" href="classgcr_1_1Atom.html#a79215e58218d8cbf4aded4346e8eff44">00178</a>         <span class="keywordtype">bool</span> <a class="code" href="classgcr_1_1Atom.html#a79215e58218d8cbf4aded4346e8eff44">IsCleaved</a> () {<span class="keywordflow">return</span> <a class="code" href="classgcr_1_1Atom.html#ad7727f31cdf6ff46f6ec0fa3a98d8f21">m_nCleave</a> != 0;}
<a name="l00185"></a>00185         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classgcr_1_1Atom.html#a6a4524b878ab19098e22070277e356a7">SaveNode</a> (xmlDocPtr xml, xmlNodePtr node) <span class="keyword">const</span>;
<a name="l00191"></a>00191         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classgcr_1_1Atom.html#a8cb2a40703531143af35e4ea7bf35953">LoadNode</a> (xmlNodePtr node);
<a name="l00192"></a>00192 
<a name="l00193"></a>00193 <span class="keyword">protected</span>:
<a name="l00197"></a><a class="code" href="classgcr_1_1Atom.html#a61aa5fa658aebf798abaf009f1036f3b">00197</a>         <span class="keywordtype">float</span> <a class="code" href="classgcr_1_1Atom.html#a61aa5fa658aebf798abaf009f1036f3b">m_fBlue</a>;
<a name="l00201"></a><a class="code" href="classgcr_1_1Atom.html#a81cccba1132c52b7c9422c7a87e61c55">00201</a>         <span class="keywordtype">float</span> <a class="code" href="classgcr_1_1Atom.html#a81cccba1132c52b7c9422c7a87e61c55">m_fRed</a>;
<a name="l00205"></a><a class="code" href="classgcr_1_1Atom.html#a1206e2a7f5431f4f36eeabd9824d1c1b">00205</a>         <span class="keywordtype">float</span> <a class="code" href="classgcr_1_1Atom.html#a1206e2a7f5431f4f36eeabd9824d1c1b">m_fGreen</a>;
<a name="l00209"></a><a class="code" href="classgcr_1_1Atom.html#a83bd6a84a329e3c24e98786b4ef809cc">00209</a>         <span class="keywordtype">float</span> <a class="code" href="classgcr_1_1Atom.html#a83bd6a84a329e3c24e98786b4ef809cc">m_fAlpha</a>;
<a name="l00213"></a><a class="code" href="classgcr_1_1Atom.html#ad18e392c7a17c1e418d83508dc6b26c3">00213</a>         <span class="keywordtype">bool</span> <a class="code" href="classgcr_1_1Atom.html#ad18e392c7a17c1e418d83508dc6b26c3">m_bCustomColor</a>;
<a name="l00217"></a><a class="code" href="classgcr_1_1Atom.html#a6b99450fdf58328b1ef8f43d5e10f0e4">00217</a>         <a class="code" href="structGcuAtomicRadius.html">GcuAtomicRadius</a> <a class="code" href="classgcr_1_1Atom.html#a6b99450fdf58328b1ef8f43d5e10f0e4">m_Radius</a>;
<a name="l00223"></a><a class="code" href="classgcr_1_1Atom.html#ad7727f31cdf6ff46f6ec0fa3a98d8f21">00223</a>         <span class="keywordtype">int</span> <a class="code" href="classgcr_1_1Atom.html#ad7727f31cdf6ff46f6ec0fa3a98d8f21">m_nCleave</a>; <span class="comment">//0 if not cleaved</span>
<a name="l00224"></a>00224 
<a name="l00232"></a>00232         <span class="keywordtype">bool</span> <a class="code" href="classgcr_1_1Atom.html#a3c343958bee49282b671a343218ae165">SetProperty</a> (<span class="keywordtype">unsigned</span> property, <span class="keywordtype">char</span> <span class="keyword">const</span> *value);
<a name="l00233"></a>00233 
<a name="l00240"></a>00240         std::string <a class="code" href="classgcr_1_1Atom.html#ac7a91f0accef35a1539ac09ca7b54d1b">GetProperty</a> (<span class="keywordtype">unsigned</span> property) <span class="keyword">const</span>;
<a name="l00241"></a>00241 
<a name="l00242"></a>00242 <a class="code" href="macros_8h.html#a2e6e8322502a538f4583d41206cea297">GCU_PROP</a> (<span class="keywordtype">double</span>, EffectiveRadiusRatio);
<a name="l00243"></a>00243 };
<a name="l00244"></a>00244 
<a name="l00248"></a>00248 <span class="keyword">typedef</span> std::list&lt;Atom*&gt; AtomList;
<a name="l00249"></a>00249 }<span class="comment">// namespace gcr</span>
<a name="l00250"></a>00250 
<a name="l00251"></a>00251 <span class="preprocessor">#endif // GCR_ATOM_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>