Files
fpocket/doc/deprecated/programmers_guide/html/utils_8h_source.html
2020-06-06 16:04:20 +02:00

178 lines
14 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: utils.h Source File</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.9 -->
<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 class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<h1>utils.h</h1><a href="utils_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> COPYRIGHT DISCLAIMER</span>
<a name="l00003"></a>00003 <span class="comment"></span>
<a name="l00004"></a>00004 <span class="comment"> Vincent Le Guilloux, Peter Schmidtke and Pierre Tuffery, hereby</span>
<a name="l00005"></a>00005 <span class="comment"> disclaim all copyright interest in the program “fpocket” (which</span>
<a name="l00006"></a>00006 <span class="comment"> performs protein cavity detection) written by Vincent Le Guilloux and Peter</span>
<a name="l00007"></a>00007 <span class="comment"> Schmidtke.</span>
<a name="l00008"></a>00008 <span class="comment"></span>
<a name="l00009"></a>00009 <span class="comment"> Vincent Le Guilloux 28 November 2008</span>
<a name="l00010"></a>00010 <span class="comment"> Peter Schmidtke 28 November 2008</span>
<a name="l00011"></a>00011 <span class="comment"> Pierre Tuffery 28 November 2008</span>
<a name="l00012"></a>00012 <span class="comment"></span>
<a name="l00013"></a>00013 <span class="comment"> GNU GPL</span>
<a name="l00014"></a>00014 <span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment"> This file is part of the fpocket package.</span>
<a name="l00016"></a>00016 <span class="comment"></span>
<a name="l00017"></a>00017 <span class="comment"> fpocket is free software: you can redistribute it and/or modify</span>
<a name="l00018"></a>00018 <span class="comment"> it under the terms of the GNU General Public License as published by</span>
<a name="l00019"></a>00019 <span class="comment"> the Free Software Foundation, either version 3 of the License, or</span>
<a name="l00020"></a>00020 <span class="comment"> (at your option) any later version.</span>
<a name="l00021"></a>00021 <span class="comment"></span>
<a name="l00022"></a>00022 <span class="comment"> fpocket is distributed in the hope that it will be useful,</span>
<a name="l00023"></a>00023 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00024"></a>00024 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
<a name="l00025"></a>00025 <span class="comment"> GNU General Public License for more details.</span>
<a name="l00026"></a>00026 <span class="comment"></span>
<a name="l00027"></a>00027 <span class="comment"> You should have received a copy of the GNU General Public License</span>
<a name="l00028"></a>00028 <span class="comment"> along with fpocket. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<a name="l00029"></a>00029 <span class="comment"></span>
<a name="l00030"></a>00030 <span class="comment">**/</span>
<a name="l00031"></a>00031
<a name="l00032"></a>00032
<a name="l00033"></a>00033 <span class="preprocessor">#ifndef DH_UTILS</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#define DH_UTILS</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span>
<a name="l00036"></a>00036 <span class="comment">/* ------------------------------ INCLUDES ---------------------------------- */</span>
<a name="l00037"></a>00037
<a name="l00038"></a>00038 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00039"></a>00039 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00040"></a>00040 <span class="preprocessor">#include &lt;unistd.h&gt;</span>
<a name="l00041"></a>00041 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00042"></a>00042 <span class="preprocessor">#include &lt;ctype.h&gt;</span>
<a name="l00043"></a>00043 <span class="preprocessor">#include &lt;limits.h&gt;</span>
<a name="l00044"></a>00044 <span class="preprocessor">#include &lt;time.h&gt;</span>
<a name="l00045"></a>00045
<a name="l00046"></a>00046 <span class="preprocessor">#ifdef MD_USE_GSL </span><span class="comment">/* GSL */</span>
<a name="l00047"></a>00047
<a name="l00048"></a>00048 <span class="preprocessor">#include &lt;gsl/gsl_rng.h&gt;</span>
<a name="l00049"></a>00049 <span class="preprocessor">#include &lt;gsl/gsl_randist.h&gt;</span>
<a name="l00050"></a>00050
<a name="l00051"></a>00051 <span class="preprocessor">#endif </span><span class="comment">/* /GSL */</span>
<a name="l00052"></a>00052
<a name="l00053"></a>00053 <span class="preprocessor">#include "<a class="code" href="memhandler_8h.html">memhandler.h</a>"</span>
<a name="l00054"></a>00054
<a name="l00055"></a>00055 <span class="comment">/* ------------------------------- PUBLIC MACROS ---------------------------- */</span>
<a name="l00056"></a>00056
<a name="l00057"></a><a class="code" href="utils_8h.html#ea69486910da420cbfe816d80ecc8b0c">00057</a> <span class="preprocessor">#define M_MAX_PDB_NAME_LEN 200 </span><span class="comment">/**&lt; maximum pdb filename length*/</span>
<a name="l00058"></a>00058
<a name="l00059"></a><a class="code" href="utils_8h.html#843dafce4fa4abc697b0a7528ee2926b">00059</a> <span class="preprocessor">#define M_SIGN 1</span>
<a name="l00060"></a><a class="code" href="utils_8h.html#1d2d01db9e7d6bb5200d8cfd398217d6">00060</a> <span class="preprocessor"></span><span class="preprocessor">#define M_NO_SIGN 0</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span>
<a name="l00062"></a>00062
<a name="l00063"></a>00063 <span class="preprocessor">#ifdef MD_USE_GSL </span><span class="comment">/* GSL */</span>
<a name="l00064"></a>00064
<a name="l00065"></a>00065 <span class="preprocessor">#define M_GEN_MTWISTER gsl_rng_mt19937</span>
<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor">#define M_GEN_GFSR4 gsl_rng_gfsr4</span>
<a name="l00067"></a>00067 <span class="preprocessor"></span><span class="preprocessor">#define M_GEN_TAUS gsl_rng_taus2</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span><span class="preprocessor">#define M_GEN_RANLXS0 gsl_rng_ranlxs0</span>
<a name="l00069"></a>00069 <span class="preprocessor"></span><span class="preprocessor">#define M_GEN_RANLXS1 gsl_rng_ranlxs1</span>
<a name="l00070"></a>00070 <span class="preprocessor"></span>
<a name="l00071"></a>00071 <span class="preprocessor">#endif </span><span class="comment">/* /GSL */</span>
<a name="l00072"></a>00072
<a name="l00073"></a>00073 <span class="comment">/* ------------------------------ PUBLIC STRUCTURES ------------------------- */</span>
<a name="l00074"></a>00074
<a name="l00075"></a><a class="code" href="structtab__str.html">00075</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structtab__str.html">tab_str</a>
<a name="l00076"></a>00076 {
<a name="l00077"></a><a class="code" href="structtab__str.html#f7451ee8b95f66bdd78caefbfe55c8fb">00077</a> <span class="keywordtype">char</span> **<a class="code" href="structtab__str.html#f7451ee8b95f66bdd78caefbfe55c8fb">t_str</a> ;
<a name="l00078"></a><a class="code" href="structtab__str.html#f2a3e45d6bbc0fc8d45ad2009956f519">00078</a> <span class="keywordtype">int</span> <a class="code" href="structtab__str.html#f2a3e45d6bbc0fc8d45ad2009956f519">nb_str</a> ;
<a name="l00079"></a>00079
<a name="l00080"></a>00080 } <a class="code" href="structtab__str.html">tab_str</a> ;
<a name="l00081"></a>00081
<a name="l00082"></a>00082
<a name="l00083"></a>00083 <span class="comment">/* ------------------------------- PROTOTYPES ------------------------------- */</span>
<a name="l00084"></a>00084
<a name="l00085"></a>00085 <span class="keywordtype">int</span> <a class="code" href="utils_8c.html#bb731c23a19ad89ea0a69951672a1952">str_is_number</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *str, <span class="keyword">const</span> <span class="keywordtype">int</span> sign) ;
<a name="l00086"></a>00086 <span class="keywordtype">int</span> <a class="code" href="utils_8c.html#b2155f59a3e9691956e8501985f5f362">str_is_float</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *str, <span class="keyword">const</span> <span class="keywordtype">int</span> sign) ;
<a name="l00087"></a>00087 <span class="keywordtype">void</span> <a class="code" href="utils_8c.html#ed930c5e93a75d90a96195282790d467">str_trim</a>(<span class="keywordtype">char</span> *str) ;
<a name="l00088"></a>00088 <a class="code" href="structtab__str.html">tab_str</a>* <a class="code" href="utils_8c.html#e0345cc28222d9e8d197f0be5704e5bb">str_split</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *str, <span class="keyword">const</span> <span class="keywordtype">int</span> sep) ;
<a name="l00089"></a>00089
<a name="l00090"></a>00090 <a class="code" href="structtab__str.html">tab_str</a>* <a class="code" href="utils_8c.html#3dc587bc98ec3bb4e3f4bd684aff84c6">f_readl</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *fpath, <span class="keywordtype">int</span> nchar_max) ;
<a name="l00091"></a>00091 <span class="keywordtype">void</span> <a class="code" href="utils_8c.html#45e96ff2830a0766313ae00bb068abfc">free_tab_str</a>(<a class="code" href="structtab__str.html">tab_str</a> *tstr) ;
<a name="l00092"></a>00092 <span class="keywordtype">void</span> <a class="code" href="utils_8c.html#674712dea54e3dcd4c95eb15ff31150d">print_tab_str</a>(<a class="code" href="structtab__str.html">tab_str</a>* strings) ;
<a name="l00093"></a>00093
<a name="l00094"></a>00094 <span class="keywordtype">int</span> <a class="code" href="utils_8c.html#c02faf0c5e3cf0b256a1ad1d37d9b8a2">in_tab</a>(<span class="keywordtype">int</span> *tab, <span class="keywordtype">int</span> size, <span class="keywordtype">int</span> val) ;
<a name="l00095"></a>00095 <span class="keywordtype">int</span> <a class="code" href="utils_8c.html#9abd45d3bc4001a047e9ea2866f306b4">index_of</a>(<span class="keywordtype">int</span> *tab, <span class="keywordtype">int</span> size, <span class="keywordtype">int</span> val) ;
<a name="l00096"></a>00096
<a name="l00097"></a>00097
<a name="l00098"></a>00098 <span class="keywordtype">void</span> <a class="code" href="utils_8c.html#1c104f406d4b5f85b6f0bda8db67536f">remove_ext</a>(<span class="keywordtype">char</span> *str) ;
<a name="l00099"></a>00099 <span class="keywordtype">void</span> <a class="code" href="utils_8c.html#9096591006dbde3b8c0bca29e6943c4d">remove_path</a>(<span class="keywordtype">char</span> *str) ;
<a name="l00100"></a>00100 <span class="keywordtype">void</span> <a class="code" href="utils_8c.html#8a339fa303fb0323a562ba25e2427252">extract_ext</a>(<span class="keywordtype">char</span> *str, <span class="keywordtype">char</span> *dest) ;
<a name="l00101"></a>00101 <span class="keywordtype">void</span> <a class="code" href="utils_8c.html#abf07eae560605f2838827add7913c56">extract_path</a>(<span class="keywordtype">char</span> *str, <span class="keywordtype">char</span> *dest) ;
<a name="l00102"></a>00102
<a name="l00103"></a>00103 <span class="keywordtype">void</span> <a class="code" href="utils_8c.html#4543c2bec43b95a9292a90b98dea4bb5">start_rand_generator</a>(<span class="keywordtype">void</span>) ;
<a name="l00104"></a>00104 <span class="keywordtype">float</span> <a class="code" href="utils_8c.html#5492196e16ed2d16bae1df8483ef79ed">rand_uniform</a>(<span class="keywordtype">float</span> min, <span class="keywordtype">float</span> max) ;
<a name="l00105"></a>00105
<a name="l00106"></a>00106 FILE* <a class="code" href="utils_8c.html#8ec5b0b9f097dc4fc2807ca47d242ac9">fopen_pdb_check_case</a>(<span class="keywordtype">char</span> *name, <span class="keyword">const</span> <span class="keywordtype">char</span> *mode) ;
<a name="l00107"></a>00107
<a name="l00108"></a>00108 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Jul 5 22:10:40 2009 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.9 </small></address>
</body>
</html>