File: group__substructure.shtml

package info (click to toggle)
openbabel 2.3.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 75,308 kB
  • ctags: 41,952
  • sloc: cpp: 321,252; ansic: 89,228; python: 7,262; perl: 6,418; pascal: 793; sh: 194; xml: 97; ruby: 55; makefile: 47; java: 23
file content (463 lines) | stat: -rw-r--r-- 31,768 bytes parent folder | download | duplicates (3)
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
456
457
458
459
460
461
462
463
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Substructure Searching</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&#160;Page</span></a></li>
      <li><a href="pages.shtml"><span>Related&#160;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><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>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Substructure Searching</div>  </div>
</div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBIsomorphismMapper.shtml">OBIsomorphismMapper</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Abstract class defining interface for isomorphism (i.e. substructure) searches.  <a href="classOpenBabel_1_1OBIsomorphismMapper.shtml#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBSmartsPattern.shtml">OBSmartsPattern</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">SMARTS (SMiles ARbitrary Target Specification) substructure searching.  <a href="classOpenBabel_1_1OBSmartsPattern.shtml#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBQueryAtom.shtml">OBQueryAtom</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Atom in an <a class="el" href="classOpenBabel_1_1OBQuery.shtml" title="A substructure query.">OBQuery</a>.  <a href="classOpenBabel_1_1OBQueryAtom.shtml#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBQueryBond.shtml">OBQueryBond</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Bond in an <a class="el" href="classOpenBabel_1_1OBQuery.shtml" title="A substructure query.">OBQuery</a>.  <a href="classOpenBabel_1_1OBQueryBond.shtml#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBQuery.shtml">OBQuery</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A substructure query.  <a href="classOpenBabel_1_1OBQuery.shtml#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <br class="typebreak"/>
OBIsomorphismMapper::Mapping&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__substructure.shtml#ga9373f6c3f788157de6f03c9403be34c4">Automorphism</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <br class="typebreak"/>
OBIsomorphismMapper::Mappings&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__substructure.shtml#ga6179e6c11d4f797e8d0ef6ac5c9f25a8">Automorphisms</a></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__substructure.shtml#ga4edd651fb377c60f3b7ac2f48b7f5e57">MapsTo</a> (const OBIsomorphismMapper::Mapping &amp;map, unsigned int queryIndex, unsigned int &amp;queriedIndex)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__substructure.shtml#ga16841a730cf92c8e51a804ad8d746307">FindAutomorphisms</a> (OBMol *mol, std::vector&lt; OBIsomorphismMapper::Mapping &gt; &amp;aut, const std::vector&lt; unsigned int &gt; &amp;symmetry_classes, const OBBitVec &amp;mask=OBBitVec(), std::size_t maxMemory=3000000)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__substructure.shtml#ga7753422526ba34488edf393803aabad7">FindAutomorphisms</a> (OBMol *mol, std::vector&lt; OBIsomorphismMapper::Mapping &gt; &amp;aut, const OBBitVec &amp;mask=OBBitVec(), std::size_t maxMemory=3000000)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__substructure.shtml#ga6a2b6b84fc5e4432152e29001877c59b">FindAutomorphisms</a> (OBIsomorphismMapper::Functor &amp;functor, OBMol *mol, const std::vector&lt; unsigned int &gt; &amp;symmetry_classes, const OBBitVec &amp;mask=OBBitVec())</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">OBQuery *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__substructure.shtml#ga9307ec0c55a4d2b7ee933b53a3a84ce5">CompileMoleculeQuery</a> (OBMol *mol, const OBBitVec &amp;mask=OBBitVec())</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">OBQuery *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__substructure.shtml#ga87fabf6ed3625406fe5d117b134b5f16">CompileSmilesQuery</a> (const std::string &amp;smiles, const OBBitVec &amp;mask=OBBitVec())</td></tr>
</table>


