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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>parsmart.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">parsmart.h</div> </div>
</div>
<div class="contents">
<a href="parsmart_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">parsmart.h - Daylight SMARTS parser.</span>
<a name="l00003"></a>00003 <span class="comment"></span>
<a name="l00004"></a>00004 <span class="comment">Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc.</span>
<a name="l00005"></a>00005 <span class="comment">Some portions Copyright (C) 2001-2005 by Geoffrey R. Hutchison</span>
<a name="l00006"></a>00006 <span class="comment"></span>
<a name="l00007"></a>00007 <span class="comment">This file is part of the Open Babel project.</span>
<a name="l00008"></a>00008 <span class="comment">For more information, see <http://openbabel.org/></span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">This program is free software; you can redistribute it and/or modify</span>
<a name="l00011"></a>00011 <span class="comment">it under the terms of the GNU General Public License as published by</span>
<a name="l00012"></a>00012 <span class="comment">the Free Software Foundation version 2 of the License.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">This program is distributed in the hope that it will be useful,</span>
<a name="l00015"></a>00015 <span class="comment">but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00016"></a>00016 <span class="comment">MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
<a name="l00017"></a>00017 <span class="comment">GNU General Public License for more details.</span>
<a name="l00018"></a>00018 <span class="comment">***********************************************************************/</span>
<a name="l00019"></a>00019
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef OB_PARSMART_H</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define OB_PARSMART_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>
<a name="l00023"></a>00023 <span class="preprocessor">#include <string></span>
<a name="l00024"></a>00024 <span class="preprocessor">#include <vector></span>
<a name="l00025"></a>00025
<a name="l00026"></a>00026 <span class="preprocessor">#include <openbabel/babelconfig.h></span>
<a name="l00027"></a>00027 <span class="preprocessor">#include <<a class="code" href="mol_8h.shtml" title="Handle molecules. Declarations of OBMol, OBAtom, OBBond, OBResidue. (the main header for Open Babel)...">openbabel/mol.h</a>></span>
<a name="l00028"></a>00028
<a name="l00029"></a>00029 <span class="comment">/*==========================*/</span>
<a name="l00030"></a>00030 <span class="comment">/* SMARTS Data Structures */</span>
<a name="l00031"></a>00031 <span class="comment">/*==========================*/</span>
<a name="l00032"></a>00032
<a name="l00033"></a>00033 <span class="keyword">namespace </span>OpenBabel
<a name="l00034"></a>00034 {
<a name="l00035"></a>00035
<a name="l00036"></a>00036 <span class="comment">// mark this so that SWIG will not attempt to wrap for scripting languages</span>
<a name="l00037"></a>00037
<a name="l00038"></a>00038 <span class="preprocessor">#ifndef SWIG</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span>
<a name="l00042"></a><a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml">00042</a> <span class="keyword">typedef</span> <span class="keyword">union </span><a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml" title="An internal (SMARTS parser) atomic expression.">_AtomExpr</a> {
<a name="l00043"></a><a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#ac765329451135abec74c45e1897abf26">00043</a> <span class="keywordtype">int</span> <a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#ac765329451135abec74c45e1897abf26">type</a>;
<a name="l00044"></a>00044 <span class="keyword">struct</span>
<a name="l00045"></a>00045 {
<a name="l00046"></a>00046 <span class="keywordtype">int</span> <a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#ac765329451135abec74c45e1897abf26">type</a>;
<a name="l00047"></a><a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#a4a8f6c91eefb9c6bf448592aac44153d">00047</a> <span class="keywordtype">int</span> <a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#a4a8f6c91eefb9c6bf448592aac44153d">prop</a>;
<a name="l00048"></a><a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#ac4f474c82e82cbb89ca7c36dd52be0ed">00048</a> <span class="keywordtype">int</span> <a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#ac4f474c82e82cbb89ca7c36dd52be0ed">value</a>;
<a name="l00049"></a>00049 }
<a name="l00050"></a>00050 <a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#add9b1387523fd7ca8a99e43de1a6ebd9">leaf</a>;
<a name="l00051"></a>00051 <span class="keyword">struct</span>
<a name="l00052"></a>00052 {
<a name="l00053"></a>00053 <span class="keywordtype">int</span> <a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#ac765329451135abec74c45e1897abf26">type</a>;
<a name="l00054"></a><a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#af94d20e7c35dc6021db672bddc719e59">00054</a> <span class="keywordtype">void</span> *<a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#af94d20e7c35dc6021db672bddc719e59">recur</a>;
<a name="l00055"></a>00055 }
<a name="l00056"></a>00056 <a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#af94d20e7c35dc6021db672bddc719e59">recur</a>;
<a name="l00057"></a>00057 <span class="keyword">struct</span>
<a name="l00058"></a>00058 {
<a name="l00059"></a>00059 <span class="keywordtype">int</span> <a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#ac765329451135abec74c45e1897abf26">type</a>;
<a name="l00060"></a><a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#afbc749edb3aa435b2dfe658c401dd8dd">00060</a> <span class="keyword">union </span><a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml" title="An internal (SMARTS parser) atomic expression.">_AtomExpr</a> *<a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#afbc749edb3aa435b2dfe658c401dd8dd">arg</a>;
<a name="l00061"></a>00061 }
<a name="l00062"></a>00062 <a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#a59ea3d363e8bd7376d61752e3b8d302d">mon</a>;
<a name="l00063"></a>00063 <span class="keyword">struct</span>
<a name="l00064"></a>00064 {
<a name="l00065"></a>00065 <span class="keywordtype">int</span> <a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#ac765329451135abec74c45e1897abf26">type</a>;
<a name="l00066"></a><a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#ae14ee7287ec01247b373819da1466f2e">00066</a> <span class="keyword">union </span><a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml" title="An internal (SMARTS parser) atomic expression.">_AtomExpr</a> *<a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#ae14ee7287ec01247b373819da1466f2e">lft</a>;
<a name="l00067"></a><a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#a3ac29da5e05a062a121b17962c0962a4">00067</a> <span class="keyword">union </span><a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml" title="An internal (SMARTS parser) atomic expression.">_AtomExpr</a> *<a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#a3ac29da5e05a062a121b17962c0962a4">rgt</a>;
<a name="l00068"></a>00068 }
<a name="l00069"></a>00069 <a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml#a0265adfe793b0eec6c950ec832fa6a60">bin</a>;
<a name="l00070"></a>00070 } <a class="code" href="namespaceOpenBabel.shtml#a8df92ddf377e8839e49c4c1d4a617f1e">AtomExpr</a>;
<a name="l00071"></a>00071
<a name="l00072"></a><a class="code" href="parsmart_8h.shtml#a74d47383c9cfa0ef28949fb1986816a8">00072</a> <span class="preprocessor">#define BE_LEAF 0x01</span>
<a name="l00073"></a><a class="code" href="parsmart_8h.shtml#a34c569404f51ae189843754917ff9566">00073</a> <span class="preprocessor"></span><span class="preprocessor">#define BE_ANDHI 0x02</span>
<a name="l00074"></a><a class="code" href="parsmart_8h.shtml#ad9cf53fd85f0ff1adbeefa1ebf31e53a">00074</a> <span class="preprocessor"></span><span class="preprocessor">#define BE_ANDLO 0x03</span>
<a name="l00075"></a><a class="code" href="parsmart_8h.shtml#afebc5b82d4a4ed2e6f9a34760afd6c81">00075</a> <span class="preprocessor"></span><span class="preprocessor">#define BE_NOT 0x04</span>
<a name="l00076"></a><a class="code" href="parsmart_8h.shtml#a23a693dfa98162af1b47b7ec57cb29aa">00076</a> <span class="preprocessor"></span><span class="preprocessor">#define BE_OR 0x05</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span>
<a name="l00078"></a><a class="code" href="parsmart_8h.shtml#a924b5d1cddecc6da237d9938b34e4444">00078</a> <span class="preprocessor">#define BL_CONST 0x01</span>
<a name="l00079"></a><a class="code" href="parsmart_8h.shtml#acbec3a551709136d446fc96d3d75c854">00079</a> <span class="preprocessor"></span><span class="preprocessor">#define BL_TYPE 0x02</span>
<a name="l00080"></a>00080 <span class="preprocessor"></span>
<a name="l00081"></a><a class="code" href="parsmart_8h.shtml#a16da642308fcb7853a3c54bb15c8a810">00081</a> <span class="preprocessor">#define BT_SINGLE 0x01</span>
<a name="l00082"></a><a class="code" href="parsmart_8h.shtml#ae1a8803bbea5087269936304977a3692">00082</a> <span class="preprocessor"></span><span class="preprocessor">#define BT_DOUBLE 0x02</span>
<a name="l00083"></a><a class="code" href="parsmart_8h.shtml#ad51b9bc6e1cbf9b1bfa6d31b79ba88eb">00083</a> <span class="preprocessor"></span><span class="preprocessor">#define BT_TRIPLE 0x03</span>
<a name="l00084"></a><a class="code" href="parsmart_8h.shtml#a7f375920d8ccfb55e22b1f31215f39f9">00084</a> <span class="preprocessor"></span><span class="preprocessor">#define BT_AROM 0x04</span>
<a name="l00085"></a><a class="code" href="parsmart_8h.shtml#a0cbea531ed2900ee3c01d49b98458ff3">00085</a> <span class="preprocessor"></span><span class="preprocessor">#define BT_UP 0x05</span>
<a name="l00086"></a><a class="code" href="parsmart_8h.shtml#a8ab1dd7cd9fe847c7d4b99e32eef36ff">00086</a> <span class="preprocessor"></span><span class="preprocessor">#define BT_DOWN 0x06</span>
<a name="l00087"></a><a class="code" href="parsmart_8h.shtml#a3b969f6f2c329f48453407609915794e">00087</a> <span class="preprocessor"></span><span class="preprocessor">#define BT_UPUNSPEC 0x07</span>
<a name="l00088"></a><a class="code" href="parsmart_8h.shtml#a45cc69db42ded19b63bfa88279e57263">00088</a> <span class="preprocessor"></span><span class="preprocessor">#define BT_DOWNUNSPEC 0x08</span>
<a name="l00089"></a><a class="code" href="parsmart_8h.shtml#ada98bf03140e666c10ef0b43ffe16c98">00089</a> <span class="preprocessor"></span><span class="preprocessor">#define BT_RING 0x09</span>
<a name="l00090"></a><a class="code" href="parsmart_8h.shtml#a9b56409d42320567572c78afc3b352c7">00090</a> <span class="preprocessor"></span><span class="preprocessor">#define BT_QUAD 0x0A //quadruple bond $</span>
<a name="l00091"></a>00091 <span class="preprocessor"></span>
<a name="l00094"></a><a class="code" href="unionOpenBabel_1_1__BondExpr.shtml">00094</a> <span class="keyword">typedef</span> <span class="keyword">union </span><a class="code" href="unionOpenBabel_1_1__BondExpr.shtml" title="An internal (SMARTS parser) bond expression.">_BondExpr</a> {
<a name="l00095"></a><a class="code" href="unionOpenBabel_1_1__BondExpr.shtml#ac765329451135abec74c45e1897abf26">00095</a> <span class="keywordtype">int</span> <a class="code" href="unionOpenBabel_1_1__BondExpr.shtml#ac765329451135abec74c45e1897abf26">type</a>;
<a name="l00096"></a>00096 <span class="keyword">struct</span>
<a name="l00097"></a>00097 {
<a name="l00098"></a>00098 <span class="keywordtype">int</span> <a class="code" href="unionOpenBabel_1_1__BondExpr.shtml#ac765329451135abec74c45e1897abf26">type</a>;
<a name="l00099"></a><a class="code" href="unionOpenBabel_1_1__BondExpr.shtml#a4a8f6c91eefb9c6bf448592aac44153d">00099</a> <span class="keywordtype">int</span> <a class="code" href="unionOpenBabel_1_1__BondExpr.shtml#a4a8f6c91eefb9c6bf448592aac44153d">prop</a>;
<a name="l00100"></a><a class="code" href="unionOpenBabel_1_1__BondExpr.shtml#ac4f474c82e82cbb89ca7c36dd52be0ed">00100</a> <span class="keywordtype">int</span> <a class="code" href="unionOpenBabel_1_1__BondExpr.shtml#ac4f474c82e82cbb89ca7c36dd52be0ed">value</a>;
<a name="l00101"></a>00101 }
<a name="l00102"></a>00102 <a class="code" href="unionOpenBabel_1_1__BondExpr.shtml#a4a0d624c9057273e648793dddb94373e">leaf</a>;
<a name="l00103"></a>00103 <span class="keyword">struct</span>
<a name="l00104"></a>00104 {
<a name="l00105"></a>00105 <span class="keywordtype">int</span> <a class="code" href="unionOpenBabel_1_1__BondExpr.shtml#ac765329451135abec74c45e1897abf26">type</a>;
<a name="l00106"></a><a class="code" href="unionOpenBabel_1_1__BondExpr.shtml#ae83b8626d4f03cc85eb9cd454d01dfeb">00106</a> <span class="keyword">union </span><a class="code" href="unionOpenBabel_1_1__BondExpr.shtml" title="An internal (SMARTS parser) bond expression.">_BondExpr</a> *<a class="code" href="unionOpenBabel_1_1__BondExpr.shtml#ae83b8626d4f03cc85eb9cd454d01dfeb">arg</a>;
<a name="l00107"></a>00107 }
<a name="l00108"></a>00108 <a class="code" href="unionOpenBabel_1_1__BondExpr.shtml#a6357983f075e558206585d863e6cc3cf">mon</a>;
<a name="l00109"></a>00109 <span class="keyword">struct</span>
<a name="l00110"></a>00110 {
<a name="l00111"></a>00111 <span class="keywordtype">int</span> <a class="code" href="unionOpenBabel_1_1__BondExpr.shtml#ac765329451135abec74c45e1897abf26">type</a>;
<a name="l00112"></a><a class="code" href="unionOpenBabel_1_1__BondExpr.shtml#acc869ddf951fb816bc6971baf892a666">00112</a> <span class="keyword">union </span><a class="code" href="unionOpenBabel_1_1__BondExpr.shtml" title="An internal (SMARTS parser) bond expression.">_BondExpr</a> *<a class="code" href="unionOpenBabel_1_1__BondExpr.shtml#acc869ddf951fb816bc6971baf892a666">lft</a>;
<a name="l00113"></a><a class="code" href="unionOpenBabel_1_1__BondExpr.shtml#a92d143f4a18107be5ba1889660041341">00113</a> <span class="keyword">union </span><a class="code" href="unionOpenBabel_1_1__BondExpr.shtml" title="An internal (SMARTS parser) bond expression.">_BondExpr</a> *<a class="code" href="unionOpenBabel_1_1__BondExpr.shtml#a92d143f4a18107be5ba1889660041341">rgt</a>;
<a name="l00114"></a>00114 }
<a name="l00115"></a>00115 <a class="code" href="unionOpenBabel_1_1__BondExpr.shtml#a43e8776e29b2251326c76a5f42193eeb">bin</a>;
<a name="l00116"></a>00116 } <a class="code" href="namespaceOpenBabel.shtml#ac7bd9a9f7066eb36f2cfa568d180cb80">BondExpr</a>;
<a name="l00117"></a>00117
<a name="l00120"></a><a class="code" href="structOpenBabel_1_1BondSpec.shtml">00120</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00121"></a>00121 {
<a name="l00122"></a><a class="code" href="structOpenBabel_1_1BondSpec.shtml#a88bcbd740c73c2bdcce39f48af6405b6">00122</a> <a class="code" href="unionOpenBabel_1_1__BondExpr.shtml" title="An internal (SMARTS parser) bond expression.">BondExpr</a> *<a class="code" href="structOpenBabel_1_1BondSpec.shtml#a88bcbd740c73c2bdcce39f48af6405b6">expr</a>;
<a name="l00123"></a><a class="code" href="structOpenBabel_1_1BondSpec.shtml#aaa998788ffdfc338ed9bc652ca3d2534">00123</a> <span class="keywordtype">int</span> <a class="code" href="structOpenBabel_1_1BondSpec.shtml#aaa998788ffdfc338ed9bc652ca3d2534">src</a>,dst;
<a name="l00124"></a><a class="code" href="structOpenBabel_1_1BondSpec.shtml#a8ef53b5e857e12c63baf40bbf78595c5">00124</a> <span class="keywordtype">int</span> <a class="code" href="structOpenBabel_1_1BondSpec.shtml#a8ef53b5e857e12c63baf40bbf78595c5">visit</a>;
<a name="l00125"></a><a class="code" href="structOpenBabel_1_1BondSpec.shtml#a4406f5d19bad5748e3eb1c5e4a1cddb4">00125</a> <span class="keywordtype">bool</span> <a class="code" href="structOpenBabel_1_1BondSpec.shtml#a4406f5d19bad5748e3eb1c5e4a1cddb4">grow</a>;
<a name="l00126"></a>00126 }
<a name="l00127"></a>00127 <a class="code" href="structOpenBabel_1_1BondSpec.shtml" title="An internal (SMARTS parser) bond specification.">BondSpec</a>;
<a name="l00128"></a>00128
<a name="l00131"></a><a class="code" href="structOpenBabel_1_1AtomSpec.shtml">00131</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00132"></a>00132 {
<a name="l00133"></a><a class="code" href="structOpenBabel_1_1AtomSpec.shtml#a1269526f9f29728992306e8e649b3540">00133</a> <a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml" title="An internal (SMARTS parser) atomic expression.">AtomExpr</a> *<a class="code" href="structOpenBabel_1_1AtomSpec.shtml#a1269526f9f29728992306e8e649b3540">expr</a>;
<a name="l00134"></a><a class="code" href="structOpenBabel_1_1AtomSpec.shtml#a8ef53b5e857e12c63baf40bbf78595c5">00134</a> <span class="keywordtype">int</span> <a class="code" href="structOpenBabel_1_1AtomSpec.shtml#a8ef53b5e857e12c63baf40bbf78595c5">visit</a>;
<a name="l00135"></a><a class="code" href="structOpenBabel_1_1AtomSpec.shtml#a54e2f07c0624c79d98700aff96030e81">00135</a> <span class="keywordtype">int</span> <a class="code" href="structOpenBabel_1_1AtomSpec.shtml#a54e2f07c0624c79d98700aff96030e81">part</a>;
<a name="l00136"></a><a class="code" href="structOpenBabel_1_1AtomSpec.shtml#ac33192e42f79427d5d5dd48f3ae51327">00136</a> <span class="keywordtype">int</span> <a class="code" href="structOpenBabel_1_1AtomSpec.shtml#ac33192e42f79427d5d5dd48f3ae51327">chiral_flag</a>;
<a name="l00137"></a><a class="code" href="structOpenBabel_1_1AtomSpec.shtml#a8354c3fd354f51bceee89a4772d3d520">00137</a> <span class="keywordtype">int</span> <a class="code" href="structOpenBabel_1_1AtomSpec.shtml#a8354c3fd354f51bceee89a4772d3d520">vb</a>;
<a name="l00138"></a>00138 }
<a name="l00139"></a>00139 <a class="code" href="structOpenBabel_1_1AtomSpec.shtml" title="An internal (SMARTS parser) atom specification.">AtomSpec</a>;
<a name="l00140"></a>00140
<a name="l00143"></a><a class="code" href="structOpenBabel_1_1Pattern.shtml">00143</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00144"></a>00144 {
<a name="l00145"></a><a class="code" href="structOpenBabel_1_1Pattern.shtml#a960ddd1f182adce68ce96b532be2119e">00145</a> <span class="keywordtype">int</span> aalloc,<a class="code" href="structOpenBabel_1_1Pattern.shtml#a960ddd1f182adce68ce96b532be2119e">acount</a>;
<a name="l00146"></a><a class="code" href="structOpenBabel_1_1Pattern.shtml#a1279b4e5cdc209e79aeac8393187d8fb">00146</a> <span class="keywordtype">int</span> balloc,<a class="code" href="structOpenBabel_1_1Pattern.shtml#a1279b4e5cdc209e79aeac8393187d8fb">bcount</a>;
<a name="l00147"></a><a class="code" href="structOpenBabel_1_1Pattern.shtml#a489239383a443901c5ddf88d1965c43f">00147</a> <span class="keywordtype">bool</span> <a class="code" href="structOpenBabel_1_1Pattern.shtml#a489239383a443901c5ddf88d1965c43f">ischiral</a>;
<a name="l00148"></a><a class="code" href="structOpenBabel_1_1Pattern.shtml#acc47701840e9e597e8743f9d2f7f9666">00148</a> <a class="code" href="structOpenBabel_1_1AtomSpec.shtml" title="An internal (SMARTS parser) atom specification.">AtomSpec</a> *<a class="code" href="structOpenBabel_1_1Pattern.shtml#acc47701840e9e597e8743f9d2f7f9666">atom</a>;
<a name="l00149"></a><a class="code" href="structOpenBabel_1_1Pattern.shtml#a180e82138b439cdbc63565ce0c63f0e7">00149</a> <a class="code" href="structOpenBabel_1_1BondSpec.shtml" title="An internal (SMARTS parser) bond specification.">BondSpec</a> *<a class="code" href="structOpenBabel_1_1Pattern.shtml#a180e82138b439cdbc63565ce0c63f0e7">bond</a>;
<a name="l00150"></a><a class="code" href="structOpenBabel_1_1Pattern.shtml#a4b389e40c7e1fda0f658c3e5af589a66">00150</a> <span class="keywordtype">int</span> <a class="code" href="structOpenBabel_1_1Pattern.shtml#a4b389e40c7e1fda0f658c3e5af589a66">parts</a>;
<a name="l00151"></a><a class="code" href="structOpenBabel_1_1Pattern.shtml#ab4578762eca2fb48d53d796b02d30f3b">00151</a> <span class="keywordtype">bool</span> <a class="code" href="structOpenBabel_1_1Pattern.shtml#ab4578762eca2fb48d53d796b02d30f3b">hasExplicitH</a>;
<a name="l00152"></a><a class="code" href="structOpenBabel_1_1Pattern.shtml#a7f6c4112de673fbbd1dcdbac6db888cb">00152</a> std::vector<int> <a class="code" href="structOpenBabel_1_1Pattern.shtml#a7f6c4112de673fbbd1dcdbac6db888cb">bond_parse_order</a>; <span class="comment">// Used to recover the order in which bonds were parsed</span>
<a name="l00153"></a>00153 }
<a name="l00154"></a>00154 <a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a>;
<a name="l00155"></a>00155
<a name="l00158"></a><a class="code" href="structOpenBabel_1_1ParseState.shtml">00158</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00159"></a>00159 {
<a name="l00160"></a><a class="code" href="structOpenBabel_1_1ParseState.shtml#ace96fe929ba644e4fb2810678d8eef05">00160</a> <a class="code" href="unionOpenBabel_1_1__BondExpr.shtml" title="An internal (SMARTS parser) bond expression.">BondExpr</a> *closord[100];
<a name="l00161"></a><a class="code" href="structOpenBabel_1_1ParseState.shtml#ad37c2265134e72b14d91f6195997a472">00161</a> <span class="keywordtype">int</span> closure[100];
<a name="l00162"></a><a class="code" href="structOpenBabel_1_1ParseState.shtml#a9a402df040c755233a98f8903883cc9c">00162</a> <span class="keywordtype">int</span> <a class="code" href="structOpenBabel_1_1ParseState.shtml#a9a402df040c755233a98f8903883cc9c">closindex</a>;
<a name="l00163"></a>00163 } <a class="code" href="structOpenBabel_1_1ParseState.shtml" title="A SMARTS parser internal state.">ParseState</a>;
<a name="l00164"></a>00164
<a name="l00165"></a>00165 <span class="preprocessor">#else</span>
<a name="l00166"></a>00166 <span class="preprocessor"></span> <span class="comment">// for SWIG, just forward declare that we have some Pattern struct</span>
<a name="l00167"></a>00167 <span class="comment">// (but this is private and not wrapped for scripting languages)</span>
<a name="l00168"></a>00168 <span class="keyword">struct </span><a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a>;
<a name="l00169"></a>00169 <span class="preprocessor">#endif</span>
<a name="l00170"></a>00170 <span class="preprocessor"></span>
<a name="l00172"></a>00172 <span class="keyword">class </span>OBSmartsPrivate;
<a name="l00173"></a>00173
<a name="l00176"></a>00176
<a name="l00177"></a>00177 <span class="comment">// class introduction in parsmart.cpp</span>
<a name="l00179"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml">00179</a> <span class="comment"></span> <span class="keyword">class </span>OBAPI <a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml" title="SMARTS (SMiles ARbitrary Target Specification) substructure searching.">OBSmartsPattern</a>
<a name="l00180"></a>00180 {
<a name="l00181"></a>00181 <span class="keyword">protected</span>:
<a name="l00182"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a36fb3feb1132393275cf6164d3ccf2a9">00182</a> OBSmartsPrivate *<a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a36fb3feb1132393275cf6164d3ccf2a9" title="Internal data storage for future expansion.">_d</a>;
<a name="l00183"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a9aa91437a607c7d33353f38857add180">00183</a> std::vector<bool> <a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a9aa91437a607c7d33353f38857add180">_growbond</a>;
<a name="l00184"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#ab4d28e672d513c538ae9ff92e409bece">00184</a> std::vector<std::vector<int> > <a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#ab4d28e672d513c538ae9ff92e409bece" title="The list of matches.">_mlist</a>;
<a name="l00185"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#ad43f81cd2cc637e810b38c7686d9917d">00185</a> <a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a> *<a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#ad43f81cd2cc637e810b38c7686d9917d" title="The parsed SMARTS pattern.">_pat</a>;
<a name="l00186"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a433559ab344e4266e3d109bce29ee417">00186</a> std::string <a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a433559ab344e4266e3d109bce29ee417" title="The string of the SMARTS expression.">_str</a>;
<a name="l00187"></a>00187
<a name="l00188"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#af076ed3307ccc419f46ed857bb321a2f">00188</a> <span class="keywordtype">char</span> *<a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#af076ed3307ccc419f46ed857bb321a2f">_buffer</a>;
<a name="l00189"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a24f5f7e6d2d4aeccecabdbbf89719bc5">00189</a> <span class="keywordtype">char</span> *<a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a24f5f7e6d2d4aeccecabdbbf89719bc5">LexPtr</a>;
<a name="l00190"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a2860b525fbfe4f29b416c37f8b13f561">00190</a> <span class="keywordtype">char</span> *<a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a2860b525fbfe4f29b416c37f8b13f561">MainPtr</a>;
<a name="l00191"></a>00191
<a name="l00192"></a>00192 <a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a> *ParseSMARTSPattern( <span class="keywordtype">void</span> );
<a name="l00193"></a>00193 <a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a> *ParseSMARTSPart( <a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a>*, <span class="keywordtype">int</span> );
<a name="l00194"></a>00194 <a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a> *SMARTSError( <a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a> *pat );
<a name="l00195"></a>00195 <a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a> *ParseSMARTSError( <a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a> *pat, <a class="code" href="unionOpenBabel_1_1__BondExpr.shtml" title="An internal (SMARTS parser) bond expression.">BondExpr</a> *expr );
<a name="l00196"></a>00196 <a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml" title="An internal (SMARTS parser) atomic expression.">AtomExpr</a> *ParseSimpleAtomPrimitive( <span class="keywordtype">void</span> );
<a name="l00197"></a>00197 <a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml" title="An internal (SMARTS parser) atomic expression.">AtomExpr</a> *ParseComplexAtomPrimitive( <span class="keywordtype">void</span> );
<a name="l00198"></a>00198 <a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml" title="An internal (SMARTS parser) atomic expression.">AtomExpr</a> *ParseAtomExpr( <span class="keywordtype">int</span> level );
<a name="l00199"></a>00199 <a class="code" href="unionOpenBabel_1_1__BondExpr.shtml" title="An internal (SMARTS parser) bond expression.">BondExpr</a> *ParseBondPrimitive( <span class="keywordtype">void</span> );
<a name="l00200"></a>00200 <a class="code" href="unionOpenBabel_1_1__BondExpr.shtml" title="An internal (SMARTS parser) bond expression.">BondExpr</a> *ParseBondExpr( <span class="keywordtype">int</span> level );
<a name="l00201"></a>00201 <a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a> *ParseSMARTSString( <span class="keywordtype">char</span> *ptr );
<a name="l00202"></a>00202 <a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a> *ParseSMARTSRecord( <span class="keywordtype">char</span> *ptr );
<a name="l00203"></a>00203 <span class="keywordtype">int</span> <a class="code" href="namespaceOpenBabel.shtml#a7b5986b1238c63b45e7fb0fdfdfc4ed0">GetVectorBinding</a>();
<a name="l00204"></a>00204 <a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a> *SMARTSParser( <a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a> *pat, <a class="code" href="structOpenBabel_1_1ParseState.shtml" title="A SMARTS parser internal state.">ParseState</a> *stat,
<a name="l00205"></a>00205 <span class="keywordtype">int</span> prev, <span class="keywordtype">int</span> part );
<a name="l00206"></a>00206
<a name="l00207"></a>00207 <span class="keyword">public</span>:
<a name="l00208"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#aa930ba6620356e94683a1d5d4a4a25e3">00208</a> <a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#aa930ba6620356e94683a1d5d4a4a25e3">OBSmartsPattern</a>() : _pat(NULL), _buffer(NULL), LexPtr(NULL), MainPtr(NULL) { }
<a name="l00209"></a>00209 <span class="keyword">virtual</span> ~<a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml" title="SMARTS (SMiles ARbitrary Target Specification) substructure searching.">OBSmartsPattern</a>();
<a name="l00210"></a>00210
<a name="l00211"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#ada1c40a99620ab595049ba01934b7ca6">00211</a> <a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml" title="SMARTS (SMiles ARbitrary Target Specification) substructure searching.">OBSmartsPattern</a>(<span class="keyword">const</span> <a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml" title="SMARTS (SMiles ARbitrary Target Specification) substructure searching.">OBSmartsPattern</a>& cp): _pat(NULL), _buffer(NULL), LexPtr(NULL), MainPtr(NULL)
<a name="l00212"></a>00212 {
<a name="l00213"></a>00213 *<span class="keyword">this</span> = cp;
<a name="l00214"></a>00214 }
<a name="l00215"></a>00215
<a name="l00216"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a644ca84fee80513682392b90a2841ec6">00216</a> <a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml" title="SMARTS (SMiles ARbitrary Target Specification) substructure searching.">OBSmartsPattern</a>& operator=(<span class="keyword">const</span> <a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml" title="SMARTS (SMiles ARbitrary Target Specification) substructure searching.">OBSmartsPattern</a>& cp)
<a name="l00217"></a>00217 {
<a name="l00218"></a>00218 <span class="keywordflow">if</span> (<span class="keyword">this</span> == &cp)
<a name="l00219"></a>00219 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00220"></a>00220
<a name="l00221"></a>00221 <span class="keywordflow">if</span> (_pat)
<a name="l00222"></a>00222 <span class="keyword">delete</span>[] _pat;
<a name="l00223"></a>00223 <span class="keywordflow">if</span> (_buffer)
<a name="l00224"></a>00224 <span class="keyword">delete</span>[] _buffer;
<a name="l00225"></a>00225 _buffer = NULL;
<a name="l00226"></a>00226 _pat = NULL;
<a name="l00227"></a>00227 std::string s = cp.<a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a433559ab344e4266e3d109bce29ee417" title="The string of the SMARTS expression.">_str</a>;
<a name="l00228"></a>00228 Init(s);
<a name="l00229"></a>00229 <span class="keywordflow">return</span> (*<span class="keyword">this</span>);
<a name="l00230"></a>00230 }
<a name="l00231"></a>00231
<a name="l00232"></a>00232
<a name="l00234"></a>00234
<a name="l00235"></a>00235
<a name="l00236"></a>00236
<a name="l00237"></a>00237 <span class="keywordtype">bool</span> Init(<span class="keyword">const</span> <span class="keywordtype">char</span>* pattern);
<a name="l00240"></a>00240 <span class="keywordtype">bool</span> Init(<span class="keyword">const</span> std::string& pattern);
<a name="l00242"></a>00242
<a name="l00244"></a>00244
<a name="l00245"></a>00245
<a name="l00246"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a52d9a732c39944ff60d06aeacb96617c">00246</a> <span class="keyword">const</span> std::string &<a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a52d9a732c39944ff60d06aeacb96617c">GetSMARTS</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> _str; }
<a name="l00248"></a>00248 <span class="preprocessor">#ifndef SWIG </span>
<a name="l00249"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a1f769a4a64988a131b80fdda554eda1e">00249</a> <span class="preprocessor"></span> std::string &<a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a1f769a4a64988a131b80fdda554eda1e">GetSMARTS</a>() { <span class="keywordflow">return</span> _str; }
<a name="l00250"></a>00250 <span class="preprocessor">#endif</span>
<a name="l00251"></a>00251 <span class="preprocessor"></span>
<a name="l00252"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a6fcfd4a80bfd7dc324f815cd351bfbdf">00252</a> <span class="keywordtype">bool</span> <a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a6fcfd4a80bfd7dc324f815cd351bfbdf">Empty</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span>(_pat == NULL); }
<a name="l00254"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#afa8720abaf6972d6dac22a8cd1a67225">00254</a> <span class="keywordtype">bool</span> <a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#afa8720abaf6972d6dac22a8cd1a67225">IsValid</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span>(_pat != NULL); }
<a name="l00255"></a>00255
<a name="l00257"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a0c317a10161689c407f29a6fcacdb852">00257</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> NumAtoms()<span class="keyword"> const</span>
<a name="l00258"></a>00258 <span class="keyword"> </span>{
<a name="l00259"></a>00259 <span class="keywordflow">return</span> _pat ? _pat->acount : 0;
<a name="l00260"></a>00260 }
<a name="l00262"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a115132ab8bd21607d00d61bc1ba5cc16">00262</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> NumBonds()<span class="keyword"> const</span>
<a name="l00263"></a>00263 <span class="keyword"> </span>{
<a name="l00264"></a>00264 <span class="keywordflow">return</span> _pat ? _pat->bcount : 0;
<a name="l00265"></a>00265 }
<a name="l00266"></a>00266
<a name="l00272"></a>00272 <span class="keywordtype">void</span> GetBond(<span class="keywordtype">int</span>& src,<span class="keywordtype">int</span>& dst,<span class="keywordtype">int</span>& ord,<span class="keywordtype">int</span> idx);
<a name="l00274"></a>00274 <span class="keywordtype">int</span> GetAtomicNum(<span class="keywordtype">int</span> idx);
<a name="l00276"></a>00276 <span class="keywordtype">int</span> GetCharge(<span class="keywordtype">int</span> idx);
<a name="l00277"></a>00277
<a name="l00279"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#abb64da8f114045c4b41dec13919bed9f">00279</a> <span class="keywordtype">int</span> <a class="code" href="namespaceOpenBabel.shtml#a7b5986b1238c63b45e7fb0fdfdfc4ed0">GetVectorBinding</a>(<span class="keywordtype">int</span> idx)<span class="keyword"> const</span>
<a name="l00280"></a>00280 <span class="keyword"> </span>{
<a name="l00281"></a>00281 <span class="keywordflow">return</span>(_pat->atom[idx].vb);
<a name="l00282"></a>00282 }
<a name="l00284"></a>00284
<a name="l00285"></a>00285 <span class="comment">// number and kind of matches to return</span>
<a name="l00286"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a747637046be33d7273262104aad8069da68168ddfb80052045df470955d649258">00286</a> <span class="keyword">enum</span> <a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a747637046be33d7273262104aad8069d">MatchType</a> {All, <a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a747637046be33d7273262104aad8069da68168ddfb80052045df470955d649258">Single</a>, AllUnique};
<a name="l00287"></a>00287
<a name="l00289"></a>00289
<a name="l00290"></a>00290
<a name="l00291"></a>00291
<a name="l00292"></a>00292
<a name="l00293"></a>00293
<a name="l00294"></a>00294 <span class="keywordtype">bool</span> Match(<a class="code" href="classOpenBabel_1_1OBMol.shtml" title="Molecule Class.">OBMol</a> &mol, <span class="keywordtype">bool</span> single=<span class="keyword">false</span>);
<a name="l00295"></a>00295
<a name="l00297"></a>00297
<a name="l00298"></a>00298
<a name="l00299"></a>00299
<a name="l00300"></a>00300
<a name="l00301"></a>00301
<a name="l00302"></a>00302
<a name="l00303"></a>00303
<a name="l00304"></a>00304 <span class="keywordtype">bool</span> Match(<a class="code" href="classOpenBabel_1_1OBMol.shtml" title="Molecule Class.">OBMol</a> &mol, std::vector<std::vector<int> > & mlist, MatchType mtype = All) <span class="keyword">const</span>;
<a name="l00305"></a>00305
<a name="l00307"></a>00307
<a name="l00308"></a>00308
<a name="l00309"></a>00309
<a name="l00310"></a>00310
<a name="l00311"></a>00311 <span class="keywordtype">bool</span> HasMatch(<a class="code" href="classOpenBabel_1_1OBMol.shtml" title="Molecule Class.">OBMol</a> &mol) <span class="keyword">const</span>;
<a name="l00312"></a>00312
<a name="l00313"></a>00313 <span class="keywordtype">bool</span> RestrictedMatch(<a class="code" href="classOpenBabel_1_1OBMol.shtml" title="Molecule Class.">OBMol</a> &mol, std::vector<std::pair<int,int> > &pairs, <span class="keywordtype">bool</span> single=<span class="keyword">false</span>);
<a name="l00314"></a>00314
<a name="l00315"></a>00315 <span class="keywordtype">bool</span> RestrictedMatch(<a class="code" href="classOpenBabel_1_1OBMol.shtml" title="Molecule Class.">OBMol</a> &mol, <a class="code" href="classOpenBabel_1_1OBBitVec.shtml" title="A speed-optimized vector of bits.">OBBitVec</a> &bv, <span class="keywordtype">bool</span> single=<span class="keyword">false</span>);
<a name="l00318"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a299d4f22a95890bf259cb12b4664a0ea">00318</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> NumMatches()<span class="keyword"> const</span>
<a name="l00319"></a>00319 <span class="keyword"> </span>{
<a name="l00320"></a>00320 <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">></span>(_mlist.size());
<a name="l00321"></a>00321 }
<a name="l00322"></a>00322
<a name="l00325"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a5633f1fa229ec0ff8fd3991e09d791c2">00325</a> std::vector<std::vector<int> > &GetMapList()
<a name="l00326"></a>00326 {
<a name="l00327"></a>00327 <span class="keywordflow">return</span>(_mlist);
<a name="l00328"></a>00328 }
<a name="l00330"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a548b220ea8c00d0297e81ebc7b31c6d7">00330</a> std::vector<std::vector<int> >::iterator BeginMList()
<a name="l00331"></a>00331 {
<a name="l00332"></a>00332 <span class="keywordflow">return</span>(_mlist.begin());
<a name="l00333"></a>00333 }
<a name="l00335"></a><a class="code" href="classOpenBabel_1_1OBSmartsPattern.shtml#a7db4777fec63048db41fb890ac0a22ac">00335</a> std::vector<std::vector<int> >::iterator EndMList()
<a name="l00336"></a>00336 {
<a name="l00337"></a>00337 <span class="keywordflow">return</span>(_mlist.end());
<a name="l00338"></a>00338 }
<a name="l00339"></a>00339
<a name="l00341"></a>00341
<a name="l00351"></a>00351 std::vector<std::vector<int> > &GetUMapList();
<a name="l00353"></a>00353
<a name="l00355"></a>00355 <span class="keywordtype">void</span> WriteMapList(std::ostream&);
<a name="l00356"></a>00356 };
<a name="l00357"></a>00357
<a name="l00359"></a>00359
<a name="l00363"></a><a class="code" href="classOpenBabel_1_1OBSmartsMatcher.shtml">00363</a> <span class="keyword">class </span>OBAPI <a class="code" href="classOpenBabel_1_1OBSmartsMatcher.shtml" title="Internal class: performs matching; a wrapper around previous C matching code to make it thread safe...">OBSmartsMatcher</a>
<a name="l00364"></a>00364 {
<a name="l00365"></a>00365 <span class="keyword">protected</span>:
<a name="l00366"></a>00366 <span class="comment">//recursive smarts cache</span>
<a name="l00367"></a><a class="code" href="classOpenBabel_1_1OBSmartsMatcher.shtml#a0941360bb72df02227939bd307707c25">00367</a> std::vector<std::pair<const Pattern*,std::vector<bool> > > <a class="code" href="classOpenBabel_1_1OBSmartsMatcher.shtml#a0941360bb72df02227939bd307707c25">RSCACHE</a>;
<a name="l00368"></a>00368 <span class="comment">// list of fragment patterns (e.g., (*).(*)</span>
<a name="l00369"></a><a class="code" href="classOpenBabel_1_1OBSmartsMatcher.shtml#a6dbd99a64fdb16a6ac0c48cb200449ad">00369</a> std::vector<const Pattern*> <a class="code" href="classOpenBabel_1_1OBSmartsMatcher.shtml#a6dbd99a64fdb16a6ac0c48cb200449ad">Fragments</a>;
<a name="l00370"></a>00370 <span class="comment">/*</span>
<a name="l00371"></a>00371 <span class="comment"> bool EvalAtomExpr(AtomExpr *expr,OBAtom *atom);</span>
<a name="l00372"></a>00372 <span class="comment"> bool EvalBondExpr(BondExpr *expr,OBBond *bond);</span>
<a name="l00373"></a>00373 <span class="comment"> int GetVectorBinding();</span>
<a name="l00374"></a>00374 <span class="comment"> int CreateAtom(Pattern*,AtomExpr*,int,int vb=0);</span>
<a name="l00375"></a>00375 <span class="comment"> */</span>
<a name="l00376"></a>00376 <span class="keywordtype">bool</span> EvalAtomExpr(<a class="code" href="unionOpenBabel_1_1__AtomExpr.shtml" title="An internal (SMARTS parser) atomic expression.">AtomExpr</a> *expr,<a class="code" href="classOpenBabel_1_1OBAtom.shtml" title="Atom class.">OBAtom</a> *atom);
<a name="l00377"></a>00377 <span class="keywordtype">bool</span> EvalBondExpr(<a class="code" href="unionOpenBabel_1_1__BondExpr.shtml" title="An internal (SMARTS parser) bond expression.">BondExpr</a> *expr,<a class="code" href="classOpenBabel_1_1OBBond.shtml" title="Bond class.">OBBond</a> *bond);
<a name="l00378"></a>00378 <span class="keywordtype">void</span> SetupAtomMatchTable(std::vector<std::vector<bool> > &<a class="code" href="namespaceOpenBabel.shtml#ab8d4d5690031703bcccb95ddbe7ebf0a">ttab</a>,
<a name="l00379"></a>00379 <span class="keyword">const</span> <a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a> *pat, <a class="code" href="classOpenBabel_1_1OBMol.shtml" title="Molecule Class.">OBMol</a> &mol);
<a name="l00380"></a>00380 <span class="keywordtype">void</span> FastSingleMatch(<a class="code" href="classOpenBabel_1_1OBMol.shtml" title="Molecule Class.">OBMol</a> &mol,<span class="keyword">const</span> <a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a> *pat,
<a name="l00381"></a>00381 std::vector<std::vector<int> > &mlist);
<a name="l00382"></a>00382
<a name="l00383"></a><a class="code" href="classOpenBabel_1_1OBSmartsMatcher.shtml#a129a7087cc88b19562f6840d91f2990f">00383</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOpenBabel_1_1OBSSMatch.shtml" title="Internal class: performs fast, exhaustive matching used to find just a single match in match() using ...">OBSSMatch</a>;
<a name="l00384"></a>00384 <span class="keyword">public</span>:
<a name="l00385"></a><a class="code" href="classOpenBabel_1_1OBSmartsMatcher.shtml#ab2a36f09ba1abd6cb748e74d433423ce">00385</a> <a class="code" href="classOpenBabel_1_1OBSmartsMatcher.shtml#ab2a36f09ba1abd6cb748e74d433423ce">OBSmartsMatcher</a>() {}
<a name="l00386"></a><a class="code" href="classOpenBabel_1_1OBSmartsMatcher.shtml#a464e4dc777a586ec969199dc4aaba764">00386</a> <span class="keyword">virtual</span> <a class="code" href="classOpenBabel_1_1OBSmartsMatcher.shtml#a464e4dc777a586ec969199dc4aaba764">~OBSmartsMatcher</a>() {}
<a name="l00387"></a>00387
<a name="l00388"></a>00388 <span class="keywordtype">bool</span> match(<a class="code" href="classOpenBabel_1_1OBMol.shtml" title="Molecule Class.">OBMol</a> &mol, <span class="keyword">const</span> <a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a> *pat,std::vector<std::vector<int> > &mlist,<span class="keywordtype">bool</span> single=<span class="keyword">false</span>);
<a name="l00389"></a>00389
<a name="l00390"></a>00390 };
<a name="l00391"></a>00391
<a name="l00395"></a><a class="code" href="classOpenBabel_1_1OBSSMatch.shtml">00395</a> <span class="keyword">class </span>OBAPI <a class="code" href="classOpenBabel_1_1OBSSMatch.shtml" title="Internal class: performs fast, exhaustive matching used to find just a single match in match() using ...">OBSSMatch</a>
<a name="l00396"></a>00396 {
<a name="l00397"></a>00397 <span class="keyword">protected</span>:
<a name="l00398"></a><a class="code" href="classOpenBabel_1_1OBSSMatch.shtml#ade85500cee2cdd5840c1637f558a8407">00398</a> <span class="keywordtype">bool</span> *<a class="code" href="classOpenBabel_1_1OBSSMatch.shtml#ade85500cee2cdd5840c1637f558a8407">_uatoms</a>;
<a name="l00399"></a><a class="code" href="classOpenBabel_1_1OBSSMatch.shtml#a49fc50c0d3567160b94f7a15aba18da0">00399</a> <a class="code" href="classOpenBabel_1_1OBMol.shtml" title="Molecule Class.">OBMol</a> *<a class="code" href="classOpenBabel_1_1OBSSMatch.shtml#a49fc50c0d3567160b94f7a15aba18da0">_mol</a>;
<a name="l00400"></a><a class="code" href="classOpenBabel_1_1OBSSMatch.shtml#a9ee3a52af1af26de9547b080e0b950c7">00400</a> <span class="keyword">const</span> <a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a> *<a class="code" href="classOpenBabel_1_1OBSSMatch.shtml#a9ee3a52af1af26de9547b080e0b950c7">_pat</a>;
<a name="l00401"></a><a class="code" href="classOpenBabel_1_1OBSSMatch.shtml#a46054c62ce67984c978b60b2b9059593">00401</a> std::vector<int> <a class="code" href="classOpenBabel_1_1OBSSMatch.shtml#a46054c62ce67984c978b60b2b9059593">_map</a>;
<a name="l00402"></a>00402
<a name="l00403"></a>00403 <span class="keyword">public</span>:
<a name="l00404"></a>00404 <a class="code" href="classOpenBabel_1_1OBSSMatch.shtml" title="Internal class: performs fast, exhaustive matching used to find just a single match in match() using ...">OBSSMatch</a>(<a class="code" href="classOpenBabel_1_1OBMol.shtml" title="Molecule Class.">OBMol</a>&,<span class="keyword">const</span> <a class="code" href="structOpenBabel_1_1Pattern.shtml" title="A SMARTS parser internal pattern.">Pattern</a>*);
<a name="l00405"></a>00405 ~<a class="code" href="classOpenBabel_1_1OBSSMatch.shtml" title="Internal class: performs fast, exhaustive matching used to find just a single match in match() using ...">OBSSMatch</a>();
<a name="l00406"></a>00406 <span class="keywordtype">void</span> Match(std::vector<std::vector<int> > &v, <span class="keywordtype">int</span> bidx=-1);
<a name="l00407"></a>00407 };
<a name="l00408"></a>00408
<a name="l00409"></a>00409 OBAPI <span class="keywordtype">void</span> <a class="code" href="namespaceOpenBabel.shtml#a6b397e6876fbb7f13d0e4a3cac7edfdc">SmartsLexReplace</a>(std::string &,
<a name="l00410"></a>00410 std::vector<std::pair<std::string,std::string> > &);
<a name="l00411"></a>00411
<a name="l00412"></a>00412 } <span class="comment">// end namespace OpenBabel</span>
<a name="l00413"></a>00413
<a name="l00414"></a>00414 <span class="preprocessor">#endif // OB_PARSMART_H</span>
<a name="l00415"></a>00415 <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:07 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>
|