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 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>FastSearch Class Reference</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 class="current"><a href="annotated.shtml"><span>Classes</span></a></li>
<li><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="annotated.shtml"><span>Class List</span></a></li>
<li><a href="classes.shtml"><span>Class Index</span></a></li>
<li><a href="hierarchy.shtml"><span>Class Hierarchy</span></a></li>
<li><a href="functions.shtml"><span>Class Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceOpenBabel.shtml">OpenBabel</a> </li>
<li class="navelem"><a class="el" href="classOpenBabel_1_1FastSearch.shtml">FastSearch</a> </li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">FastSearch Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="OpenBabel::FastSearch" -->
<p><code>#include <<a class="el" href="fingerprint_8h_source.shtml">openbabel/fingerprint.h</a>></code></p>
<p><a href="classOpenBabel_1_1FastSearch-members.shtml">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1FastSearch.shtml#a4f4f7dec3fe4bb72fc8c8da2594c5787">ReadIndexFile</a> (std::string IndexFilename)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1FastSearch.shtml#a5a306c0d134e330a1d33ae0a6cbc10a1">ReadIndex</a> (std::istream *pIndexstream)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1FastSearch.shtml#a2d2d75247574ce3d0f7bbc0d4283b3c2">~FastSearch</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1FastSearch.shtml#a575cc7caa2b2a42bec8b47e7c0206a80">Find</a> (<a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *pOb, std::vector< unsigned int > &SeekPositions, unsigned int MaxCandidates)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1FastSearch.shtml#a96dcab8b2694f95817af39be06f20d53">FindMatch</a> (<a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *pOb, std::vector< unsigned int > &SeekPositions, unsigned int MaxCandidates)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1FastSearch.shtml#aff36c0fb2899c7d30277788ddc536340">FindSimilar</a> (<a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *pOb, std::multimap< double, unsigned int > &SeekposMap, double MinTani, double MaxTani=1.1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1FastSearch.shtml#af660415f38248e3b885bb22dc7805558">FindSimilar</a> (<a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *pOb, std::multimap< double, unsigned int > &SeekposMap, int nCandidates=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOpenBabel_1_1OBFingerprint.shtml">OBFingerprint</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1FastSearch.shtml#a753d677380f29e219da02952b7ef7430">GetFingerprint</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structOpenBabel_1_1FptIndexHeader.shtml">FptIndexHeader</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1FastSearch.shtml#a6c00d74d4b0859279a48173737b1f8b1">GetIndexHeader</a> () const </td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Class to search fingerprint index files. </p>
<p>The <a class="el" href="classOpenBabel_1_1FastSearch.shtml" title="Class to search fingerprint index files.">FastSearch</a> class searches an index to a datafile containing a list of molecules (or other objects) prepared by <a class="el" href="classOpenBabel_1_1FastSearchIndexer.shtml" title="Class to prepare fingerprint index files See FastSearch class for details.">FastSearchIndexer</a>.</p>
<p><a class="el" href="namespaceOpenBabel.shtml" title="Global namespace for all Open Babel code.">OpenBabel</a> can also search files for molecules containing a substructure specified by a SMARTS string, using <a class="el" href="classOpenBabel_1_1OBSmartsPattern.shtml" title="SMARTS (SMiles ARbitrary Target Specification) substructure searching.">OBSmartsPattern</a> or from the command line: </p>
<div class="fragment"><pre class="fragment"> babel datafile.xxx -outfile.yyy -sSMARTS
</pre></div><p> But when the data file contains more than about 10,000 molecules this becomes rather too slow to be used interactively. To do it more quickly, an index of the molecules containing their fingerprints (see <a class="el" href="classOpenBabel_1_1OBFingerprint.shtml" title="The base class for fingerprints.">OBFingerprint</a>) is prepared using <a class="el" href="classOpenBabel_1_1FastSearchIndexer.shtml" title="Class to prepare fingerprint index files See FastSearch class for details.">FastSearchIndexer</a>. The indexing process may take a long time but only has to be done once. The index can be searched very quickly with <a class="el" href="classOpenBabel_1_1FastSearch.shtml" title="Class to search fingerprint index files.">FastSearch</a>. Because of the nature of fingerprints a match to a bit does not guarantee the presence of a particular substructure or other molecular property, so that a definitive answer may require a subsequent search of the (much reduced) list of candidates by another method (like <a class="el" href="classOpenBabel_1_1OBSmartsPattern.shtml" title="SMARTS (SMiles ARbitrary Target Specification) substructure searching.">OBSmartsPattern</a>).</p>
<p>Note that the index files are not portable. They need to be prepared on the computer that will access them.</p>
<h4>Using <a class="el" href="classOpenBabel_1_1FastSearch.shtml" title="Class to search fingerprint index files.">FastSearch</a> and <a class="el" href="classOpenBabel_1_1FastSearchIndexer.shtml" title="Class to prepare fingerprint index files See FastSearch class for details.">FastSearchIndexer</a> in a program</h4>
<p>The index has two tables:</p>
<ul>
<li>an array of fingerprints of the molecules</li>
<li>an array of the seek positions in the datasource file of all the molecules</li>
</ul>
<h4>To prepare an fastsearch index <a href="file:">file:</a></h4>
<ul>
<li>Open an ostream to the index file.</li>
<li>Make a <a class="el" href="classOpenBabel_1_1FastSearchIndexer.shtml" title="Class to prepare fingerprint index files See FastSearch class for details.">FastSearchIndexer</a> object on the heap or the stack, passing in as parameters:</li>
<li>the datafile name, the indexfile stream,</li>
<li>the id of the fingerprint type to be used,</li>
<li>the number of bits the fingerprint is to be folded down to, If it is to be left unfolded, set fpid to 0 or do not specify it.</li>
</ul>
<ul>
<li>For each molecule, call Add() with its pointer and its position in the datafile.<br/>
Currently the std::streampos value is implicitly cast to unsigned int so that for 32bit machines the datafile has to be no longer than about 2Gbyte.</li>
<li>The index file is written when the <a class="el" href="classOpenBabel_1_1FastSearchIndexer.shtml" title="Class to prepare fingerprint index files See FastSearch class for details.">FastSearchIndexer</a> object is deleted or goes out of scope.</li>
</ul>
<h4>To search in a fastsearch index file</h4>
<ul>
<li>Open a std::istream to the indexfile (in binary mode on some systems)</li>
<li>Make a <a class="el" href="classOpenBabel_1_1FastSearch.shtml" title="Class to search fingerprint index files.">FastSearch</a> object, read the index and open the datafile whose name it provides <div class="fragment"><pre class="fragment"> ifstream ifs(indexname,ios::binary);
FastSearch fs;
<span class="keywordtype">string</span> datafilename = fs.ReadIndex(&ifs);
<span class="keywordflow">if</span>(datafilename.empty()
<span class="keywordflow">return</span> <span class="keyword">false</span>;
ifstream datastream(datafilename);
<span class="keywordflow">if</span>(!datastream)
<span class="keywordflow">return</span> <span class="keyword">false</span>;
</pre></div></li>
</ul>
<p><b>To do a search for molecules which have all the substructure bits the <a class="el" href="classOpenBabel_1_1OBMol.shtml" title="Molecule Class.">OBMol</a> object, patternMol</b> </p>
<div class="fragment"><pre class="fragment"> vector<unsigned int>& SeekPositions;
<span class="keywordflow">if</span>(!fs.Find(patternMol, SeekPositions, MaxCandidates))
<span class="keywordflow">for</span>(itr=SeekPositions.begin();itr!=SeekPositions.end();++itr)
{
datastream.seekg(*itr);
... read the candidate molecule
and subject to more rigorous test <span class="keywordflow">if</span> necessary
}
</pre></div><p><b>To do a similarity search based on the Tanimoto coefficient</b> This is defined as: <br/>
<em>Number of bits set in (patternFP & targetFP)/Number of bits in (patternFP | targetFP)</em><br/>
where the boolean operations between the fingerprints are bitwise<br/>
The Tanimoto coefficient has no absolute meaning and depends on the design of the fingerprint. </p>
<div class="fragment"><pre class="fragment"> multimap<double, unsigned int> SeekposMap;
<span class="comment">// to find n best molecules</span>
fs.FindSimilar(&patternMol, SeekposMap, n);
...or
<span class="comment">// to find molecules with Tanimoto coefficient > MinTani</span>
fs.FindSimilar(&patternMol, SeekposMap, MinTani);
multimap<double, unsigned int>::reverse_iterator itr;
<span class="keywordflow">for</span>(itr=SeekposMap.rbegin();itr!=SeekposMap.rend();++itr)
{
datastream.seekg(itr->second);
<span class="comment">// ... read the candidate molecule</span>
<span class="keywordtype">double</span> tani = itr->first;
}
</pre></div><p>The FastSearchFormat class facilitates the use of these routine from the command line or other front end program. For instance:</p>
<p><b>Prepare an index:</b> </p>
<div class="fragment"><pre class="fragment"> babel datafile.xxx index.fs
</pre></div><p> or </p>
<div class="fragment"><pre class="fragment"> babel datafile.xxx -ofs namedindex
</pre></div><p> With options you can specify:</p>
<ul>
<li>which type of fingerprint to be used, e.g. -xfFP2,</li>
<li>whether it is folded to a specified number of bits, e.g. -xn128 (which should be a power of2)</li>
<li>whether to pre-select the molecules which are indexed:</li>
<li>by structure e.g only ethers and esters, -sCOC</li>
<li>by excluding molecules with bezene rings, -vc1ccccc1</li>
<li>by position in the datafile e.g. only mols 10 to 90, -f10 -l90</li>
</ul>
<p><b>Substructure search</b> in a previously prepared index file </p>
<div class="fragment"><pre class="fragment"> babel index.fs outfile.yyy -sSMILES
</pre></div><p> The datafile can also be used as the input file, provided the input format is specified as fs </p>
<div class="fragment"><pre class="fragment"> babel datafile.xxx outfile.yyy -sSMILES -ifs
</pre></div><p> A "slow" search not using fingerprints would be done on the same data by omitting -ifs. A "slow" search can use SMARTS strings, but the fast search is restricted to the subset which is valid SMILES.</p>
<p>With the -S option, the target can be specified as a molecule in a file of any format </p>
<div class="fragment"><pre class="fragment"> babel datafile.xxx outfile.yyy -Spattern_mol.zzz -ifs
</pre></div><p> These searches have two stages: a fingerprint search which produces a number of candidate molecules and a definitive search which selects from these using SMARTS pattern matching. The maximum number of candidates is 4000 by default but you can change this with an option e.g. -al 8000 (Note that you need the space between l and the number.) If the fingerprint search reaches the maximum number it will not look further and will tell you at what stage it stopped.</p>
<p><b>Similarity search</b> in a previously prepared index file<br/>
This rather done (rather than a substructure search) if the -at option is used, </p>
<div class="fragment"><pre class="fragment"> babel datafile.xxx outfile.yyy -sSMILES -ifs -at0.7
</pre></div><p> for instance</p>
<ul>
<li>-at0.7 will recover all molecules with Tanimoto greater than 0.7</li>
<li>-at15 (no decimal point) will recover the 15 molecules with largest coefficients.</li>
<li>-aa will add the Tanimoto coefficient to the titles of the output molecules.</li>
</ul>
<p>All stages, the indexing, the interpretation of the SMILES string in the -s option, the file in the -S option and the final SMARTS filter convert to <a class="el" href="classOpenBabel_1_1OBMol.shtml" title="Molecule Class.">OBMol</a> and apply ConvertDativeBonds(). This ensures thatforms such as[N+]([O-])=O and N(=O)=O are recognized as chemically identical. </p>
</div><hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="a2d2d75247574ce3d0f7bbc0d4283b3c2"></a><!-- doxytag: member="OpenBabel::FastSearch::~FastSearch" ref="a2d2d75247574ce3d0f7bbc0d4283b3c2" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual ~<a class="el" href="classOpenBabel_1_1FastSearch.shtml">FastSearch</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a4f4f7dec3fe4bb72fc8c8da2594c5787"></a><!-- doxytag: member="OpenBabel::FastSearch::ReadIndexFile" ref="a4f4f7dec3fe4bb72fc8c8da2594c5787" args="(std::string IndexFilename)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string ReadIndexFile </td>
<td>(</td>
<td class="paramtype">std::string </td>
<td class="paramname"><em>IndexFilename</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Loads an index from a file and returns the name of the datafile. </p>
</div>
</div>
<a class="anchor" id="a5a306c0d134e330a1d33ae0a6cbc10a1"></a><!-- doxytag: member="OpenBabel::FastSearch::ReadIndex" ref="a5a306c0d134e330a1d33ae0a6cbc10a1" args="(std::istream *pIndexstream)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string ReadIndex </td>
<td>(</td>
<td class="paramtype">std::istream * </td>
<td class="paramname"><em>pIndexstream</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="a575cc7caa2b2a42bec8b47e7c0206a80"></a><!-- doxytag: member="OpenBabel::FastSearch::Find" ref="a575cc7caa2b2a42bec8b47e7c0206a80" args="(OBBase *pOb, std::vector< unsigned int > &SeekPositions, unsigned int MaxCandidates)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Find </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> * </td>
<td class="paramname"><em>pOb</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::vector< unsigned int > & </td>
<td class="paramname"><em>SeekPositions</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>MaxCandidates</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Does substructure search and returns vector of the file positions of matches. </p>
<p>Finds chemical objects in datafilename (which must previously have been indexed) that have all the same bits set in their fingerprints as in the fingerprint of a pattern object. (Usually a substructure search in molecules.) The type of fingerprint and its degree of folding does not have to be specified here because the values in the index file are used. The positions of the candidate matching molecules in the original datafile are returned. </p>
</div>
</div>
<a class="anchor" id="a96dcab8b2694f95817af39be06f20d53"></a><!-- doxytag: member="OpenBabel::FastSearch::FindMatch" ref="a96dcab8b2694f95817af39be06f20d53" args="(OBBase *pOb, std::vector< unsigned int > &SeekPositions, unsigned int MaxCandidates)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool FindMatch </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> * </td>
<td class="paramname"><em>pOb</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::vector< unsigned int > & </td>
<td class="paramname"><em>SeekPositions</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>MaxCandidates</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Similar to <a class="el" href="classOpenBabel_1_1FastSearch.shtml#a575cc7caa2b2a42bec8b47e7c0206a80" title="Does substructure search and returns vector of the file positions of matches.">Find()</a> but all bits of matching fingerprints have to be the same. </p>
<dl class="since"><dt><b>Since:</b></dt><dd>version 2.1 </dd></dl>
</div>
</div>
<a class="anchor" id="aff36c0fb2899c7d30277788ddc536340"></a><!-- doxytag: member="OpenBabel::FastSearch::FindSimilar" ref="aff36c0fb2899c7d30277788ddc536340" args="(OBBase *pOb, std::multimap< double, unsigned int > &SeekposMap, double MinTani, double MaxTani=1.1)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool FindSimilar </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> * </td>
<td class="paramname"><em>pOb</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::multimap< double, unsigned int > & </td>
<td class="paramname"><em>SeekposMap</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>MinTani</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>MaxTani</em> = <code>1.1</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>A multimap containing objects whose Tanimoto coefficients with the target is greater than the value specified. </dd></dl>
</div>
</div>
<a class="anchor" id="af660415f38248e3b885bb22dc7805558"></a><!-- doxytag: member="OpenBabel::FastSearch::FindSimilar" ref="af660415f38248e3b885bb22dc7805558" args="(OBBase *pOb, std::multimap< double, unsigned int > &SeekposMap, int nCandidates=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool FindSimilar </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> * </td>
<td class="paramname"><em>pOb</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::multimap< double, unsigned int > & </td>
<td class="paramname"><em>SeekposMap</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>nCandidates</em> = <code>0</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>A multimap containing the nCandidates objects with largest Tanimoto coefficients with the target. </dd></dl>
<p>If nCandidates is zero or omitted the original size of the multimap is used </p>
</div>
</div>
<a class="anchor" id="a753d677380f29e219da02952b7ef7430"></a><!-- doxytag: member="OpenBabel::FastSearch::GetFingerprint" ref="a753d677380f29e219da02952b7ef7430" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classOpenBabel_1_1OBFingerprint.shtml">OBFingerprint</a>* GetFingerprint </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>a pointer to the fingerprint type used to constuct the index </dd></dl>
</div>
</div>
<a class="anchor" id="a6c00d74d4b0859279a48173737b1f8b1"></a><!-- doxytag: member="OpenBabel::FastSearch::GetIndexHeader" ref="a6c00d74d4b0859279a48173737b1f8b1" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="structOpenBabel_1_1FptIndexHeader.shtml">FptIndexHeader</a>& GetIndexHeader </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>a pointer to the index header containing size info etc. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="fingerprint_8h_source.shtml">fingerprint.h</a></li>
<li><a class="el" href="fingerprint_8cpp.shtml">fingerprint.cpp</a></li>
</ul>
</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:09 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>
|