<h3><a class="anchor" id="substructure"></a>Substructure Search</h3><div class="textblock"><dl class="since"><dt><b>Since:</b></dt><dd>version 2.3</dd></dl>
<p>Substructure searching is finding a mapping for a query to a target molecule. Such a mapping is also known as a graph isomorphism. A graph isomorphism maps the vertexes (i.e. atoms) from the query to vertexes in the molecule such that two vertexes adjacent in the query are also adjacent in the target molecule. In other words, no bonds are broken and no new bonds are formed.</p>
<h2><a class="anchor" id="smarts"></a>
SMARTS Substructure Search</h2>
<p>Smarts is an extension of smiles to create powerful queries. Smarts substructure search has been available in <a class="el" href="namespaceOpenBabel.shtml" title="Global namespace for all Open Babel code.">OpenBabel</a> for many years. It is also used for many of OpenBabel's algorithms. Although smarts is only a syntax for queries, the implementation has it's own matching algorithm. For many purposes smarts are the easiest way to do substructure searches. See the <a class="el" href="classOpenBabel_1_1OBSmartsPattern.shtml" title="SMARTS (SMiles ARbitrary Target Specification) substructure searching.">OBSmartsPattern</a> documentation for details on how to use smarts.</p>
<h2><a class="anchor" id="query"></a>
Queries</h2>
<p>Since <a class="el" href="namespaceOpenBabel.shtml" title="Global namespace for all Open Babel code.">OpenBabel</a> version 2.3, there are some classes for representing generic queries. The <a class="el" href="classOpenBabel_1_1OBQuery.shtml" title="A substructure query.">OBQuery</a>, <a class="el" href="classOpenBabel_1_1OBQueryAtom.shtml" title="Atom in an OBQuery.">OBQueryAtom</a> and <a class="el" href="classOpenBabel_1_1OBQueryBond.shtml" title="Bond in an OBQuery.">OBQueryBond</a> class define interfaces that can be reimplemented to get custom behavior. The classes also contain some methods to access topological information which are used by the mapping algorithms. The default implementations allow very simple exact substructure searches to be performed but subclassing allows very advanced queries to be used (e.g. smarts).</p>
<p>While it is possible to construct these queries manually, "compilers" are provided to convert a query representation to a <a class="el" href="classOpenBabel_1_1OBQuery.shtml" title="A substructure query.">OBQuery</a> object. Currently, only two exact substructure search compilers exist. The first is CompileMoleculeQuery which converts an <a class="el" href="classOpenBabel_1_1OBMol.shtml" title="Molecule Class.">OBMol</a> object to an <a class="el" href="classOpenBabel_1_1OBQuery.shtml" title="A substructure query.">OBQuery</a> object. The second is CompileSmilesQuery and converts a smiles string to an <a class="el" href="classOpenBabel_1_1OBQuery.shtml" title="A substructure query.">OBQuery</a> object.</p>
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include &lt;<a class="code" href="query_8h.shtml" title="OBQuery, OBQueryAtom &amp; OBQueryBond classes.">openbabel/query.h</a>&gt;</span>
 <span class="keyword">using namespace </span>OpenBabel;

 <a class="code" href="classOpenBabel_1_1OBMol.shtml" title="Molecule Class.">OBMol</a> *mol = <span class="keyword">new</span> <a class="code" href="classOpenBabel_1_1OBMol.shtml" title="Molecule Class.">OBMol</a>;

 <span class="comment">// ... read molecule ...</span>

 <a class="code" href="classOpenBabel_1_1OBQuery.shtml" title="A substructure query.">OBQuery</a> *query;
 query = <a class="code" href="group__substructure.shtml#ga9307ec0c55a4d2b7ee933b53a3a84ce5">CompileMoleculeQuery</a>(mol);
 query = <a class="code" href="group__substructure.shtml#ga87fabf6ed3625406fe5d117b134b5f16">CompileSmilesQuery</a>(<span class="stringliteral">&quot;c1ccccc1CC(=O)O&quot;</span>);
