mirror of
https://github.com/Discngine/fpocket.git
synced 2026-06-04 11:54:21 +08:00
762 lines
71 KiB
HTML
762 lines
71 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: descriptors.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 Page</span></a></li>
|
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="contents">
|
|
<h1>descriptors.h File Reference</h1><code>#include <math.h></code><br>
|
|
<code>#include <stdio.h></code><br>
|
|
<code>#include <stdlib.h></code><br>
|
|
<code>#include <time.h></code><br>
|
|
<code>#include <ctype.h></code><br>
|
|
<code>#include <string.h></code><br>
|
|
<code>#include "<a class="el" href="voronoi_8h-source.html">voronoi.h</a>"</code><br>
|
|
<code>#include "<a class="el" href="voronoi__lst_8h-source.html">voronoi_lst.h</a>"</code><br>
|
|
<code>#include "<a class="el" href="atom_8h-source.html">atom.h</a>"</code><br>
|
|
<code>#include "<a class="el" href="aa_8h-source.html">aa.h</a>"</code><br>
|
|
<code>#include "<a class="el" href="utils_8h-source.html">utils.h</a>"</code><br>
|
|
|
|
<p>
|
|
<a href="descriptors_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>Data Structures</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structs__desc.html">s_desc</a></td></tr>
|
|
|
|
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structs__desc.html">s_desc</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="descriptors_8h.html#0313250c68f4a7a8e292b674c30ae9fa">allocate_s_desc</a> (void)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="descriptors_8h.html#9380470e1ad56a99f5a0597355eeb5ea">reset_desc</a> (<a class="el" href="structs__desc.html">s_desc</a> *desc)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="descriptors_8h.html#fd7782a048e3fccd63e24980d98cbf2b">set_descriptors</a> (<a class="el" href="structs__atm.html">s_atm</a> **tatoms, int natoms, <a class="el" href="structs__vvertice.html">s_vvertice</a> **tvert, int nvert, <a class="el" href="structs__desc.html">s_desc</a> *desc, int niter, <a class="el" href="structs__pdb.html">s_pdb</a> *pdb, int flag_do_expensive_calculations)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="descriptors_8h.html#9759d226e51f3e4829391181ead808b9">get_vert_apolar_density</a> (<a class="el" href="structs__vvertice.html">s_vvertice</a> **tvert, int nvert, <a class="el" href="structs__vvertice.html">s_vvertice</a> *vert)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="descriptors_8h.html#18991bc3f2c0fb6d81667f412d516e70">set_atom_based_descriptors</a> (<a class="el" href="structs__atm.html">s_atm</a> **atoms, int natoms, <a class="el" href="structs__desc.html">s_desc</a> *desc, <a class="el" href="structs__atm.html">s_atm</a> *all_atoms, int all_natoms)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="descriptors_8h.html#4fae028d2c83da127914b336e71f8340">set_aa_desc</a> (<a class="el" href="structs__desc.html">s_desc</a> *desc, const char *aa_name)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="descriptors_8h.html#62ddb86953349fc86736a5a149133e27">countResidues</a> (<a class="el" href="structs__atm.html">s_atm</a> *atoms, int natoms, char chain[2])</td></tr>
|
|
|
|
</table>
|
|
<hr><h2>Function Documentation</h2>
|
|
<a class="anchor" name="0313250c68f4a7a8e292b674c30ae9fa"></a><!-- doxytag: member="descriptors.h::allocate_s_desc" ref="0313250c68f4a7a8e292b674c30ae9fa" args="(void)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structs__desc.html">s_desc</a>* allocate_s_desc </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
## FUNCTION: allocate_s_desc<p>
|
|
## SPECIFICATION: Allocate a descroptor structure<p>
|
|
## PARAMETRES:<p>
|
|
## RETURN: s_desc*
|
|
<p>Definition at line <a class="el" href="descriptors_8c-source.html#l00086">86</a> of file <a class="el" href="descriptors_8c-source.html">descriptors.c</a>.</p>
|
|
|
|
<p>References <a class="el" href="memhandler_8c-source.html#l00121">my_malloc()</a>, and <a class="el" href="descriptors_8c-source.html#l00108">reset_desc()</a>.</p>
|
|
|
|
<p>Referenced by <a class="el" href="dpocket_8c-source.html#l00184">desc_pocket()</a>.</p>
|
|
<div class="fragment"><pre class="fragment"><a name="l00087"></a>00087 {
|
|
<a name="l00088"></a>00088 <a class="code" href="structs__desc.html">s_desc</a> *desc = (<a class="code" href="structs__desc.html">s_desc</a>*)<a class="code" href="memhandler_8c.html#52d7260a38c396cb2dd1dd7abcfd61cb">my_malloc</a>(<span class="keyword">sizeof</span>(<a class="code" href="structs__desc.html">s_desc</a>)) ;
|
|
<a name="l00089"></a>00089
|
|
<a name="l00090"></a>00090 <a class="code" href="descriptors_8c.html#9380470e1ad56a99f5a0597355eeb5ea">reset_desc</a>(desc) ;
|
|
<a name="l00091"></a>00091
|
|
<a name="l00092"></a>00092 <span class="keywordflow">return</span> desc ;
|
|
<a name="l00093"></a>00093 }
|
|
</pre></div>
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="62ddb86953349fc86736a5a149133e27"></a><!-- doxytag: member="descriptors.h::countResidues" ref="62ddb86953349fc86736a5a149133e27" args="(s_atm *atoms, int natoms, char chain[2])" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int countResidues </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="structs__atm.html">s_atm</a> * </td>
|
|
<td class="paramname"> <em>atoms</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"> <em>natoms</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">char </td>
|
|
<td class="paramname"> <em>chain</em>[2]</td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
|
|
<p>Definition at line <a class="el" href="descriptors_8c-source.html#l00333">333</a> of file <a class="el" href="descriptors_8c-source.html">descriptors.c</a>.</p>
|
|
|
|
<p>References <a class="el" href="atom_8h-source.html#l00057">s_atm::chain</a>, and <a class="el" href="atom_8h-source.html#l00063">s_atm::res_id</a>.</p>
|
|
|
|
<p>Referenced by <a class="el" href="descriptors_8c-source.html#l00373">set_atom_based_descriptors()</a>.</p>
|
|
<div class="fragment"><pre class="fragment"><a name="l00333"></a>00333 {
|
|
<a name="l00334"></a>00334 <span class="keywordtype">int</span> i,
|
|
<a name="l00335"></a>00335 n=0,
|
|
<a name="l00336"></a>00336 curRes=-1,
|
|
<a name="l00337"></a>00337 firstRes=-1,
|
|
<a name="l00338"></a>00338 lastRes=-1;
|
|
<a name="l00339"></a>00339 <a class="code" href="structs__atm.html">s_atm</a> *curatom = NULL ;
|
|
<a name="l00340"></a>00340 <span class="keywordflow">for</span>(i=0;i<natoms;i++){
|
|
<a name="l00341"></a>00341 curatom = &(atoms[i]) ;
|
|
<a name="l00342"></a>00342 <span class="keywordflow">if</span>(!strncmp(curatom-><a class="code" href="structs__atm.html#c5b9464bd67f2cca101f7bf6beabb223">chain</a>,chain,1) ){
|
|
<a name="l00343"></a>00343 <span class="keywordflow">if</span>(firstRes==-1) firstRes=curatom-><a class="code" href="structs__atm.html#7c42c076ce151f4af210bef730b2b88f">res_id</a>;
|
|
<a name="l00344"></a>00344 lastRes=curatom-><a class="code" href="structs__atm.html#7c42c076ce151f4af210bef730b2b88f">res_id</a>;
|
|
<a name="l00345"></a>00345 <span class="keywordflow">if</span>(curRes!=curatom-><a class="code" href="structs__atm.html#7c42c076ce151f4af210bef730b2b88f">res_id</a>){
|
|
<a name="l00346"></a>00346 curRes=curatom-><a class="code" href="structs__atm.html#7c42c076ce151f4af210bef730b2b88f">res_id</a>;
|
|
<a name="l00347"></a>00347 n+=1;
|
|
<a name="l00348"></a>00348 }
|
|
<a name="l00349"></a>00349 }
|
|
<a name="l00350"></a>00350 }
|
|
<a name="l00351"></a>00351 <span class="keywordflow">return</span> lastRes-firstRes;
|
|
<a name="l00352"></a>00352 }
|
|
</pre></div>
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="9759d226e51f3e4829391181ead808b9"></a><!-- doxytag: member="descriptors.h::get_vert_apolar_density" ref="9759d226e51f3e4829391181ead808b9" args="(s_vvertice **tvert, int nvert, s_vvertice *vert)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int get_vert_apolar_density </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="structs__vvertice.html">s_vvertice</a> ** </td>
|
|
<td class="paramname"> <em>tvert</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"> <em>nvert</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="structs__vvertice.html">s_vvertice</a> * </td>
|
|
<td class="paramname"> <em>vert</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
## FUNCTION: get_vert_apolar_density<p>
|
|
## SPECIFICATION: Here we calculate the number of apolar vertices (vertices that contact at least 3 atoms having their electronegativity > 2.7) that lie within a range of 0-r () from a given reference vertice, r being its own radius.<p>
|
|
It provides the apolar density for a given vertice, that will be used for the calculation of the total apolar density of the pocket, defined as the mean value of it.<p>
|
|
## PARAMETRES: @ <a class="el" href="structs__vvertice.html">s_vvertice</a> **tvert : The list of vertices @ int nvert : The number of vertices @ <a class="el" href="structs__vvertice.html">s_vvertice</a> *vert : The reference vertice.<p>
|
|
## RETURN: int: The apolar density as defined previously.
|
|
<p>Definition at line <a class="el" href="descriptors_8c-source.html#l00309">309</a> of file <a class="el" href="descriptors_8c-source.html">descriptors.c</a>.</p>
|
|
|
|
<p>References <a class="el" href="calc_8c-source.html#l00075">dist()</a>, <a class="el" href="voronoi_8h-source.html#l00057">M_APOLAR_AS</a>, <a class="el" href="voronoi_8h-source.html#l00075">s_vvertice::ray</a>, <a class="el" href="voronoi_8h-source.html#l00070">s_vvertice::type</a>, <a class="el" href="voronoi_8h-source.html#l00076">s_vvertice::x</a>, <a class="el" href="voronoi_8h-source.html#l00076">s_vvertice::y</a>, and <a class="el" href="voronoi_8h-source.html#l00076">s_vvertice::z</a>.</p>
|
|
<div class="fragment"><pre class="fragment"><a name="l00310"></a>00310 {
|
|
<a name="l00311"></a>00311 <span class="keywordtype">int</span> apol_neighbours = 0,
|
|
<a name="l00312"></a>00312 i = 0 ;
|
|
<a name="l00313"></a>00313
|
|
<a name="l00314"></a>00314 <a class="code" href="structs__vvertice.html">s_vvertice</a> *vc = NULL ;
|
|
<a name="l00315"></a>00315
|
|
<a name="l00316"></a>00316 <span class="keywordtype">float</span> vx = vert-><a class="code" href="structs__vvertice.html#017f9695c923d87d851231bf13967b22">x</a>,
|
|
<a name="l00317"></a>00317 vy = vert-><a class="code" href="structs__vvertice.html#250642d688398e4186819f63d54247bc">y</a>,
|
|
<a name="l00318"></a>00318 vz = vert-><a class="code" href="structs__vvertice.html#3e03d11fd3b1d0ffb623481fa1b497b6">z</a>,
|
|
<a name="l00319"></a>00319 vray = vert-><a class="code" href="structs__vvertice.html#0aadc589bd2213f3c6246e873cc69a83">ray</a> ;
|
|
<a name="l00320"></a>00320
|
|
<a name="l00321"></a>00321 <span class="keywordflow">for</span>(i = 0 ; i < nvert ; i++) {
|
|
<a name="l00322"></a>00322 vc = tvert[i] ;
|
|
<a name="l00323"></a>00323 <span class="keywordflow">if</span>(vc != vert && vc-><a class="code" href="structs__vvertice.html#7cd4bd55a93f3400449ef354b49bb4c3">type</a> == <a class="code" href="voronoi_8h.html#e90a1520c3ca5a4b829d387d4d06b004">M_APOLAR_AS</a>){
|
|
<a name="l00324"></a>00324 <span class="keywordflow">if</span>(<a class="code" href="calc_8c.html#615f3353fc9ccc88069adb4000b21e73">dist</a>(vx, vy, vz, vc-><a class="code" href="structs__vvertice.html#017f9695c923d87d851231bf13967b22">x</a>, vc-><a class="code" href="structs__vvertice.html#250642d688398e4186819f63d54247bc">y</a>, vc-><a class="code" href="structs__vvertice.html#3e03d11fd3b1d0ffb623481fa1b497b6">z</a>)-(vc-><a class="code" href="structs__vvertice.html#0aadc589bd2213f3c6246e873cc69a83">ray</a> + vray) <= 0.) {
|
|
<a name="l00325"></a>00325 apol_neighbours += 1 ;
|
|
<a name="l00326"></a>00326 }
|
|
<a name="l00327"></a>00327 }
|
|
<a name="l00328"></a>00328 }
|
|
<a name="l00329"></a>00329
|
|
<a name="l00330"></a>00330 <span class="keywordflow">return</span> apol_neighbours ;
|
|
<a name="l00331"></a>00331 }
|
|
</pre></div>
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="9380470e1ad56a99f5a0597355eeb5ea"></a><!-- doxytag: member="descriptors.h::reset_desc" ref="9380470e1ad56a99f5a0597355eeb5ea" args="(s_desc *desc)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void reset_desc </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="structs__desc.html">s_desc</a> * </td>
|
|
<td class="paramname"> <em>desc</em> </td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
## FUNCTION: reset_s_desc<p>
|
|
## SPECIFICATION: Reset descriptors to 0 values.<p>
|
|
## PARAMETRES:<p>
|
|
## RETURN: void
|
|
<p>Definition at line <a class="el" href="descriptors_8c-source.html#l00108">108</a> of file <a class="el" href="descriptors_8c-source.html">descriptors.c</a>.</p>
|
|
|
|
<p>References <a class="el" href="descriptors_8h-source.html#l00094">s_desc::aa_compo</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::apolar_asphere_prop</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::as_density</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::as_density_norm</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::as_max_dst</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::as_max_dst_norm</a>, <a class="el" href="descriptors_8h-source.html#l00100">s_desc::characterChain1</a>, <a class="el" href="descriptors_8h-source.html#l00100">s_desc::characterChain2</a>, <a class="el" href="descriptors_8h-source.html#l00095">s_desc::charge_score</a>, <a class="el" href="descriptors_8h-source.html#l00099">s_desc::drug_score</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::flex</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::hydrophobicity_score</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::masph_sacc</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::mean_asph_ray</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::mean_loc_hyd_dens</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::mean_loc_hyd_dens_norm</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::nas_norm</a>, <a class="el" href="descriptors_8h-source.html#l00095">s_desc::nb_asph</a>, <a class="el" href="descriptors_8h-source.html#l00100">s_desc::numResChain1</a>, <a class="el" href="descriptors_8h-source.html#l00100">s_desc::numResChain2</a>, <a class="el" href="descriptors_8h-source.html#l00095">s_desc::polarity_score</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::polarity_score_norm</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::prop_asapol_norm</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::prop_polar_atm</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::surf_apol_vdw</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::surf_apol_vdw14</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::surf_apol_vdw22</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::surf_pol_vdw</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::surf_pol_vdw14</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::surf_pol_vdw22</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::surf_vdw</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::surf_vdw14</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::surf_vdw22</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::volume</a>, and <a class="el" href="descriptors_8h-source.html#l00058">s_desc::volume_score</a>.</p>
|
|
|
|
<p>Referenced by <a class="el" href="descriptors_8c-source.html#l00086">allocate_s_desc()</a>, <a class="el" href="pocket_8c-source.html#l01398">reset_pocket()</a>, and <a class="el" href="pocket_8c-source.html#l00582">set_pockets_descriptors()</a>.</p>
|
|
<div class="fragment"><pre class="fragment"><a name="l00109"></a>00109 {
|
|
<a name="l00110"></a>00110 desc-><a class="code" href="structs__desc.html#ec451be95312187f418e20b87ebc0c1c">hydrophobicity_score</a> = 0.0 ;
|
|
<a name="l00111"></a>00111 desc-><a class="code" href="structs__desc.html#0bf245c3d85f2fc8dec41d560313588a">volume_score</a> = 0.0 ;
|
|
<a name="l00112"></a>00112 desc-><a class="code" href="structs__desc.html#ec106f2a35f5676a6af920311aa4260e">volume</a> = 0.0 ;
|
|
<a name="l00113"></a>00113 desc-><a class="code" href="structs__desc.html#6363a7adfb5bc485f3524b8d4f0b5326">prop_polar_atm</a> = 0.0 ;
|
|
<a name="l00114"></a>00114 desc-><a class="code" href="structs__desc.html#6e455ee4a61943b81a09fb9c4a816967">mean_asph_ray</a> = 0.0 ;
|
|
<a name="l00115"></a>00115 desc-><a class="code" href="structs__desc.html#8d8c1b492a8f07602c496ffe907a7135">masph_sacc</a> = 0.0 ;
|
|
<a name="l00116"></a>00116 desc-><a class="code" href="structs__desc.html#1e842880419a0616060301b4eacf858f">apolar_asphere_prop</a> = 0.0 ;
|
|
<a name="l00117"></a>00117 desc-><a class="code" href="structs__desc.html#b48b3533d79c147285ca50eabc12ef63">mean_loc_hyd_dens</a> = 0.0 ;
|
|
<a name="l00118"></a>00118 desc-><a class="code" href="structs__desc.html#2aeb19cfc5f53e2d22f1a2065ede1010">as_density</a> = 0.0 ;
|
|
<a name="l00119"></a>00119 desc-><a class="code" href="structs__desc.html#6620d6b2cdaaa469b32a66a5e5260a80">as_max_dst</a> = 0.0 ;
|
|
<a name="l00120"></a>00120
|
|
<a name="l00121"></a>00121 desc-><a class="code" href="structs__desc.html#537c647e77f9ca129c77b31e3d15b2ca">flex</a> = 0.0 ;
|
|
<a name="l00122"></a>00122 desc-><a class="code" href="structs__desc.html#8c4599be9319ff05ecf42dd6c70d0d6d">nas_norm</a> = 0.0 ;
|
|
<a name="l00123"></a>00123 desc-><a class="code" href="structs__desc.html#a18101e18ed5d1714470a026621037f3">prop_asapol_norm</a> = 0.0 ;
|
|
<a name="l00124"></a>00124 desc-><a class="code" href="structs__desc.html#3a111a68d68713a0c9b2d5e904951820">mean_loc_hyd_dens_norm</a> = 0.0 ;
|
|
<a name="l00125"></a>00125 desc-><a class="code" href="structs__desc.html#a97dfcc5ad6152e55ef0ebe9985cce5c">as_density_norm</a> = 0.0 ;
|
|
<a name="l00126"></a>00126 desc-><a class="code" href="structs__desc.html#15f213905d46949ade4dc9ec9e413d4f">polarity_score_norm</a> = 0.0 ;
|
|
<a name="l00127"></a>00127 desc-><a class="code" href="structs__desc.html#9a9c0a666cb104843a278525e556087a">as_max_dst_norm</a> = 0.0 ;
|
|
<a name="l00128"></a>00128
|
|
<a name="l00129"></a>00129 desc-><a class="code" href="structs__desc.html#d481d25ff964a6858975b5abfb671412">nb_asph</a> = 0 ;
|
|
<a name="l00130"></a>00130 desc-><a class="code" href="structs__desc.html#d612b029bba06646381771d4b61dc5e6">polarity_score</a> = 0 ;
|
|
<a name="l00131"></a>00131 desc-><a class="code" href="structs__desc.html#00da80b684d1bb1af13ec779e282c7e0">charge_score</a> = 0 ;
|
|
<a name="l00132"></a>00132
|
|
<a name="l00133"></a>00133 desc-><a class="code" href="structs__desc.html#0bfdf7a2147f074d6977a4ee31f95046">surf_apol_vdw</a>=0.0;
|
|
<a name="l00134"></a>00134 desc-><a class="code" href="structs__desc.html#7ce0d0f8a0e977c3f5ecbd1a64ec02c7">surf_apol_vdw14</a>=0.0;
|
|
<a name="l00135"></a>00135 desc-><a class="code" href="structs__desc.html#30adaa999c80fb0f9c3e357730ab5c3c">surf_apol_vdw22</a>=0.0;
|
|
<a name="l00136"></a>00136
|
|
<a name="l00137"></a>00137 desc-><a class="code" href="structs__desc.html#b7799be0c2ecba2a04248d70df6b8795">surf_pol_vdw</a>=0.0;
|
|
<a name="l00138"></a>00138 desc-><a class="code" href="structs__desc.html#b427b3ce5e431f0ca3e3df5c659f2de0">surf_pol_vdw14</a>=0.0;
|
|
<a name="l00139"></a>00139 desc-><a class="code" href="structs__desc.html#090bbaf1b3d709e7575ab400ce1848a1">surf_pol_vdw22</a>=0.0;
|
|
<a name="l00140"></a>00140
|
|
<a name="l00141"></a>00141 desc-><a class="code" href="structs__desc.html#a179ebac9b5489ad1bf1ad267d1d0427">surf_vdw</a>=0.0;
|
|
<a name="l00142"></a>00142 desc-><a class="code" href="structs__desc.html#46c2b1ee640b31802839e88bb91f3aac">surf_vdw14</a>=0.0;
|
|
<a name="l00143"></a>00143 desc-><a class="code" href="structs__desc.html#8d64efb827570330fb20cac0a48507f3">surf_vdw22</a>=0.0;
|
|
<a name="l00144"></a>00144
|
|
<a name="l00145"></a>00145 desc-><a class="code" href="structs__desc.html#27317d1ebeb59e4ea4ebdbca11069c3c">drug_score</a>=0.0;
|
|
<a name="l00146"></a>00146 desc-><a class="code" href="structs__desc.html#1d09eefd576e05f70a489363575f32aa">numResChain1</a>=0;
|
|
<a name="l00147"></a>00147 desc-><a class="code" href="structs__desc.html#bcbc3f48a90c23ac7678804a411abd90">numResChain2</a>=0;
|
|
<a name="l00148"></a>00148 desc-><a class="code" href="structs__desc.html#8e7dd8b06d5e732c055f5c2a46279f00">characterChain1</a>=0;
|
|
<a name="l00149"></a>00149 desc-><a class="code" href="structs__desc.html#c18283db8c6ebb14a806f3fd73b41b5e">characterChain2</a>=0;
|
|
<a name="l00150"></a>00150
|
|
<a name="l00151"></a>00151 <span class="keywordtype">int</span> i ;
|
|
<a name="l00152"></a>00152 <span class="keywordflow">for</span>(i = 0 ; i < 20 ; i++) desc-><a class="code" href="structs__desc.html#12f239c0748ce08dba80fac61722117f">aa_compo</a>[i] = 0 ;
|
|
<a name="l00153"></a>00153 }
|
|
</pre></div>
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="4fae028d2c83da127914b336e71f8340"></a><!-- doxytag: member="descriptors.h::set_aa_desc" ref="4fae028d2c83da127914b336e71f8340" args="(s_desc *desc, const char *aa_name)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void set_aa_desc </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="structs__desc.html">s_desc</a> * </td>
|
|
<td class="paramname"> <em>desc</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"> <em>aa_name</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
## FUNCTION: set_aa_desc<p>
|
|
## SPECIFICATION: Set amino-acid based descriptors.<p>
|
|
## PARAMETRES: @ <a class="el" href="structs__desc.html">s_desc</a> *desc : OUTPUT: Structure of descriptors to fill @ const char *aa_name : The amino acid name<p>
|
|
## RETURN: s_desc*
|
|
<p>Definition at line <a class="el" href="descriptors_8c-source.html#l00469">469</a> of file <a class="el" href="descriptors_8c-source.html">descriptors.c</a>.</p>
|
|
|
|
<p>References <a class="el" href="descriptors_8h-source.html#l00094">s_desc::aa_compo</a>, <a class="el" href="descriptors_8h-source.html#l00095">s_desc::charge_score</a>, <a class="el" href="aa_8c-source.html#l00399">get_charge_from_idx()</a>, <a class="el" href="aa_8c-source.html#l00372">get_hydrophobicity_score_from_idx()</a>, <a class="el" href="aa_8c-source.html#l00425">get_polarity_from_idx()</a>, <a class="el" href="aa_8c-source.html#l00346">get_volume_score_from_idx()</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::hydrophobicity_score</a>, <a class="el" href="aa_8h-source.html#l00044">M_ALA_IDX</a>, <a class="el" href="aa_8h-source.html#l00058">M_ARG_IDX</a>, <a class="el" href="aa_8h-source.html#l00055">M_ASN_IDX</a>, <a class="el" href="aa_8h-source.html#l00046">M_ASP_IDX</a>, <a class="el" href="aa_8h-source.html#l00045">M_CYS_IDX</a>, <a class="el" href="aa_8h-source.html#l00057">M_GLN_IDX</a>, <a class="el" href="aa_8h-source.html#l00047">M_GLU_IDX</a>, <a class="el" href="aa_8h-source.html#l00049">M_GLY_IDX</a>, <a class="el" href="aa_8h-source.html#l00050">M_HIS_IDX</a>, <a class="el" href="aa_8h-source.html#l00051">M_ILE_IDX</a>, <a class="el" href="aa_8h-source.html#l00053">M_LEU_IDX</a>, <a class="el" href="aa_8h-source.html#l00052">M_LYS_IDX</a>, <a class="el" href="aa_8h-source.html#l00054">M_MET_IDX</a>, <a class="el" href="aa_8h-source.html#l00048">M_PHE_IDX</a>, <a class="el" href="aa_8h-source.html#l00056">M_PRO_IDX</a>, <a class="el" href="aa_8h-source.html#l00059">M_SER_IDX</a>, <a class="el" href="aa_8h-source.html#l00060">M_THR_IDX</a>, <a class="el" href="aa_8h-source.html#l00062">M_TRP_IDX</a>, <a class="el" href="aa_8h-source.html#l00063">M_TYR_IDX</a>, <a class="el" href="aa_8h-source.html#l00061">M_VAL_IDX</a>, <a class="el" href="descriptors_8h-source.html#l00095">s_desc::polarity_score</a>, and <a class="el" href="descriptors_8h-source.html#l00058">s_desc::volume_score</a>.</p>
|
|
|
|
<p>Referenced by <a class="el" href="descriptors_8c-source.html#l00373">set_atom_based_descriptors()</a>.</p>
|
|
<div class="fragment"><pre class="fragment"><a name="l00470"></a>00470 {
|
|
<a name="l00471"></a>00471 <span class="keywordtype">int</span> aa_idx = -1;
|
|
<a name="l00472"></a>00472 <span class="keywordtype">char</span> l1 = aa_name[0],
|
|
<a name="l00473"></a>00473 l2 = aa_name[1],
|
|
<a name="l00474"></a>00474 l3 = aa_name[2] ;
|
|
<a name="l00475"></a>00475
|
|
<a name="l00476"></a>00476 <span class="comment">/* Ok, lets use the less comparisons possible... (may be used in the aa.c</span>
|
|
<a name="l00477"></a>00477 <span class="comment"> * file later!) </span>
|
|
<a name="l00478"></a>00478 <span class="comment"> * Only A, C, G, H, I, L, M, P, S, T and V possibility for the first letter:</span>
|
|
<a name="l00479"></a>00479 <span class="comment"> **/</span>
|
|
<a name="l00480"></a>00480 <span class="keywordflow">switch</span>(l1) {
|
|
<a name="l00481"></a>00481 <span class="keywordflow">case</span> <span class="charliteral">'A'</span> : <span class="comment">/* Either ALA, ASP, ASN or ARG */</span>
|
|
<a name="l00482"></a>00482 <span class="keywordflow">if</span>(l2 == <span class="charliteral">'L'</span>) aa_idx = <a class="code" href="aa_8h.html#1b0c9070ecb3ea0befd683ce92dfa925">M_ALA_IDX</a> ; <span class="comment">/* ALA amino acid! */</span>
|
|
<a name="l00483"></a>00483 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(l2 == <span class="charliteral">'R'</span>) aa_idx = <a class="code" href="aa_8h.html#6cb6aa2cef5eaa616d3c5f4fc4acd710">M_ARG_IDX</a> ; <span class="comment">/* ARG amino acid! */</span>
|
|
<a name="l00484"></a>00484 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(l2 == <span class="charliteral">'S'</span> && l3 == <span class="charliteral">'P'</span>)
|
|
<a name="l00485"></a>00485 aa_idx = <a class="code" href="aa_8h.html#93845fafca07848ed53cb4d454be12ac">M_ASP_IDX</a> ; <span class="comment">/* ASP amino acid! */</span>
|
|
<a name="l00486"></a>00486 <span class="keywordflow">else</span> aa_idx = <a class="code" href="aa_8h.html#84516b2203e073e9dbc63ccaf7a3628b">M_ASN_IDX</a> ; break ; <span class="comment">/* ASN amino acid! */</span>
|
|
<a name="l00487"></a>00487
|
|
<a name="l00488"></a>00488 <span class="keywordflow">case</span> <span class="charliteral">'C'</span> : aa_idx = <a class="code" href="aa_8h.html#7e417b6b18144cb3417f86c100e26210">M_CYS_IDX</a> ; break ; <span class="comment">/* CYS amino acid! */</span>
|
|
<a name="l00489"></a>00489
|
|
<a name="l00490"></a>00490 <span class="keywordflow">case</span> <span class="charliteral">'G'</span> : <span class="comment">/* Either GLU, GLY, or GLN, so just check the 3rd letter */</span>
|
|
<a name="l00491"></a>00491 <span class="keywordflow">if</span>(l3 == <span class="charliteral">'U'</span>) aa_idx = <a class="code" href="aa_8h.html#ee64fbe3bf2b3700be47e73710ba9b2e">M_GLU_IDX</a> ; <span class="comment">/* GLU amino acid! */</span>
|
|
<a name="l00492"></a>00492 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(l3 == <span class="charliteral">'Y'</span>) aa_idx = <a class="code" href="aa_8h.html#8af8b421277f5bac3dd71ecb39912a68">M_GLY_IDX</a> ; <span class="comment">/* GLY amino acid! */</span>
|
|
<a name="l00493"></a>00493 <span class="keywordflow">else</span> aa_idx = <a class="code" href="aa_8h.html#a50e956ceccc8383378ce2c86a0650c7">M_GLN_IDX</a> ; break ; <span class="comment">/* GLN amino acid! */</span>
|
|
<a name="l00494"></a>00494
|
|
<a name="l00495"></a>00495 <span class="keywordflow">case</span> <span class="charliteral">'H'</span> : aa_idx = <a class="code" href="aa_8h.html#ad66b8237a731e8b9284cf2c0f5bf1a8">M_HIS_IDX</a> ; break ; <span class="comment">/* HIS amino acid! */</span>
|
|
<a name="l00496"></a>00496 <span class="keywordflow">case</span> <span class="charliteral">'I'</span> : aa_idx = <a class="code" href="aa_8h.html#f7ed4c3826357ffd5ca1430960b01323">M_ILE_IDX</a> ; break ; <span class="comment">/* ILE amino acid! */</span>
|
|
<a name="l00497"></a>00497
|
|
<a name="l00498"></a>00498 <span class="keywordflow">case</span> <span class="charliteral">'L'</span> : <span class="comment">/* Either ALA, ASP, ASN or ARG */</span>
|
|
<a name="l00499"></a>00499 <span class="keywordflow">if</span>(l2 == <span class="charliteral">'Y'</span>) aa_idx = <a class="code" href="aa_8h.html#9c48ce33c40ed282161be85f00e5c358">M_LYS_IDX</a> ; <span class="comment">/* LYS amino acid! */</span>
|
|
<a name="l00500"></a>00500 <span class="keywordflow">else</span> aa_idx = <a class="code" href="aa_8h.html#6f298038ea813adf7ce7591d8aebc24f">M_LEU_IDX</a> ; break ; <span class="comment">/* LEU amino acid! */</span>
|
|
<a name="l00501"></a>00501
|
|
<a name="l00502"></a>00502 <span class="keywordflow">case</span> <span class="charliteral">'M'</span> : aa_idx = <a class="code" href="aa_8h.html#7552b2c0cb98c2ec24839aa18761321d">M_MET_IDX</a> ; break ; <span class="comment">/* MET amino acid! */</span>
|
|
<a name="l00503"></a>00503 <span class="keywordflow">case</span> <span class="charliteral">'P'</span> : <span class="comment">/* Either ALA, ASP, ASN or ARG */</span>
|
|
<a name="l00504"></a>00504 <span class="keywordflow">if</span>(l2 == <span class="charliteral">'H'</span>) aa_idx = <a class="code" href="aa_8h.html#0ce108eda73a67d937d4a9a95742e7e2">M_PHE_IDX</a> ; <span class="comment">/* PHE amino acid! */</span>
|
|
<a name="l00505"></a>00505 <span class="keywordflow">else</span> aa_idx = <a class="code" href="aa_8h.html#f67fd842e620788b97ebf0ed4c062d6f">M_PRO_IDX</a> ; break ; <span class="comment">/* PRO amino acid! */</span>
|
|
<a name="l00506"></a>00506
|
|
<a name="l00507"></a>00507 <span class="keywordflow">case</span> <span class="charliteral">'S'</span> : aa_idx = <a class="code" href="aa_8h.html#bd333adb6a0180ddb95da74027d34693">M_SER_IDX</a> ; break ; <span class="comment">/* SER amino acid! */</span>
|
|
<a name="l00508"></a>00508
|
|
<a name="l00509"></a>00509 <span class="keywordflow">case</span> <span class="charliteral">'T'</span> : <span class="comment">/* Either ALA, ASP, ASN or ARG */</span>
|
|
<a name="l00510"></a>00510 <span class="keywordflow">if</span>(l2 == <span class="charliteral">'H'</span>) aa_idx = <a class="code" href="aa_8h.html#cd98aae4f40d8e2c19435b5d79abcb53">M_THR_IDX</a> ; <span class="comment">/* THR amino acid! */</span>
|
|
<a name="l00511"></a>00511 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(l2 == <span class="charliteral">'R'</span>) aa_idx = <a class="code" href="aa_8h.html#ae2397ccd1d8baefaf8beecb9ebf4128">M_TRP_IDX</a> ; <span class="comment">/* TRP amino acid! */</span>
|
|
<a name="l00512"></a>00512 <span class="keywordflow">else</span> aa_idx = <a class="code" href="aa_8h.html#d894f46b7d2e41ec7a1bdf2f66d6d530">M_TYR_IDX</a> ; break ; <span class="comment">/* TYR amino acid! */</span>
|
|
<a name="l00513"></a>00513
|
|
<a name="l00514"></a>00514 <span class="keywordflow">case</span> <span class="charliteral">'V'</span> : aa_idx = <a class="code" href="aa_8h.html#93cd02b2888b078a6c3c0461bda79841">M_VAL_IDX</a> ; break ; <span class="comment">/* VAL amino acid! */</span>
|
|
<a name="l00515"></a>00515
|
|
<a name="l00516"></a>00516 <span class="keywordflow">default</span>: <span class="comment">/*fprintf(stderr, "! Amno acid %s does not exists!\n", aa_name) ;*/</span>
|
|
<a name="l00517"></a>00517 break ;
|
|
<a name="l00518"></a>00518 }
|
|
<a name="l00519"></a>00519
|
|
<a name="l00520"></a>00520 <span class="comment">/* Ok now we have our amino acid, lets update statistics! */</span>
|
|
<a name="l00521"></a>00521
|
|
<a name="l00522"></a>00522 <span class="keywordflow">if</span>(aa_idx != -1) {
|
|
<a name="l00523"></a>00523 desc-><a class="code" href="structs__desc.html#12f239c0748ce08dba80fac61722117f">aa_compo</a>[aa_idx] ++ ;
|
|
<a name="l00524"></a>00524 desc-><a class="code" href="structs__desc.html#ec451be95312187f418e20b87ebc0c1c">hydrophobicity_score</a> += <a class="code" href="aa_8c.html#3988fc0beb2f06dee9ebb04ef491f9d7">get_hydrophobicity_score_from_idx</a>(aa_idx) ;
|
|
<a name="l00525"></a>00525 desc-><a class="code" href="structs__desc.html#d612b029bba06646381771d4b61dc5e6">polarity_score</a> += <a class="code" href="aa_8c.html#6b1242df111921659782dc1285ac101a">get_polarity_from_idx</a>(aa_idx) ;
|
|
<a name="l00526"></a>00526 desc-><a class="code" href="structs__desc.html#0bf245c3d85f2fc8dec41d560313588a">volume_score</a> += <a class="code" href="aa_8c.html#ce98533a9358aec6dcc325fe567c26fe">get_volume_score_from_idx</a>(aa_idx) ;
|
|
<a name="l00527"></a>00527 desc-><a class="code" href="structs__desc.html#00da80b684d1bb1af13ec779e282c7e0">charge_score</a> += <a class="code" href="aa_8c.html#641c90c89a2f096c09ee972cf05d8b71">get_charge_from_idx</a>(aa_idx) ;
|
|
<a name="l00528"></a>00528 }
|
|
<a name="l00529"></a>00529 }
|
|
</pre></div>
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="18991bc3f2c0fb6d81667f412d516e70"></a><!-- doxytag: member="descriptors.h::set_atom_based_descriptors" ref="18991bc3f2c0fb6d81667f412d516e70" args="(s_atm **atoms, int natoms, s_desc *desc, s_atm *all_atoms, int all_natoms)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void set_atom_based_descriptors </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="structs__atm.html">s_atm</a> ** </td>
|
|
<td class="paramname"> <em>atoms</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"> <em>natoms</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="structs__desc.html">s_desc</a> * </td>
|
|
<td class="paramname"> <em>desc</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="structs__atm.html">s_atm</a> * </td>
|
|
<td class="paramname"> <em>all_atoms</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"> <em>all_natoms</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
## FUNCTION: set_atom_based_descriptors<p>
|
|
## SPECIFICATION: Update atomic descriptors of the pocket for the given atom. Here, we just update mean bfactor, electronegativity, amino-acids scores...<p>
|
|
## PARAMETRES: @ s_atom *atoms : The atoms @ int natoms : Number of atoms @ <a class="el" href="structs__desc.html">s_desc</a> *desc : OUTPUT : The descriptor structure to fill<p>
|
|
## RETURN: void
|
|
<p>Definition at line <a class="el" href="descriptors_8c-source.html#l00373">373</a> of file <a class="el" href="descriptors_8c-source.html">descriptors.c</a>.</p>
|
|
|
|
<p>References <a class="el" href="atom_8h-source.html#l00070">s_atm::bfactor</a>, <a class="el" href="atom_8h-source.html#l00057">s_atm::chain</a>, <a class="el" href="descriptors_8h-source.html#l00100">s_desc::characterChain1</a>, <a class="el" href="descriptors_8h-source.html#l00100">s_desc::characterChain2</a>, <a class="el" href="descriptors_8c-source.html#l00333">countResidues()</a>, <a class="el" href="atom_8h-source.html#l00070">s_atm::electroneg</a>, <a class="el" href="rpdb_8c-source.html#l00189">element_in_kept_res()</a>, <a class="el" href="pertable_8c-source.html#l00355">element_in_nucl_acid()</a>, <a class="el" href="pertable_8c-source.html#l00333">element_in_std_res()</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::flex</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::hydrophobicity_score</a>, <a class="el" href="utils_8c-source.html#l00475">in_tab()</a>, <a class="el" href="descriptors_8h-source.html#l00100">s_desc::interChain</a>, <a class="el" href="descriptors_8h-source.html#l00105">s_desc::nameChain1</a>, <a class="el" href="descriptors_8h-source.html#l00105">s_desc::nameChain2</a>, <a class="el" href="descriptors_8h-source.html#l00100">s_desc::numResChain1</a>, <a class="el" href="descriptors_8h-source.html#l00100">s_desc::numResChain2</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::prop_polar_atm</a>, <a class="el" href="atom_8h-source.html#l00063">s_atm::res_id</a>, <a class="el" href="atom_8h-source.html#l00057">s_atm::res_name</a>, <a class="el" href="descriptors_8c-source.html#l00469">set_aa_desc()</a>, and <a class="el" href="descriptors_8h-source.html#l00058">s_desc::volume_score</a>.</p>
|
|
|
|
<p>Referenced by <a class="el" href="descriptors_8c-source.html#l00182">set_descriptors()</a>.</p>
|
|
<div class="fragment"><pre class="fragment"><a name="l00374"></a>00374 {
|
|
<a name="l00375"></a>00375 <a class="code" href="structs__atm.html">s_atm</a> *curatom = NULL ;
|
|
<a name="l00376"></a>00376 <a class="code" href="structs__atm.html">s_atm</a> *firstatom = NULL;
|
|
<a name="l00377"></a>00377 <span class="keywordtype">int</span> i,
|
|
<a name="l00378"></a>00378 curChar = 0,
|
|
<a name="l00379"></a>00379 res_ids[natoms], <span class="comment">/* Maximum natoms residues contacting the pocket */</span>
|
|
<a name="l00380"></a>00380 nb_res_ids = 0 ; <span class="comment">/* Current number of residus */</span>
|
|
<a name="l00381"></a>00381
|
|
<a name="l00382"></a>00382 <span class="keywordtype">int</span> nb_polar_atm = 0 ;
|
|
<a name="l00383"></a>00383 <span class="keywordtype">char</span> curChainName[2];
|
|
<a name="l00384"></a>00384 <span class="keywordflow">if</span>(atoms){
|
|
<a name="l00385"></a>00385 firstatom=atoms[0];
|
|
<a name="l00386"></a>00386 desc-><a class="code" href="structs__desc.html#bced97f35d6447d67d3dda6b09039a86">interChain</a>=0;
|
|
<a name="l00387"></a>00387
|
|
<a name="l00388"></a>00388 <span class="keywordflow">if</span>(<a class="code" href="pertable_8c.html#9ec74074992414a252deb3bdb6f53af5">element_in_std_res</a>(firstatom-><a class="code" href="structs__atm.html#e0ff20f2c491a8b16c866d9b1386b6a5">res_name</a>)) desc-><a class="code" href="structs__desc.html#8e7dd8b06d5e732c055f5c2a46279f00">characterChain1</a>=0;
|
|
<a name="l00389"></a>00389 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="pertable_8c.html#9016391ffac695897fc618911af1077d">element_in_nucl_acid</a>(firstatom-><a class="code" href="structs__atm.html#e0ff20f2c491a8b16c866d9b1386b6a5">res_name</a>)) desc-><a class="code" href="structs__desc.html#8e7dd8b06d5e732c055f5c2a46279f00">characterChain1</a>=1;
|
|
<a name="l00390"></a>00390 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="rpdb_8c.html#b8eb6aa861c587d79cd28ad62ab5dd1f">element_in_kept_res</a>(firstatom-><a class="code" href="structs__atm.html#e0ff20f2c491a8b16c866d9b1386b6a5">res_name</a>)) desc-><a class="code" href="structs__desc.html#8e7dd8b06d5e732c055f5c2a46279f00">characterChain1</a>=2;
|
|
<a name="l00391"></a>00391 strcpy(desc-><a class="code" href="structs__desc.html#ba87f099c4cb32f55ae66977b9cdb8e4">nameChain1</a>,firstatom-><a class="code" href="structs__atm.html#c5b9464bd67f2cca101f7bf6beabb223">chain</a>);
|
|
<a name="l00392"></a>00392 strcpy(curChainName,firstatom-><a class="code" href="structs__atm.html#c5b9464bd67f2cca101f7bf6beabb223">chain</a>);
|
|
<a name="l00393"></a>00393 desc-><a class="code" href="structs__desc.html#1d09eefd576e05f70a489363575f32aa">numResChain1</a> = <a class="code" href="descriptors_8c.html#62ddb86953349fc86736a5a149133e27">countResidues</a>(all_atoms,all_natoms,firstatom-><a class="code" href="structs__atm.html#c5b9464bd67f2cca101f7bf6beabb223">chain</a>);
|
|
<a name="l00394"></a>00394
|
|
<a name="l00395"></a>00395 <span class="keywordflow">for</span>(i = 0 ; i < natoms ; i++) {
|
|
<a name="l00396"></a>00396 curatom = atoms[i] ;
|
|
<a name="l00397"></a>00397 <span class="keywordflow">if</span>(curatom!=firstatom){
|
|
<a name="l00398"></a>00398 <span class="keywordflow">if</span>(strcmp(curatom-><a class="code" href="structs__atm.html#c5b9464bd67f2cca101f7bf6beabb223">chain</a>,firstatom-><a class="code" href="structs__atm.html#c5b9464bd67f2cca101f7bf6beabb223">chain</a>)!=0 && desc-><a class="code" href="structs__desc.html#bced97f35d6447d67d3dda6b09039a86">interChain</a> < 1) {
|
|
<a name="l00399"></a>00399 desc-><a class="code" href="structs__desc.html#bced97f35d6447d67d3dda6b09039a86">interChain</a> = 1;
|
|
<a name="l00400"></a>00400 <span class="keywordflow">if</span>(!desc-><a class="code" href="structs__desc.html#bcbc3f48a90c23ac7678804a411abd90">numResChain2</a>){
|
|
<a name="l00401"></a>00401 desc-><a class="code" href="structs__desc.html#bcbc3f48a90c23ac7678804a411abd90">numResChain2</a> = <a class="code" href="descriptors_8c.html#62ddb86953349fc86736a5a149133e27">countResidues</a>(all_atoms,all_natoms,curatom-><a class="code" href="structs__atm.html#c5b9464bd67f2cca101f7bf6beabb223">chain</a>);
|
|
<a name="l00402"></a>00402 strncpy(curChainName,curatom-><a class="code" href="structs__atm.html#c5b9464bd67f2cca101f7bf6beabb223">chain</a>,1);
|
|
<a name="l00403"></a>00403 }
|
|
<a name="l00404"></a>00404 }
|
|
<a name="l00405"></a>00405
|
|
<a name="l00406"></a>00406 <span class="keywordflow">if</span>(<a class="code" href="pertable_8c.html#9ec74074992414a252deb3bdb6f53af5">element_in_std_res</a>(curatom-><a class="code" href="structs__atm.html#e0ff20f2c491a8b16c866d9b1386b6a5">res_name</a>)){
|
|
<a name="l00407"></a>00407 curChar=0;
|
|
<a name="l00408"></a>00408 <span class="comment">//strcpy(curChainName,curatom->chain);</span>
|
|
<a name="l00409"></a>00409 }
|
|
<a name="l00410"></a>00410 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="pertable_8c.html#9016391ffac695897fc618911af1077d">element_in_nucl_acid</a>(curatom-><a class="code" href="structs__atm.html#e0ff20f2c491a8b16c866d9b1386b6a5">res_name</a>)){
|
|
<a name="l00411"></a>00411 curChar=1;
|
|
<a name="l00412"></a>00412 <span class="comment">//strcpy(curChainName,curatom->chain);</span>
|
|
<a name="l00413"></a>00413 }
|
|
<a name="l00414"></a>00414 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="rpdb_8c.html#b8eb6aa861c587d79cd28ad62ab5dd1f">element_in_kept_res</a>(curatom-><a class="code" href="structs__atm.html#e0ff20f2c491a8b16c866d9b1386b6a5">res_name</a>)){
|
|
<a name="l00415"></a>00415 curChar=2;
|
|
<a name="l00416"></a>00416 <span class="comment">//strcpy(curChainName,curatom->chain);</span>
|
|
<a name="l00417"></a>00417 }
|
|
<a name="l00418"></a>00418 <span class="keywordflow">if</span>(curChar!=desc-><a class="code" href="structs__desc.html#8e7dd8b06d5e732c055f5c2a46279f00">characterChain1</a>){
|
|
<a name="l00419"></a>00419 desc-><a class="code" href="structs__desc.html#c18283db8c6ebb14a806f3fd73b41b5e">characterChain2</a>=curChar;
|
|
<a name="l00420"></a>00420 <span class="comment">//strcpy(curChainName,curatom->chain);</span>
|
|
<a name="l00421"></a>00421 }
|
|
<a name="l00422"></a>00422 }
|
|
<a name="l00423"></a>00423 <span class="comment">/* Setting amino acid descriptor of the current atom */</span>
|
|
<a name="l00424"></a>00424 <span class="keywordflow">if</span>(<a class="code" href="utils_8c.html#c02faf0c5e3cf0b256a1ad1d37d9b8a2">in_tab</a>(res_ids, nb_res_ids, curatom-><a class="code" href="structs__atm.html#7c42c076ce151f4af210bef730b2b88f">res_id</a>) == 0) {
|
|
<a name="l00425"></a>00425 <a class="code" href="descriptors_8c.html#4fae028d2c83da127914b336e71f8340">set_aa_desc</a>(desc, atoms[i]->res_name) ;
|
|
<a name="l00426"></a>00426 res_ids[nb_res_ids] = curatom-><a class="code" href="structs__atm.html#7c42c076ce151f4af210bef730b2b88f">res_id</a> ;
|
|
<a name="l00427"></a>00427 nb_res_ids ++ ;
|
|
<a name="l00428"></a>00428 }
|
|
<a name="l00429"></a>00429
|
|
<a name="l00430"></a>00430 <span class="comment">/* Setting atom descriptor */</span>
|
|
<a name="l00431"></a>00431 desc-><a class="code" href="structs__desc.html#537c647e77f9ca129c77b31e3d15b2ca">flex</a> += curatom-><a class="code" href="structs__atm.html#6a1a5fd32629457dfa14626b25b5ae46">bfactor</a> ;
|
|
<a name="l00432"></a>00432 <span class="keywordflow">if</span>(curatom-><a class="code" href="structs__atm.html#f41b525ee3032d47baf2db10387f022c">electroneg</a> > 2.7) nb_polar_atm += 1 ;
|
|
<a name="l00433"></a>00433 }
|
|
<a name="l00434"></a>00434
|
|
<a name="l00435"></a>00435 <span class="keywordflow">if</span>(!desc-><a class="code" href="structs__desc.html#bcbc3f48a90c23ac7678804a411abd90">numResChain2</a>) desc-><a class="code" href="structs__desc.html#bcbc3f48a90c23ac7678804a411abd90">numResChain2</a> = <a class="code" href="descriptors_8c.html#62ddb86953349fc86736a5a149133e27">countResidues</a>(all_atoms,all_natoms,curatom-><a class="code" href="structs__atm.html#c5b9464bd67f2cca101f7bf6beabb223">chain</a>);
|
|
<a name="l00436"></a>00436 strcpy(desc-><a class="code" href="structs__desc.html#686ea7cc191da8c6ab8e8d7178a9a5ea">nameChain2</a>,curChainName);
|
|
<a name="l00437"></a>00437
|
|
<a name="l00438"></a>00438 <span class="comment">/*fprintf(stdout,":%s:",desc->ligTag);*/</span>
|
|
<a name="l00439"></a>00439 desc-><a class="code" href="structs__desc.html#ec451be95312187f418e20b87ebc0c1c">hydrophobicity_score</a> = desc-><a class="code" href="structs__desc.html#ec451be95312187f418e20b87ebc0c1c">hydrophobicity_score</a>/ (float) nb_res_ids ;
|
|
<a name="l00440"></a>00440 desc-><a class="code" href="structs__desc.html#0bf245c3d85f2fc8dec41d560313588a">volume_score</a> = desc-><a class="code" href="structs__desc.html#0bf245c3d85f2fc8dec41d560313588a">volume_score</a> / (float) nb_res_ids ;
|
|
<a name="l00441"></a>00441
|
|
<a name="l00442"></a>00442 desc-><a class="code" href="structs__desc.html#537c647e77f9ca129c77b31e3d15b2ca">flex</a> /= natoms ;
|
|
<a name="l00443"></a>00443 desc-><a class="code" href="structs__desc.html#6363a7adfb5bc485f3524b8d4f0b5326">prop_polar_atm</a> = ((float) nb_polar_atm) / ((float) natoms) * 100.0 ;
|
|
<a name="l00444"></a>00444 }
|
|
<a name="l00445"></a>00445 <span class="keywordflow">else</span> {
|
|
<a name="l00446"></a>00446 desc-><a class="code" href="structs__desc.html#ec451be95312187f418e20b87ebc0c1c">hydrophobicity_score</a>=0.0;
|
|
<a name="l00447"></a>00447 desc-><a class="code" href="structs__desc.html#0bf245c3d85f2fc8dec41d560313588a">volume_score</a>=0.0;
|
|
<a name="l00448"></a>00448 desc-><a class="code" href="structs__desc.html#537c647e77f9ca129c77b31e3d15b2ca">flex</a>=0.0;
|
|
<a name="l00449"></a>00449 desc-><a class="code" href="structs__desc.html#6363a7adfb5bc485f3524b8d4f0b5326">prop_polar_atm</a>=0.0;
|
|
<a name="l00450"></a>00450 }
|
|
<a name="l00451"></a>00451
|
|
<a name="l00452"></a>00452 }
|
|
</pre></div>
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="fd7782a048e3fccd63e24980d98cbf2b"></a><!-- doxytag: member="descriptors.h::set_descriptors" ref="fd7782a048e3fccd63e24980d98cbf2b" args="(s_atm **tatoms, int natoms, s_vvertice **tvert, int nvert, s_desc *desc, int niter, s_pdb *pdb, int flag_do_expensive_calculations)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void set_descriptors </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="structs__atm.html">s_atm</a> ** </td>
|
|
<td class="paramname"> <em>atoms</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"> <em>natoms</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="structs__vvertice.html">s_vvertice</a> ** </td>
|
|
<td class="paramname"> <em>tvert</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"> <em>nvert</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="structs__desc.html">s_desc</a> * </td>
|
|
<td class="paramname"> <em>desc</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"> <em>niter</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="structs__pdb.html">s_pdb</a> * </td>
|
|
<td class="paramname"> <em>pdb</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"> <em>flag_do_expensive_calculations</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
## FUNCTION: set_descriptors<p>
|
|
## SPECIFICATION: Set descriptors using a set of atoms with corresponding voronoi vertices. Current descriptors (need to be improved...) includes atom/AA based descriptors and voronoi vertice based descriptors. A word on several descriptors:<ul>
|
|
<li>The "solvent accessibility" of a sphere (which is rather the buriedness degree...) is defined as the distance of the barycenter of the sphere (defined using the 4 contacted atoms) from the center of the sphere.</li><li>The mean_loc_hyd_dens is the mean value of apolar density calculated for each vertice and defined in the next function (see comments or doc)</li></ul>
|
|
<p>
|
|
## PARAMETRES: @ <a class="el" href="structs__atm.html">s_atm</a> **atoms : The list of atoms @ int natoms : The number of atoms @ <a class="el" href="structs__vvertice.html">s_vvertice</a> **tvert : The list of vertices @ int nvert : The number of vertices @ <a class="el" href="structs__desc.html">s_desc</a> *desc : OUTPUT: The descriptor structure to fill<p>
|
|
## RETURN: void: <a class="el" href="structs__desc.html">s_desc</a> is filled
|
|
<p>Definition at line <a class="el" href="descriptors_8c-source.html#l00182">182</a> of file <a class="el" href="descriptors_8c-source.html">descriptors.c</a>.</p>
|
|
|
|
<p>References <a class="el" href="descriptors_8h-source.html#l00058">s_desc::apolar_asphere_prop</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::as_density</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::as_max_dst</a>, <a class="el" href="descriptors_8h-source.html#l00098">s_desc::as_max_r</a>, <a class="el" href="voronoi_8h-source.html#l00086">s_vvertice::bary</a>, <a class="el" href="calc_8c-source.html#l00075">dist()</a>, <a class="el" href="voronoi_8c-source.html#l00454">get_verts_volume_ptr()</a>, <a class="el" href="rpdb_8h-source.html#l00072">s_pdb::latoms</a>, <a class="el" href="voronoi_8h-source.html#l00057">M_APOLAR_AS</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::masph_sacc</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::mean_asph_ray</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::mean_loc_hyd_dens</a>, <a class="el" href="rpdb_8h-source.html#l00078">s_pdb::natoms</a>, <a class="el" href="descriptors_8h-source.html#l00095">s_desc::nb_asph</a>, <a class="el" href="voronoi_8h-source.html#l00075">s_vvertice::ray</a>, <a class="el" href="asa_8c-source.html#l00267">set_ASA()</a>, <a class="el" href="descriptors_8c-source.html#l00373">set_atom_based_descriptors()</a>, <a class="el" href="voronoi_8h-source.html#l00070">s_vvertice::type</a>, <a class="el" href="descriptors_8h-source.html#l00058">s_desc::volume</a>, <a class="el" href="voronoi_8h-source.html#l00076">s_vvertice::x</a>, <a class="el" href="voronoi_8h-source.html#l00076">s_vvertice::y</a>, and <a class="el" href="voronoi_8h-source.html#l00076">s_vvertice::z</a>.</p>
|
|
|
|
<p>Referenced by <a class="el" href="dpocket_8c-source.html#l00336">get_explicit_desc()</a>, <a class="el" href="mdpocket_8c-source.html#l00217">mdpocket_characterize()</a>, and <a class="el" href="pocket_8c-source.html#l00582">set_pockets_descriptors()</a>.</p>
|
|
<div class="fragment"><pre class="fragment"><a name="l00184"></a>00184 {
|
|
<a name="l00185"></a>00185 <span class="comment">/* Setting atom-based descriptors */</span>
|
|
<a name="l00186"></a>00186 <a class="code" href="descriptors_8c.html#18991bc3f2c0fb6d81667f412d516e70">set_atom_based_descriptors</a>(atoms, natoms, desc, pdb-><a class="code" href="structs__pdb.html#3b0fff968487b66aa1c88e55d45120e4">latoms</a>, pdb-><a class="code" href="structs__pdb.html#85aaf7bdb931bb303af1ca736a998b98">natoms</a>) ;
|
|
<a name="l00187"></a>00187
|
|
<a name="l00188"></a>00188 <span class="comment">/* Setting vertice-based descriptors */</span>
|
|
<a name="l00189"></a>00189 <span class="keywordflow">if</span>(! tvert) return ;
|
|
<a name="l00190"></a>00190
|
|
<a name="l00191"></a>00191 <span class="keywordtype">float</span> d = 0.0, vx, vy, vz, vrad,
|
|
<a name="l00192"></a>00192 masph_sacc = 0.0, <span class="comment">/* Mean alpha sphere solvent accessibility */</span>
|
|
<a name="l00193"></a>00193 mean_ashape_radius = 0.0,
|
|
<a name="l00194"></a>00194 as_density = 0.0, as_max_dst = -1.0,
|
|
<a name="l00195"></a>00195 dtmp = 0.0 ;
|
|
<a name="l00196"></a>00196
|
|
<a name="l00197"></a>00197 <span class="keywordtype">int</span> i, j,
|
|
<a name="l00198"></a>00198 napol_neigh = 0,
|
|
<a name="l00199"></a>00199 nAlphaApol = 0 ;
|
|
<a name="l00200"></a>00200
|
|
<a name="l00201"></a>00201 <span class="keywordtype">float</span> as_max_r = -1.0 ;
|
|
<a name="l00202"></a>00202
|
|
<a name="l00203"></a>00203 <a class="code" href="structs__vvertice.html">s_vvertice</a> *vcur = NULL,
|
|
<a name="l00204"></a>00204 *vc = NULL ;
|
|
<a name="l00205"></a>00205
|
|
<a name="l00206"></a>00206 desc-><a class="code" href="structs__desc.html#b48b3533d79c147285ca50eabc12ef63">mean_loc_hyd_dens</a> = 0.0 ;
|
|
<a name="l00207"></a>00207 <span class="comment">/*</span>
|
|
<a name="l00208"></a>00208 <span class="comment"> fprintf(stdout, "\nIn set descripotirs\n") ;</span>
|
|
<a name="l00209"></a>00209 <span class="comment">*/</span>
|
|
<a name="l00210"></a>00210 <span class="keywordflow">for</span>(i = 0 ; i < nvert ; i++) {
|
|
<a name="l00211"></a>00211 vcur = tvert[i] ;
|
|
<a name="l00212"></a>00212 <span class="comment">/*</span>
|
|
<a name="l00213"></a>00213 <span class="comment"> fprintf(stdout, "Vertice %d: %d %f\n", i, vcur->id, vcur->ray) ;</span>
|
|
<a name="l00214"></a>00214 <span class="comment">*/</span>
|
|
<a name="l00215"></a>00215 <span class="keywordflow">if</span>(vcur-><a class="code" href="structs__vvertice.html#0aadc589bd2213f3c6246e873cc69a83">ray</a> > as_max_r) as_max_r = vcur-><a class="code" href="structs__vvertice.html#0aadc589bd2213f3c6246e873cc69a83">ray</a> ;
|
|
<a name="l00216"></a>00216
|
|
<a name="l00217"></a>00217 vx = vcur-><a class="code" href="structs__vvertice.html#017f9695c923d87d851231bf13967b22">x</a> ; vy = vcur-><a class="code" href="structs__vvertice.html#250642d688398e4186819f63d54247bc">y</a> ; vz = vcur-><a class="code" href="structs__vvertice.html#3e03d11fd3b1d0ffb623481fa1b497b6">z</a> ; vrad = vcur-><a class="code" href="structs__vvertice.html#0aadc589bd2213f3c6246e873cc69a83">ray</a> ;
|
|
<a name="l00218"></a>00218
|
|
<a name="l00219"></a>00219 <span class="comment">/* Calculate apolar density if necessary, and pocket density */</span>
|
|
<a name="l00220"></a>00220 j = 0 ;
|
|
<a name="l00221"></a>00221 <span class="keywordflow">if</span>(vcur-><a class="code" href="structs__vvertice.html#7cd4bd55a93f3400449ef354b49bb4c3">type</a> == <a class="code" href="voronoi_8h.html#e90a1520c3ca5a4b829d387d4d06b004">M_APOLAR_AS</a>) {
|
|
<a name="l00222"></a>00222 napol_neigh = 0 ;
|
|
<a name="l00223"></a>00223 <span class="keywordflow">for</span>(j = 0 ; j < nvert ; j++) {
|
|
<a name="l00224"></a>00224 vc = tvert[j] ;
|
|
<a name="l00225"></a>00225
|
|
<a name="l00226"></a>00226 <span class="comment">/* Increment the number of apolar neighbor */</span>
|
|
<a name="l00227"></a>00227 <span class="keywordflow">if</span>(vc != vcur && vc-><a class="code" href="structs__vvertice.html#7cd4bd55a93f3400449ef354b49bb4c3">type</a> == <a class="code" href="voronoi_8h.html#e90a1520c3ca5a4b829d387d4d06b004">M_APOLAR_AS</a> &&
|
|
<a name="l00228"></a>00228 <a class="code" href="calc_8c.html#615f3353fc9ccc88069adb4000b21e73">dist</a>(vx, vy, vz, vc->x, vc->y, vc->z)-(vc->ray + vrad) <= 0.) {
|
|
<a name="l00229"></a>00229 napol_neigh += 1 ;
|
|
<a name="l00230"></a>00230 }
|
|
<a name="l00231"></a>00231
|
|
<a name="l00232"></a>00232 <span class="comment">/* Update density by the way... */</span>
|
|
<a name="l00233"></a>00233 <span class="keywordflow">if</span>(j > i) {
|
|
<a name="l00234"></a>00234 dtmp = <a class="code" href="calc_8c.html#615f3353fc9ccc88069adb4000b21e73">dist</a>(vcur-><a class="code" href="structs__vvertice.html#017f9695c923d87d851231bf13967b22">x</a>, vcur-><a class="code" href="structs__vvertice.html#250642d688398e4186819f63d54247bc">y</a>, vcur-><a class="code" href="structs__vvertice.html#3e03d11fd3b1d0ffb623481fa1b497b6">z</a>,
|
|
<a name="l00235"></a>00235 vc->x, vc->y, vc->z);
|
|
<a name="l00236"></a>00236
|
|
<a name="l00237"></a>00237 <span class="keywordflow">if</span>(dtmp > as_max_dst) as_max_dst = dtmp ;
|
|
<a name="l00238"></a>00238 as_density += dtmp ;
|
|
<a name="l00239"></a>00239 }
|
|
<a name="l00240"></a>00240 }
|
|
<a name="l00241"></a>00241 desc-><a class="code" href="structs__desc.html#b48b3533d79c147285ca50eabc12ef63">mean_loc_hyd_dens</a> += (float) napol_neigh ;
|
|
<a name="l00242"></a>00242 nAlphaApol += 1 ;
|
|
<a name="l00243"></a>00243 }
|
|
<a name="l00244"></a>00244 <span class="keywordflow">else</span> {
|
|
<a name="l00245"></a>00245 <span class="comment">/* Update density */</span>
|
|
<a name="l00246"></a>00246 <span class="keywordflow">for</span>(j = i+1 ; j < nvert ; j++) {
|
|
<a name="l00247"></a>00247 dtmp = <a class="code" href="calc_8c.html#615f3353fc9ccc88069adb4000b21e73">dist</a>(vcur-><a class="code" href="structs__vvertice.html#017f9695c923d87d851231bf13967b22">x</a>, vcur-><a class="code" href="structs__vvertice.html#250642d688398e4186819f63d54247bc">y</a>, vcur-><a class="code" href="structs__vvertice.html#3e03d11fd3b1d0ffb623481fa1b497b6">z</a>,
|
|
<a name="l00248"></a>00248 tvert[j]-><a class="code" href="structs__vvertice.html#017f9695c923d87d851231bf13967b22">x</a>, tvert[j]-><a class="code" href="structs__vvertice.html#250642d688398e4186819f63d54247bc">y</a>, tvert[j]-><a class="code" href="structs__vvertice.html#3e03d11fd3b1d0ffb623481fa1b497b6">z</a>) ;
|
|
<a name="l00249"></a>00249
|
|
<a name="l00250"></a>00250 <span class="keywordflow">if</span>(dtmp > as_max_dst) as_max_dst = dtmp ;
|
|
<a name="l00251"></a>00251 as_density += dtmp ;
|
|
<a name="l00252"></a>00252 }
|
|
<a name="l00253"></a>00253 }
|
|
<a name="l00254"></a>00254
|
|
<a name="l00255"></a>00255 mean_ashape_radius += vcur-><a class="code" href="structs__vvertice.html#0aadc589bd2213f3c6246e873cc69a83">ray</a> ;
|
|
<a name="l00256"></a>00256 <span class="comment">/* Estimating solvent accessibility of the sphere */</span>
|
|
<a name="l00257"></a>00257 d = <a class="code" href="calc_8c.html#615f3353fc9ccc88069adb4000b21e73">dist</a>(vcur-><a class="code" href="structs__vvertice.html#017f9695c923d87d851231bf13967b22">x</a>, vcur-><a class="code" href="structs__vvertice.html#250642d688398e4186819f63d54247bc">y</a>, vcur-><a class="code" href="structs__vvertice.html#3e03d11fd3b1d0ffb623481fa1b497b6">z</a>,
|
|
<a name="l00258"></a>00258 vcur-><a class="code" href="structs__vvertice.html#158f2fc12fef57205ad4f951bf20caea">bary</a>[0], vcur-><a class="code" href="structs__vvertice.html#158f2fc12fef57205ad4f951bf20caea">bary</a>[1], vcur-><a class="code" href="structs__vvertice.html#158f2fc12fef57205ad4f951bf20caea">bary</a>[2]) ;
|
|
<a name="l00259"></a>00259 masph_sacc += d/vcur-><a class="code" href="structs__vvertice.html#0aadc589bd2213f3c6246e873cc69a83">ray</a> ;
|
|
<a name="l00260"></a>00260 }
|
|
<a name="l00261"></a>00261
|
|
<a name="l00262"></a>00262 <span class="keywordflow">if</span>(nAlphaApol>0) desc-><a class="code" href="structs__desc.html#b48b3533d79c147285ca50eabc12ef63">mean_loc_hyd_dens</a> /= (float)nAlphaApol ;
|
|
<a name="l00263"></a>00263 <span class="keywordflow">else</span> desc-><a class="code" href="structs__desc.html#b48b3533d79c147285ca50eabc12ef63">mean_loc_hyd_dens</a>= 0.0;
|
|
<a name="l00264"></a>00264
|
|
<a name="l00265"></a>00265 <span class="keywordflow">if</span>(flag_do_expensive_calculations) {
|
|
<a name="l00266"></a>00266 <a class="code" href="asa_8c.html#46b1e19813ef3f501d7ce77892e3bfcd">set_ASA</a>(desc, pdb, tvert, nvert);
|
|
<a name="l00267"></a>00267 desc-><a class="code" href="structs__desc.html#ec106f2a35f5676a6af920311aa4260e">volume</a> = <a class="code" href="voronoi_8c.html#621631ed13a0e6d72412f1551969a655">get_verts_volume_ptr</a>(tvert, nvert, niter,-1.6) ;
|
|
<a name="l00268"></a>00268 }
|
|
<a name="l00269"></a>00269 <span class="comment">/*set_ASA(desc,pdb, atoms, natoms, tvert, nvert);*/</span>
|
|
<a name="l00270"></a>00270
|
|
<a name="l00271"></a>00271 desc-><a class="code" href="structs__desc.html#6620d6b2cdaaa469b32a66a5e5260a80">as_max_dst</a> = as_max_dst ;
|
|
<a name="l00272"></a>00272 desc-><a class="code" href="structs__desc.html#1e842880419a0616060301b4eacf858f">apolar_asphere_prop</a> = (float)nAlphaApol / (<span class="keywordtype">float</span>)nvert ;
|
|
<a name="l00273"></a>00273 desc-><a class="code" href="structs__desc.html#8d8c1b492a8f07602c496ffe907a7135">masph_sacc</a> = masph_sacc / nvert ;
|
|
<a name="l00274"></a>00274 desc-><a class="code" href="structs__desc.html#6e455ee4a61943b81a09fb9c4a816967">mean_asph_ray</a> = mean_ashape_radius / (float)nvert ;
|
|
<a name="l00275"></a>00275 desc-><a class="code" href="structs__desc.html#d481d25ff964a6858975b5abfb671412">nb_asph</a> = nvert ;
|
|
<a name="l00276"></a>00276 desc-><a class="code" href="structs__desc.html#2aeb19cfc5f53e2d22f1a2065ede1010">as_density</a> = as_density / ((nvert*nvert - nvert) * 0.5) ;
|
|
<a name="l00277"></a>00277
|
|
<a name="l00278"></a>00278 desc-><a class="code" href="structs__desc.html#eb15aebab64687c1c18d261e40b96901">as_max_r</a> = as_max_r ;
|
|
<a name="l00279"></a>00279 <span class="keywordflow">if</span> (nvert==0){
|
|
<a name="l00280"></a>00280 desc-><a class="code" href="structs__desc.html#1e842880419a0616060301b4eacf858f">apolar_asphere_prop</a>=0.0;
|
|
<a name="l00281"></a>00281 desc-><a class="code" href="structs__desc.html#8d8c1b492a8f07602c496ffe907a7135">masph_sacc</a>=0.0;
|
|
<a name="l00282"></a>00282 desc-><a class="code" href="structs__desc.html#6e455ee4a61943b81a09fb9c4a816967">mean_asph_ray</a>=0.0;
|
|
<a name="l00283"></a>00283 desc-><a class="code" href="structs__desc.html#2aeb19cfc5f53e2d22f1a2065ede1010">as_density</a>=0.0;
|
|
<a name="l00284"></a>00284 }
|
|
<a name="l00285"></a>00285 }
|
|
</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
|
|
<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>
|