1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>fingerprint.h Source File</title>
<link href="/site.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="search/search.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!--#include file="header.html" -->
<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.shtml"><span>Main Page</span></a></li>
<li><a href="pages.shtml"><span>Related Pages</span></a></li>
<li><a href="modules.shtml"><span>Modules</span></a></li>
<li><a href="namespaces.shtml"><span>Namespaces</span></a></li>
<li><a href="annotated.shtml"><span>Classes</span></a></li>
<li class="current"><a href="files.shtml"><span>Files</span></a></li>
<li><a href="examples.shtml"><span>Examples</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.shtml"><span>File List</span></a></li>
<li><a href="globals.shtml"><span>File Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">fingerprint.h</div> </div>
</div>
<div class="contents">
<a href="fingerprint_8h.shtml">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">fingerprint.h - Base class for fingerprints and fast searching</span>
<a name="l00003"></a>00003 <span class="comment"></span>
<a name="l00004"></a>00004 <span class="comment">Copyright (C) 2005 by Chris Morley</span>
<a name="l00005"></a>00005 <span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment">This file is part of the Open Babel project.</span>
<a name="l00007"></a>00007 <span class="comment">For more information, see <http://openbabel.org/></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 modify</span>
<a name="l00010"></a>00010 <span class="comment">it under the terms of the GNU General Public License as published by</span>
<a name="l00011"></a>00011 <span class="comment">the Free Software Foundation version 2 of the License.</span>
<a name="l00012"></a>00012 <span class="comment"></span>
<a name="l00013"></a>00013 <span class="comment">This program is distributed in the hope that it will be useful,</span>
<a name="l00014"></a>00014 <span class="comment">but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00015"></a>00015 <span class="comment">MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
<a name="l00016"></a>00016 <span class="comment">GNU General Public License for more details.</span>
<a name="l00017"></a>00017 <span class="comment">***********************************************************************/</span>
<a name="l00018"></a>00018
<a name="l00019"></a>00019 <span class="preprocessor">#ifndef OB_FINGERPRINT_H</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define OB_FINGERPRINT_H</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00022"></a>00022 <span class="preprocessor">#include <list></span>
<a name="l00023"></a>00023 <span class="preprocessor">#include <map></span>
<a name="l00024"></a>00024 <span class="preprocessor">#include <set></span>
<a name="l00025"></a>00025 <span class="preprocessor">#include <vector></span>
<a name="l00026"></a>00026 <span class="preprocessor">#include <string></span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#include <<a class="code" href="plugin_8h.shtml" title="Simplify 'plugin' classes to be discovered and/or loaded at runtime.">openbabel/plugin.h</a>></span>
<a name="l00029"></a>00029
<a name="l00030"></a>00030 <span class="preprocessor">#ifndef OBFPRT</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define OBFPRT</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span>
<a name="l00034"></a>00034 <span class="keyword">namespace </span>OpenBabel
<a name="l00035"></a>00035 {
<a name="l00036"></a>00036 <span class="keyword">class </span>OBBase; <span class="comment">//Forward declaration; used only as pointer.</span>
<a name="l00037"></a>00037
<a name="l00039"></a><a class="code" href="classOpenBabel_1_1OBFingerprint.shtml">00039</a> <span class="keyword">class </span>OBFPRT <a class="code" href="classOpenBabel_1_1OBFingerprint.shtml" title="The base class for fingerprints.">OBFingerprint</a> : <span class="keyword">public</span> <a class="code" href="classOpenBabel_1_1OBPlugin.shtml" title="Base class for all types of dynamic classes discovered at runtime.">OBPlugin</a>
<a name="l00040"></a>00040 {
<a name="l00041"></a>00041 <span class="comment">//see end of cpp file for detailed documentation</span>
<a name="l00042"></a>00042
<a name="l00043"></a>00043 <a class="code" href="group__plugins.shtml#gadd740e2a386b7db3e1f0e271cbe8a3f1">MAKE_PLUGIN</a>(<a class="code" href="classOpenBabel_1_1OBFingerprint.shtml" title="The base class for fingerprints.">OBFingerprint</a>)
<a name="l00044"></a>00044
<a name="l00045"></a>00045 <span class="keyword">const</span> <span class="keywordtype">char</span>* TypeID()
<a name="l00046"></a>00046 {
<a name="l00047"></a>00047 <span class="keywordflow">return</span> <span class="stringliteral">"fingerprints"</span>;
<a name="l00048"></a>00048 }
<a name="l00049"></a>00049
<a name="l00050"></a>00050 <span class="comment">//Rest of OBFingerprints declarations</span>
<a name="l00051"></a>00051 <span class="keyword">public</span>:
<a name="l00052"></a>00052
<a name="l00053"></a><a class="code" href="classOpenBabel_1_1OBFingerprint.shtml#a55f9725c7e338f4d4c2d9f7a7c34f0cb">00053</a> <span class="keyword">virtual</span> <a class="code" href="classOpenBabel_1_1OBFingerprint.shtml#a55f9725c7e338f4d4c2d9f7a7c34f0cb">~OBFingerprint</a>(){}
<a name="l00054"></a>00054
<a name="l00056"></a>00056 <span class="keywordtype">void</span> SetBit(std::vector<unsigned int>& vec, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> n);
<a name="l00057"></a>00057
<a name="l00059"></a>00059 <span class="keywordtype">bool</span> GetBit(<span class="keyword">const</span> std::vector<unsigned int>& vec, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> n);
<a name="l00060"></a>00060
<a name="l00062"></a>00062 <span class="keywordtype">void</span> Fold(std::vector<unsigned int>& vec, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nbits);
<a name="l00063"></a>00063
<a name="l00065"></a>00065 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> GetFingerprint(<a class="code" href="classOpenBabel_1_1OBBase.shtml" title="Base Class.">OBBase</a>* pOb, std::vector<unsigned int>& fp, <span class="keywordtype">int</span> nbits=0)=0;
<a name="l00066"></a>00066
<a name="l00068"></a><a class="code" href="classOpenBabel_1_1OBFingerprint.shtml#a48c2b72feb2607662249c83e85ce665b">00068</a> <span class="keyword">enum</span> <a class="code" href="classOpenBabel_1_1OBFingerprint.shtml#a48c2b72feb2607662249c83e85ce665b" title="Optional flags.">FptFlag</a>{FPT_UNIQUEBITS=1, FPT_NOINFO=2};
<a name="l00069"></a><a class="code" href="classOpenBabel_1_1OBFingerprint.shtml#a94a94537cc5ba96b1876db1b612b91a3">00069</a> <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classOpenBabel_1_1OBFingerprint.shtml#a94a94537cc5ba96b1876db1b612b91a3">Flags</a>() { <span class="keywordflow">return</span> 0;};
<a name="l00071"></a><a class="code" href="classOpenBabel_1_1OBFingerprint.shtml#a6948a255af347b37b32ba5c55d6368a4">00071</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOpenBabel_1_1OBFingerprint.shtml#a6948a255af347b37b32ba5c55d6368a4">SetFlags</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>){}
<a name="l00072"></a>00072
<a name="l00075"></a><a class="code" href="classOpenBabel_1_1OBFingerprint.shtml#a4ffe45da1e2dd403bf6b51364717d2a6">00075</a> <span class="keyword">virtual</span> std::string DescribeBits(<span class="keyword">const</span> std::vector<unsigned int> <span class="comment">/* fp */</span>,
<a name="l00076"></a>00076 <span class="keywordtype">bool</span> <span class="comment">/* bSet */</span> =<span class="keyword">true</span>)
<a name="l00077"></a>00077 {
<a name="l00078"></a>00078 std::string txt(<span class="stringliteral">""</span>);
<a name="l00079"></a>00079 <span class="keywordflow">return</span> txt;
<a name="l00080"></a>00080 }
<a name="l00081"></a>00081
<a name="l00083"></a>00083 <span class="keyword">static</span> <span class="keywordtype">double</span> <a class="code" href="namespaceOpenBabel.shtml#aeb3b137500bda8573ee1aa5757011a66" title="The Tanimoto coefficient, which may be regarded as the proportion of the "on-bits" which are shared...">Tanimoto</a>(<span class="keyword">const</span> std::vector<unsigned int>& vec1, <span class="keyword">const</span> std::vector<unsigned int>& vec2);
<a name="l00084"></a>00084
<a name="l00086"></a><a class="code" href="classOpenBabel_1_1OBFingerprint.shtml#ae6df021d906a48593e8f9ed11bd8d128">00086</a> <span class="keyword">static</span> <span class="keywordtype">double</span> <a class="code" href="namespaceOpenBabel.shtml#aeb3b137500bda8573ee1aa5757011a66" title="The Tanimoto coefficient, which may be regarded as the proportion of the "on-bits" which are shared...">Tanimoto</a>(<span class="keyword">const</span> std::vector<unsigned int>& vec1, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>* p2)
<a name="l00087"></a>00087 {
<a name="l00089"></a>00089 <span class="keywordtype">int</span> andbits=0, orbits=0;
<a name="l00090"></a>00090 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i;
<a name="l00091"></a>00091 <span class="keywordflow">for</span> (i=0;i<vec1.size();++i)
<a name="l00092"></a>00092 {
<a name="l00093"></a>00093 <span class="keywordtype">int</span> andfp = vec1[i] & p2[i];
<a name="l00094"></a>00094 <span class="keywordtype">int</span> orfp = vec1[i] | p2[i];
<a name="l00095"></a>00095 <span class="comment">// Count bits</span>
<a name="l00096"></a>00096 <span class="comment">/* GCC 3.4 supports a "population count" builtin, which on many targets is</span>
<a name="l00097"></a>00097 <span class="comment"> implemented with a single instruction. There is a fallback definition</span>
<a name="l00098"></a>00098 <span class="comment"> in libgcc in case a target does not have one, which should be just as</span>
<a name="l00099"></a>00099 <span class="comment"> good as the static function below. */</span>
<a name="l00100"></a>00100 <span class="preprocessor">#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)</span>
<a name="l00101"></a>00101 <span class="preprocessor"></span> andbits += __builtin_popcount(andfp);
<a name="l00102"></a>00102 orbits += __builtin_popcount(orfp);
<a name="l00103"></a>00103 <span class="preprocessor">#else</span>
<a name="l00104"></a>00104 <span class="preprocessor"></span> <span class="keywordflow">for</span>(;andfp;andfp=andfp<<1)
<a name="l00105"></a>00105 <span class="keywordflow">if</span>(andfp<0) ++andbits;
<a name="l00106"></a>00106 <span class="keywordflow">for</span>(;orfp;orfp=orfp<<1)
<a name="l00107"></a>00107 <span class="keywordflow">if</span>(orfp<0) ++orbits;
<a name="l00108"></a>00108 <span class="preprocessor">#endif</span>
<a name="l00109"></a>00109 <span class="preprocessor"></span> }
<a name="l00110"></a>00110 <span class="keywordflow">return</span>((<span class="keywordtype">double</span>)andbits/(<span class="keywordtype">double</span>)orbits);
<a name="l00111"></a>00111 };
<a name="l00112"></a>00112
<a name="l00113"></a><a class="code" href="classOpenBabel_1_1OBFingerprint.shtml#ad9ecfee3be06f4c37ef48506100f6f0c">00113</a> <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classOpenBabel_1_1OBFingerprint.shtml#ad9ecfee3be06f4c37ef48506100f6f0c">Getbitsperint</a>(){ <span class="keywordflow">return</span> bitsperint; }
<a name="l00114"></a>00114
<a name="l00115"></a>00115 <span class="keyword">private</span>:
<a name="l00117"></a>00117 <span class="keyword">struct </span>bit_or
<a name="l00118"></a>00118 {
<a name="l00119"></a>00119 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> operator()(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> a, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> b)
<a name="l00120"></a>00120 {
<a name="l00121"></a>00121 <span class="keywordflow">return</span> a | b;
<a name="l00122"></a>00122 }
<a name="l00123"></a>00123 };
<a name="l00124"></a>00124
<a name="l00125"></a>00125
<a name="l00126"></a>00126 <span class="keyword">public</span>:
<a name="l00129"></a><a class="code" href="classOpenBabel_1_1OBFingerprint.shtml#a3f95fb7efe843a55b087edd16fbe4012">00129</a> <span class="keyword">static</span> <a class="code" href="classOpenBabel_1_1OBFingerprint.shtml" title="The base class for fingerprints.">OBFingerprint</a>* <a class="code" href="classOpenBabel_1_1OBFingerprint.shtml#a3f95fb7efe843a55b087edd16fbe4012" title="For backward compatibility; a synonym of OBFingerprint::FindType.">FindFingerprint</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* ID){ <span class="keywordflow">return</span> FindType(ID);}
<a name="l00130"></a>00130
<a name="l00131"></a>00131 <span class="keyword">private</span>:
<a name="l00132"></a>00132 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bitsperint;<span class="comment">// = 8 * sizeof(unsigned int);</span>
<a name="l00133"></a>00133 };
<a name="l00134"></a>00134
<a name="l00135"></a>00135 <span class="comment">//Fast search routines</span>
<a name="l00138"></a><a class="code" href="structOpenBabel_1_1FptIndexHeader.shtml">00138</a> <span class="comment"></span><span class="keyword">struct </span>OBFPRT <a class="code" href="structOpenBabel_1_1FptIndexHeader.shtml" title="Header for fastsearch index file.">FptIndexHeader</a>
<a name="l00139"></a>00139 {
<a name="l00140"></a><a class="code" href="structOpenBabel_1_1FptIndexHeader.shtml#ace6a28b9a2f58cb13b09af8fb5c739ba">00140</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structOpenBabel_1_1FptIndexHeader.shtml#ace6a28b9a2f58cb13b09af8fb5c739ba" title="offset to data: sizeof(FptIndexHeader)">headerlength</a>;
<a name="l00141"></a><a class="code" href="structOpenBabel_1_1FptIndexHeader.shtml#ad186ad63c9d2b800747b680984bb37eb">00141</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structOpenBabel_1_1FptIndexHeader.shtml#ad186ad63c9d2b800747b680984bb37eb" title="number of fingerprints">nEntries</a>;
<a name="l00142"></a><a class="code" href="structOpenBabel_1_1FptIndexHeader.shtml#af562bd9c6faf08f0dab334b23d5788ee">00142</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structOpenBabel_1_1FptIndexHeader.shtml#af562bd9c6faf08f0dab334b23d5788ee" title="number 32bit words per fingerprint">words</a>;
<a name="l00143"></a><a class="code" href="structOpenBabel_1_1FptIndexHeader.shtml#afa1b09f7991580662a10548fd55700ee">00143</a> <span class="keywordtype">char</span> fpid[16];
<a name="l00144"></a><a class="code" href="structOpenBabel_1_1FptIndexHeader.shtml#a5c36621530d43d4607e35153277a1058">00144</a> <span class="keywordtype">char</span> datafilename[256];
<a name="l00145"></a>00145 };
<a name="l00146"></a>00146
<a name="l00149"></a><a class="code" href="structOpenBabel_1_1FptIndex.shtml">00149</a> <span class="keyword">struct </span>OBFPRT <a class="code" href="structOpenBabel_1_1FptIndex.shtml" title="Structure of fastsearch index files.">FptIndex</a>
<a name="l00150"></a>00150 {
<a name="l00151"></a><a class="code" href="structOpenBabel_1_1FptIndex.shtml#a6d5979c64e7513c829f24e421d253ae5">00151</a> <a class="code" href="structOpenBabel_1_1FptIndexHeader.shtml" title="Header for fastsearch index file.">FptIndexHeader</a> <a class="code" href="structOpenBabel_1_1FptIndex.shtml#a6d5979c64e7513c829f24e421d253ae5">header</a>;
<a name="l00152"></a><a class="code" href="structOpenBabel_1_1FptIndex.shtml#a1d071a268033064b8771f42e57e20a0d">00152</a> std::vector<unsigned int> <a class="code" href="structOpenBabel_1_1FptIndex.shtml#a1d071a268033064b8771f42e57e20a0d">fptdata</a>;
<a name="l00153"></a><a class="code" href="structOpenBabel_1_1FptIndex.shtml#a744eaebf662c3b17f14de1cf9d628278">00153</a> std::vector<unsigned int> <a class="code" href="structOpenBabel_1_1FptIndex.shtml#a744eaebf662c3b17f14de1cf9d628278">seekdata</a>;
<a name="l00154"></a>00154 <span class="keywordtype">bool</span> Read(std::istream* pIndexstream);
<a name="l00155"></a>00155 <span class="keywordtype">bool</span> ReadIndex(std::istream* pIndexstream);
<a name="l00156"></a>00156 <span class="keywordtype">bool</span> ReadHeader(std::istream* pIndexstream);
<a name="l00157"></a>00157
<a name="l00159"></a>00159 <a class="code" href="classOpenBabel_1_1OBFingerprint.shtml" title="The base class for fingerprints.">OBFingerprint</a>* CheckFP();
<a name="l00160"></a>00160 };
<a name="l00161"></a>00161
<a name="l00164"></a><a class="code" href="classOpenBabel_1_1FastSearch.shtml">00164</a> <span class="keyword">class </span>OBFPRT <a class="code" href="classOpenBabel_1_1FastSearch.shtml" title="Class to search fingerprint index files.">FastSearch</a>
<a name="l00165"></a>00165 {
<a name="l00166"></a>00166 <span class="comment">//see end of cpp file for detailed documentation</span>
<a name="l00167"></a>00167 <span class="keyword">public</span>:
<a name="l00169"></a>00169 std::string ReadIndexFile(std::string IndexFilename);
<a name="l00170"></a>00170 std::string ReadIndex(std::istream* pIndexstream);
<a name="l00171"></a>00171
<a name="l00172"></a><a class="code" href="classOpenBabel_1_1FastSearch.shtml#a2d2d75247574ce3d0f7bbc0d4283b3c2">00172</a> <span class="keyword">virtual</span> <a class="code" href="classOpenBabel_1_1FastSearch.shtml#a2d2d75247574ce3d0f7bbc0d4283b3c2">~FastSearch</a>(){};
<a name="l00173"></a>00173
<a name="l00175"></a>00175 <span class="keywordtype">bool</span> Find(<a class="code" href="classOpenBabel_1_1OBBase.shtml" title="Base Class.">OBBase</a>* pOb, std::vector<unsigned int>& SeekPositions, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> MaxCandidates);
<a name="l00176"></a>00176
<a name="l00179"></a>00179 <span class="keywordtype">bool</span> FindMatch(<a class="code" href="classOpenBabel_1_1OBBase.shtml" title="Base Class.">OBBase</a>* pOb, std::vector<unsigned int>& SeekPositions,
<a name="l00180"></a>00180 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> MaxCandidates);
<a name="l00181"></a>00181
<a name="l00184"></a>00184 <span class="keywordtype">bool</span> FindSimilar(<a class="code" href="classOpenBabel_1_1OBBase.shtml" title="Base Class.">OBBase</a>* pOb, std::multimap<double, unsigned int>& SeekposMap,
<a name="l00185"></a>00185 <span class="keywordtype">double</span> MinTani, <span class="keywordtype">double</span> MaxTani = 1.1 );
<a name="l00186"></a>00186
<a name="l00189"></a>00189 <span class="keywordtype">bool</span> FindSimilar(<a class="code" href="classOpenBabel_1_1OBBase.shtml" title="Base Class.">OBBase</a>* pOb, std::multimap<double, unsigned int>& SeekposMap,
<a name="l00190"></a>00190 <span class="keywordtype">int</span> nCandidates=0);
<a name="l00191"></a>00191
<a name="l00193"></a><a class="code" href="classOpenBabel_1_1FastSearch.shtml#a753d677380f29e219da02952b7ef7430">00193</a> <a class="code" href="classOpenBabel_1_1OBFingerprint.shtml" title="The base class for fingerprints.">OBFingerprint</a>* <a class="code" href="classOpenBabel_1_1FastSearch.shtml#a753d677380f29e219da02952b7ef7430">GetFingerprint</a>()<span class="keyword"> const</span>{ <span class="keywordflow">return</span> _pFP;};
<a name="l00194"></a>00194
<a name="l00196"></a><a class="code" href="classOpenBabel_1_1FastSearch.shtml#a6c00d74d4b0859279a48173737b1f8b1">00196</a> <span class="keyword">const</span> <a class="code" href="structOpenBabel_1_1FptIndexHeader.shtml" title="Header for fastsearch index file.">FptIndexHeader</a>& <a class="code" href="classOpenBabel_1_1FastSearch.shtml#a6c00d74d4b0859279a48173737b1f8b1">GetIndexHeader</a>()<span class="keyword"> const</span>{ <span class="keywordflow">return</span> _index.header;};
<a name="l00197"></a>00197
<a name="l00198"></a>00198 <span class="keyword">private</span>:
<a name="l00199"></a>00199 <a class="code" href="structOpenBabel_1_1FptIndex.shtml" title="Structure of fastsearch index files.">FptIndex</a> _index;
<a name="l00200"></a>00200 <a class="code" href="classOpenBabel_1_1OBFingerprint.shtml" title="The base class for fingerprints.">OBFingerprint</a>* _pFP;
<a name="l00201"></a>00201 };
<a name="l00202"></a>00202
<a name="l00205"></a><a class="code" href="classOpenBabel_1_1FastSearchIndexer.shtml">00205</a> <span class="keyword">class </span>OBFPRT <a class="code" href="classOpenBabel_1_1FastSearchIndexer.shtml" title="Class to prepare fingerprint index files See FastSearch class for details.">FastSearchIndexer</a>
<a name="l00206"></a>00206 {
<a name="l00207"></a>00207 <span class="comment">//see end of cpp file for detailed documentation</span>
<a name="l00208"></a>00208 <span class="keyword">public</span>:
<a name="l00210"></a>00210 <a class="code" href="classOpenBabel_1_1FastSearchIndexer.shtml" title="Class to prepare fingerprint index files See FastSearch class for details.">FastSearchIndexer</a>(std::string& datafilename, std::ostream* os, std::string& fpid,
<a name="l00211"></a>00211 <span class="keywordtype">int</span> FptBits=0, <span class="keywordtype">int</span> nmols=0);
<a name="l00212"></a>00212
<a name="l00214"></a>00214 <a class="code" href="classOpenBabel_1_1FastSearchIndexer.shtml" title="Class to prepare fingerprint index files See FastSearch class for details.">FastSearchIndexer</a>(<a class="code" href="structOpenBabel_1_1FptIndex.shtml" title="Structure of fastsearch index files.">FptIndex</a>* pindex, std::ostream* os, <span class="keywordtype">int</span> nmols=0);
<a name="l00215"></a>00215
<a name="l00216"></a>00216 ~<a class="code" href="classOpenBabel_1_1FastSearchIndexer.shtml" title="Class to prepare fingerprint index files See FastSearch class for details.">FastSearchIndexer</a>();
<a name="l00217"></a>00217
<a name="l00219"></a>00219 <span class="keywordtype">bool</span> Add(<a class="code" href="classOpenBabel_1_1OBBase.shtml" title="Base Class.">OBBase</a>* pOb, std::streampos seekpos);
<a name="l00220"></a>00220
<a name="l00221"></a>00221 <span class="keyword">private</span>:
<a name="l00222"></a>00222 std::ostream* _indexstream;
<a name="l00223"></a>00223 <a class="code" href="structOpenBabel_1_1FptIndex.shtml" title="Structure of fastsearch index files.">FptIndex</a>* _pindex;
<a name="l00224"></a>00224 <a class="code" href="classOpenBabel_1_1OBFingerprint.shtml" title="The base class for fingerprints.">OBFingerprint</a>* _pFP;
<a name="l00225"></a>00225 <span class="keywordtype">int</span> _nbits;
<a name="l00226"></a>00226 };
<a name="l00227"></a>00227
<a name="l00228"></a>00228 } <span class="comment">//namespace OpenBabel</span>
<a name="l00229"></a>00229 <span class="preprocessor">#endif</span>
<a name="l00230"></a>00230 <span class="preprocessor"></span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- end content -->
<!--#include file="footer.html" -->
<div id="footer">
<hr size="1">
<img src="http://openbabel.org/babel256.png" width="136" height="127" alt="" style="float: left;" />
<p>This file is part of the documentation for <a href="http://openbabel.org/wiki/">Open Babel</a>, version 2.3.</p>
<div class="bottom">
Documentation copyright © 1998-2007, the <a href="http://openbabel.org/wiki/THANKS">Open Babel Developers</a>.<br>
Open Babel is hosted by: <a href="http://sourceforge.net">
<img src="http://sourceforge.net/sflogo.php?group_id=40728"
width="88" height="31" border="0" alt="SourceForge Logo"></a><br>
Generated on Thu Oct 13 2011 16:08:06 by <a href="http://www.doxygen.org/"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.7.5.1.
</div>
</body>
</html>
|