</pre></div><h2><a class="anchor" id="mapping"></a>
Mapping Isomorphisms</h2>
<p>The <a class="el" href="classOpenBabel_1_1OBIsomorphismMapper.shtml" title="Abstract class defining interface for isomorphism (i.e. substructure) searches.">OBIsomorphismMapper</a> class defined an interface for mapping queries to target molecules. Multiple implementations can be added but they all do the same. The MapFirst, MapUnique and MapAll methods are used for gettings the map(s).</p>
<h3><a class="anchor" id="MapFirst"></a>
MapFirst</h3>
<p>This method returns the first map found. The main reason for getting only one map is improved performance since it is considerably faster than MapUnique and MapAll. However, depending on the use case a single map is all that is needed. For example, to check if a molecule in a database contains a phenyl ring, a single mapping is enough.</p>
<h3><a class="anchor" id="MapUnique"></a>
MapUnique</h3>
<p>MapUnique returns all unique maps. A map is considered unique if there is no other map covering exactly the same atoms in the target molecule. For example, when a phenyl query is performed on a molecule with 2 phenyl rings, MapUnique will return 2 maps. These 2 maps are selected from the 24 found non-duplicate maps (6 atoms to start from * 2 directions (CW/CCW) * 2 rings).</p>
<h3><a class="anchor" id="MapAll"></a>
MapAll</h3>
<p>MapAll returns all non-duplicate maps. For example, when a phenyl query is performed on a molecule with 2 phenyl rings, MapAll will return 24 maps (6 atoms to start from * 2 directions (CW/CCW) * 2 rings).</p>
<h3><a class="anchor" id="MapGeneric"></a>
MapGeneric</h3>
<p>MapGeneric takes a functor object and calls the functor to handle found isomorphisms. This allows for custom mapping results to be obtained by filtering or avoid storing all results. To implement a custom functor, a simple class that inherits <a class="el" href="classOpenBabel_1_1OBIsomorphismMapper_1_1Functor.shtml" title="Functor base class to be used in combination with MapGeneric.">OBIsomorphismMapper::Functor</a> and implements the required operator().</p>
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include &lt;<a class="code" href="isomorphism_8h.shtml" title="OBIsomorphismMapper class for finding isomorphisms.">openbabel/isomorphism.h</a>&gt;</span>
 <span class="keyword">using namespace </span>OpenBabel;

 <span class="keyword">class </span>MyCustomFunctor : <span class="keyword">public</span> <a class="code" href="classOpenBabel_1_1OBIsomorphismMapper.shtml" title="Abstract class defining interface for isomorphism (i.e. substructure) searches.">OBIsomorphismMapper</a>::Functor
 {
   <span class="keyword">private</span>:
     <span class="comment">// store all mappings in m_data</span>
     std::vector&lt;OBIsomorphismMapper::Mapping&gt; &amp;m_data;
   <span class="keyword">public</span>:
     MyCustomFunctor(std::vector&lt;OBIsomorphismMapper::Mapping&gt; &amp;data) : m_data(data) {}
     <span class="keywordtype">bool</span> operator()(<a class="code" href="classOpenBabel_1_1OBIsomorphismMapper.shtml#a97df663c0fc8a3ba6e9113802cac5c82">OBIsomorphismMapper::Mapping</a> &amp;map)
     {
       <span class="comment">// code to handle found isomorphism...</span>
       <span class="comment">// examples: - store the mapping</span>
       <span class="comment">//           - filter mappings</span>
       <span class="comment">//           - use the found map in some way</span>

       m_data.push_back(map);

       <span class="comment">// continue mapping</span>
       <span class="keywordflow">return</span> <span class="keyword">false</span>;
     }
 }
</pre></div><h2><a class="anchor" id="automorphisms"></a>
Automorphisms</h2>
<p>The automorphisms of a graph or molecule are a group of isomorphism mappings of the molecule onto itself (i.e. the query and target are the same). The automorphisms make it easy to take symmetry into account. See FindAutomorphisms for detials. </p>
</div><hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ga9373f6c3f788157de6f03c9403be34c4"></a><!-- doxytag: member="OpenBabel::Automorphism" ref="ga9373f6c3f788157de6f03c9403be34c4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OBIsomorphismMapper::Mapping Automorphism</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A single automorphic permutation. </p>
<dl class="since"><dt><b>Since:</b></dt><dd>2.3 </dd></dl>

