Files
fpocket/doc/programmers_guide/html/calc_8h.html
2017-03-22 23:31:13 +01:00

218 lines
10 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>fpocket: calc.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<img src="fpocket_logo_small.png" width="545" height="150">
<!-- Generated by Doxygen 1.5.6 -->
<script type="text/javascript">
<!--
function changeDisplayState (e){
var num=this.id.replace(/[^[0-9]/g,'');
var button=this.firstChild;
var sectionDiv=document.getElementById('dynsection'+num);
if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
sectionDiv.style.display='block';
button.src='open.gif';
}else{
sectionDiv.style.display='none';
button.src='closed.gif';
}
}
function initDynSections(){
var divs=document.getElementsByTagName('div');
var sectionCounter=1;
for(var i=0;i<divs.length-1;i++){
if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
var header=divs[i];
var section=divs[i+1];
var button=header.firstChild;
if (button!='IMG'){
divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
button=document.createElement('img');
divs[i].insertBefore(button,divs[i].firstChild);
}
header.style.cursor='pointer';
header.onclick=changeDisplayState;
header.id='dynheader'+sectionCounter;
button.src='closed.gif';
section.id='dynsection'+sectionCounter;
section.style.display='none';
section.style.marginLeft='14px';
sectionCounter++;
}
}
}
window.onload = initDynSections;
-->
</script>
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>calc.h File Reference</h1><code>#include &lt;math.h&gt;</code><br>
<code>#include &lt;stdio.h&gt;</code><br>
<code>#include &lt;stdlib.h&gt;</code><br>
<p>
<a href="calc_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="calc_8h.html#615f3353fc9ccc88069adb4000b21e73">dist</a> (float x1, float y1, float z1, float x2, float y2, float z2)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="calc_8h.html#5fbe8e59e515cf3b7af1c25a1914445c">ddist</a> (float x1, float y1, float z1, float x2, float y2, float z2)</td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="5fbe8e59e515cf3b7af1c25a1914445c"></a><!-- doxytag: member="calc.h::ddist" ref="5fbe8e59e515cf3b7af1c25a1914445c" args="(float x1, float y1, float z1, float x2, float y2, float z2)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">float ddist </td>
<td>(</td>
<td class="paramtype">float&nbsp;</td>
<td class="paramname"> <em>x1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&nbsp;</td>
<td class="paramname"> <em>y1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&nbsp;</td>
<td class="paramname"> <em>z1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&nbsp;</td>
<td class="paramname"> <em>x2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&nbsp;</td>
<td class="paramname"> <em>y2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&nbsp;</td>
<td class="paramname"> <em>z2</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
## FONCTION: float <a class="el" href="calc_8h.html#5fbe8e59e515cf3b7af1c25a1914445c">ddist(float x1, float y1, float z1, float x2, float y2, float z2)</a><p>
## SPECIFICATION: Calculate the square of the euclidian distance between two points in space p1(x1, y1, z2) and p2(x2, y2, z2)<p>
## PARAMETRES: @ float x1, y1, z1: The first point's coordinates. @ float x2, y2, z2: The second point's coordinates.<p>
## RETURN: float: the squared euclidian distance between the two points.
<p>Definition at line <a class="el" href="calc_8c-source.html#l00100">100</a> of file <a class="el" href="calc_8c-source.html">calc.c</a>.</p>
<p>Referenced by <a class="el" href="asa_8c-source.html#l00107">get_surrounding_atoms_idx()</a>, and <a class="el" href="asa_8c-source.html#l00267">set_ASA()</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00101"></a>00101 {
<a name="l00102"></a>00102 <span class="keywordtype">float</span> xdif = x1 - x2 ;
<a name="l00103"></a>00103 <span class="keywordtype">float</span> ydif = y1 - y2 ;
<a name="l00104"></a>00104 <span class="keywordtype">float</span> zdif = z1 - z2 ;
<a name="l00105"></a>00105
<a name="l00106"></a>00106 <span class="keywordflow">return</span> (xdif*xdif) + (ydif*ydif) + (zdif*zdif) ;
<a name="l00107"></a>00107 }
</pre></div>
<p>
</div>
</div><p>
<a class="anchor" name="615f3353fc9ccc88069adb4000b21e73"></a><!-- doxytag: member="calc.h::dist" ref="615f3353fc9ccc88069adb4000b21e73" args="(float x1, float y1, float z1, float x2, float y2, float z2)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">float dist </td>
<td>(</td>
<td class="paramtype">float&nbsp;</td>
<td class="paramname"> <em>x1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&nbsp;</td>
<td class="paramname"> <em>y1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&nbsp;</td>
<td class="paramname"> <em>z1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&nbsp;</td>
<td class="paramname"> <em>x2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&nbsp;</td>
<td class="paramname"> <em>y2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&nbsp;</td>
<td class="paramname"> <em>z2</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
## FONCTION: float <a class="el" href="calc_8h.html#615f3353fc9ccc88069adb4000b21e73">dist(float x1, float y1, float z1, float x2, float y2, float z2)</a><p>
## SPECIFICATION: Calculate euclidian distance between two points in space p1(x1, y1, z2) and p2(x2, y2, z2)<p>
## PARAMETRES: @ float x1, y1, z1: The first point's coordinates. @ float x2, y2, z2: The second point's coordinates.<p>
## RETURN: float: the distance between p1(x1, y1, z2) and p2(x2, y2, z2)
<p>Definition at line <a class="el" href="calc_8c-source.html#l00075">75</a> of file <a class="el" href="calc_8c-source.html">calc.c</a>.</p>
<p>Referenced by <a class="el" href="tpocket_8c-source.html#l00661">check_pockets()</a>, <a class="el" href="neighbor_8c-source.html#l00610">count_atm_prop_vert_neigh()</a>, <a class="el" href="neighbor_8c-source.html#l00503">count_pocket_lig_vert_ovlp()</a>, <a class="el" href="neighbor_8c-source.html#l00770">count_vert_neigh()</a>, <a class="el" href="dpocket_8c-source.html#l00184">desc_pocket()</a>, <a class="el" href="mdpocket_8c-source.html#l00339">extract_wanted_vertices()</a>, <a class="el" href="neighbor_8c-source.html#l00090">get_mol_atm_neigh()</a>, <a class="el" href="neighbor_8c-source.html#l00332">get_mol_ctd_atm_neigh()</a>, <a class="el" href="neighbor_8c-source.html#l00213">get_mol_vert_neigh()</a>, <a class="el" href="descriptors_8c-source.html#l00309">get_vert_apolar_density()</a>, <a class="el" href="mdpocket_8c-source.html#l00386">get_wanted_atom_ids()</a>, <a class="el" href="cluster_8c-source.html#l00070">pck_final_clust()</a>, <a class="el" href="cluster_8c-source.html#l00290">pck_ml_clust()</a>, <a class="el" href="cluster_8c-source.html#l00376">pck_ml_clust_test()</a>, <a class="el" href="voronoi_8c-source.html#l00411">print_vvertices()</a>, <a class="el" href="refine_8c-source.html#l00078">refinePockets()</a>, <a class="el" href="descriptors_8c-source.html#l00182">set_descriptors()</a>, <a class="el" href="pocket_8c-source.html#l00542">set_pocket_contacted_lig_name()</a>, <a class="el" href="voronoi_8c-source.html#l00359">testVvertice()</a>, and <a class="el" href="pocket_8c-source.html#l00170">updateIds()</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00076"></a>00076 {
<a name="l00077"></a>00077 <span class="keywordtype">float</span> xdif = x1 - x2 ;
<a name="l00078"></a>00078 <span class="keywordtype">float</span> ydif = y1 - y2 ;
<a name="l00079"></a>00079 <span class="keywordtype">float</span> zdif = z1 - z2 ;
<a name="l00080"></a>00080
<a name="l00081"></a>00081 <span class="keywordflow">return</span> sqrt((xdif*xdif) + (ydif*ydif) + (zdif*zdif)) ;
<a name="l00082"></a>00082 }
</pre></div>
<p>
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Jun 7 16:44:23 2010 for fpocket by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>