</div>
</div>
<a class="anchor" id="ga6179e6c11d4f797e8d0ef6ac5c9f25a8"></a><!-- doxytag: member="OpenBabel::Automorphisms" ref="ga6179e6c11d4f797e8d0ef6ac5c9f25a8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OBIsomorphismMapper::Mappings Automorphisms</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A group of automorphic permutations. </p>
<dl class="since"><dt><b>Since:</b></dt><dd>2.3 </dd></dl>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga4edd651fb377c60f3b7ac2f48b7f5e57"></a><!-- doxytag: member="OpenBabel::MapsTo" ref="ga4edd651fb377c60f3b7ac2f48b7f5e57" args="(const OBIsomorphismMapper::Mapping &amp;map, unsigned int queryIndex, unsigned int &amp;queriedIndex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool OpenBabel::MapsTo </td>
          <td>(</td>
          <td class="paramtype">const OBIsomorphismMapper::Mapping &amp;&#160;</td>
          <td class="paramname"><em>map</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>queryIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int &amp;&#160;</td>
          <td class="paramname"><em>queriedIndex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ga16841a730cf92c8e51a804ad8d746307"></a><!-- doxytag: member="OpenBabel::FindAutomorphisms" ref="ga16841a730cf92c8e51a804ad8d746307" args="(OBMol *mol, std::vector&lt; OBIsomorphismMapper::Mapping &gt; &amp;aut, const std::vector&lt; unsigned int &gt; &amp;symmetry_classes, const OBBitVec &amp;mask=OBBitVec(), std::size_t maxMemory=3000000)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool OpenBabel::FindAutomorphisms </td>
          <td>(</td>
          <td class="paramtype">OBMol *&#160;</td>
          <td class="paramname"><em>mol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; OBIsomorphismMapper::Mapping &gt; &amp;&#160;</td>
          <td class="paramname"><em>aut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; unsigned int &gt; &amp;&#160;</td>
          <td class="paramname"><em>symmetry_classes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const OBBitVec &amp;&#160;</td>
          <td class="paramname"><em>mask</em> = <code>OBBitVec()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>maxMemory</em> = <code>3000000</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Find the automorphisms of a molecule by using an <a class="el" href="classOpenBabel_1_1OBIsomorphismMapper.shtml" title="Abstract class defining interface for isomorphism (i.e. substructure) searches.">OBIsomorphismMapper</a>. This function is a wrapper for FindAutomorphisms with a functor to store all automorphisms.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">mol</td><td>The molecule for which to find the automorphisms. </td></tr>
    <tr><td class="paramname">aut</td><td>The result will be stored here. </td></tr>
    <tr><td class="paramname">symmetry_classes</td><td>The graph invariants to use. See <a class="el" href="classOpenBabel_1_1OBGraphSym.shtml" title="Handle and perceive graph symmtery for canonical numbering .">OBGraphSym</a> or use the FindAutomorphisms function that computes these for you below. </td></tr>
    <tr><td class="paramname">mask</td><td>A bit vector specifying which atoms to consider. An empty mask will consider all atoms. The bits are indexed from 1 (i.e. <a class="el" href="classOpenBabel_1_1OBAtom.shtml#a80892a7fdfc7180a85160279c1186952">OBAtom::GetIdx()</a>). </td></tr>
    <tr><td class="paramname">maxMemory</td><td>Maximum memory limit for <code>aut</code>. The number of automorphisms for certain graphs can be large. The default is 300MB, consider using a functor to process automorphisms when they are found.</td></tr>
  </table>
  </dd>
</dl>
<dl class="since"><dt><b>Since:</b></dt><dd>version 2.3 </dd></dl>

<p>Referenced by <a class="el" href="namespaceOpenBabel.shtml#a6239f809ba8a88712a94f2a6bb90a485">OpenBabel::FindAutomorphisms()</a>, and <a class="el" href="classOpenBabel_1_1OBAlign.shtml#ac56e2c2ffd9fdf7448b3bda78cdc9549">OBAlign::SetRefMol()</a>.</p>

</div>
</div>
<a class="anchor" id="ga7753422526ba34488edf393803aabad7"></a><!-- doxytag: member="OpenBabel::FindAutomorphisms" ref="ga7753422526ba34488edf393803aabad7" args="(OBMol *mol, std::vector&lt; OBIsomorphismMapper::Mapping &gt; &amp;aut, const OBBitVec &amp;mask=OBBitVec(), std::size_t maxMemory=3000000)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool OpenBabel::FindAutomorphisms </td>
          <td>(</td>
          <td class="paramtype">OBMol *&#160;</td>
          <td class="paramname"><em>mol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; OBIsomorphismMapper::Mapping &gt; &amp;&#160;</td>
          <td class="paramname"><em>aut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const OBBitVec &amp;&#160;</td>
          <td class="paramname"><em>mask</em> = <code>OBBitVec()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>maxMemory</em> = <code>3000000</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Find the automorphisms of a molecule by using an <a class="el" href="classOpenBabel_1_1OBIsomorphismMapper.shtml" title="Abstract class defining interface for isomorphism (i.e. substructure) searches.">OBIsomorphismMapper</a>. This function will first find the graph invariants (i.e. symmetry_classes) using the mask. This function is a wrapper for FindAutomorphisms with a functor to store all automorphisms.</p>
<dl class="since"><dt><b>Since:</b></dt><dd>version 2.3 </dd></dl>

</div>
</div>
<a class="anchor" id="ga6a2b6b84fc5e4432152e29001877c59b"></a><!-- doxytag: member="OpenBabel::FindAutomorphisms" ref="ga6a2b6b84fc5e4432152e29001877c59b" args="(OBIsomorphismMapper::Functor &amp;functor, OBMol *mol, const std::vector&lt; unsigned int &gt; &amp;symmetry_classes, const OBBitVec &amp;mask=OBBitVec())" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FindAutomorphisms </td>
          <td>(</td>
          <td class="paramtype">OBIsomorphismMapper::Functor &amp;&#160;</td>
          <td class="paramname"><em>functor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">OBMol *&#160;</td>
          <td class="paramname"><em>mol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; unsigned int &gt; &amp;&#160;</td>
          <td class="paramname"><em>symmetry_classes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const OBBitVec &amp;&#160;</td>
          <td class="paramname"><em>mask</em> = <code>OBBitVec()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Find the automorphisms of a molecule by using an <a class="el" href="classOpenBabel_1_1OBIsomorphismMapper.shtml" title="Abstract class defining interface for isomorphism (i.e. substructure) searches.">OBIsomorphismMapper</a>. This is the main implementation for finding automorphisms and uses an <a class="el" href="classOpenBabel_1_1OBIsomorphismMapper_1_1Functor.shtml" title="Functor base class to be used in combination with MapGeneric.">OBIsomorphismMapper::Functor</a> to process found isomorphisms. Wrapper functions are provided to find and store all automorphisms but the number of automorphisms can be large for certain graphs making it not feasible to store all automorphisms in memory (RAM).</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__substructure.shtml#MapGeneric">MapGeneric</a> </dd></dl>
<dl class="since"><dt><b>Since:</b></dt><dd>version 2.3 </dd></dl>

</div>
</div>
<a class="anchor" id="ga9307ec0c55a4d2b7ee933b53a3a84ce5"></a><!-- doxytag: member="OpenBabel::CompileMoleculeQuery" ref="ga9307ec0c55a4d2b7ee933b53a3a84ce5" args="(OBMol *mol, const OBBitVec &amp;mask=OBBitVec())" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OBQuery * CompileMoleculeQuery </td>
          <td>(</td>
          <td class="paramtype">OBMol *&#160;</td>
          <td class="paramname"><em>mol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const OBBitVec &amp;&#160;</td>
          <td class="paramname"><em>mask</em> = <code>OBBitVec()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Create an <a class="el" href="classOpenBabel_1_1OBQuery.shtml" title="A substructure query.">OBQuery</a> object from an <a class="el" href="classOpenBabel_1_1OBMol.shtml" title="Molecule Class.">OBMol</a> object. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">mol</td><td>The query molecule. </td></tr>
    <tr><td class="paramname">mask</td><td>The mask specifying the atoms to use. Indexed from 1 (i.e. <a class="el" href="classOpenBabel_1_1OBAtom.shtml#a80892a7fdfc7180a85160279c1186952">OBAtom::GetIdx()</a>). </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A pointer to an <a class="el" href="classOpenBabel_1_1OBQuery.shtml" title="A substructure query.">OBQuery</a> object for the smiles string. This pointer should be deleted. </dd></dl>
<dl class="since"><dt><b>Since:</b></dt><dd>version 2.3 </dd></dl>

<p>Referenced by <a class="el" href="group__substructure.shtml#ga87fabf6ed3625406fe5d117b134b5f16">OpenBabel::CompileSmilesQuery()</a>.</p>

</div>
</div>
<a class="anchor" id="ga87fabf6ed3625406fe5d117b134b5f16"></a><!-- doxytag: member="OpenBabel::CompileSmilesQuery" ref="ga87fabf6ed3625406fe5d117b134b5f16" args="(const std::string &amp;smiles, const OBBitVec &amp;mask=OBBitVec())" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OBQuery * CompileSmilesQuery </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>smiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const OBBitVec &amp;&#160;</td>
          <td class="paramname"><em>mask</em> = <code>OBBitVec()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Create an <a class="el" href="classOpenBabel_1_1OBQuery.shtml" title="A substructure query.">OBQuery</a> object from a smiles string. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">smiles</td><td>The query smiles string. </td></tr>
    <tr><td class="paramname">mask</td><td>The mask specifying the atoms to use. Indexed from 1 (i.e. <a class="el" href="classOpenBabel_1_1OBAtom.shtml#a80892a7fdfc7180a85160279c1186952">OBAtom::GetIdx()</a>). </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A pointer to an <a class="el" href="classOpenBabel_1_1OBQuery.shtml" title="A substructure query.">OBQuery</a> object for the smiles string. This pointer should be deleted. </dd></dl>
<dl class="since"><dt><b>Since:</b></dt><dd>version 2.3 </dd></dl>

</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">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</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 &copy; 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:08 by&nbsp;<a href="http://www.doxygen.org/"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.7.5.1.
</div>

</body>
</html>