File: classOpenBabel_1_1OBDescriptor.shtml

package info (click to toggle)
openbabel 2.3.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 76,164 kB
  • sloc: cpp: 316,390; ansic: 91,270; python: 6,971; perl: 6,591; pascal: 793; sh: 193; xml: 97; ruby: 55; makefile: 38; java: 23; cs: 14
file content (744 lines) | stat: -rw-r--r-- 51,765 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
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>OBDescriptor 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&#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 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&#160;List</span></a></li>
      <li><a href="classes.shtml"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.shtml"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.shtml"><span>Class&#160;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_1OBDescriptor.shtml">OBDescriptor</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-static-methods">Static Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<div class="title">OBDescriptor Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="OpenBabel::OBDescriptor" --><!-- doxytag: inherits="OpenBabel::OBPlugin" -->
<p><code>#include &lt;<a class="el" href="descriptor_8h_source.shtml">openbabel/descriptor.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for OBDescriptor:</div>
<div class="dyncontent">
<div class="center"><img src="classOpenBabel_1_1OBDescriptor__inherit__graph.png" border="0" usemap="#OBDescriptor_inherit__map" alt="Inheritance graph"/></div>
<map name="OBDescriptor_inherit__map" id="OBDescriptor_inherit__map">
<area shape="rect" id="node5" href="classOpenBabel_1_1OBGroupContrib.shtml" title="Handle group contribution algorithms." alt="" coords="5,160,136,189"/><area shape="rect" id="node2" href="classOpenBabel_1_1OBPlugin.shtml" title="Base class for all types of dynamic classes discovered at runtime." alt="" coords="29,5,112,35"/></map>
<center><span class="legend">[<a href="graph_legend.shtml">legend</a>]</span></center></div>

<p><a href="classOpenBabel_1_1OBDescriptor-members.shtml">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef std::map&lt; const char <br class="typebreak"/>
*, <a class="el" href="classOpenBabel_1_1OBPlugin.shtml">OBPlugin</a> *, <a class="el" href="structOpenBabel_1_1CharPtrLess.shtml">CharPtrLess</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__plugins.shtml#ga0fd3c807ed3341c33070c93b14739bc8">PluginMapType</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <br class="typebreak"/>
PluginMapType::const_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__plugins.shtml#ga8fac85f5497f873a2dd8734b47f0bdc0">PluginIterator</a></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a45db88b29eb37e9dd105bf4032e421d2">TypeID</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a21c9550baf45496df7f4b4ee9e494683">Predict</a> (<a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *, std::string *=NULL)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a3a6e9ddee5b20a8911bc9f6e407d1abd">PredictAndSave</a> (<a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *pOb, std::string *param=NULL)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#ade8613a3e82627568adbac497bd3422b">GetStringValue</a> (<a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *pOb, std::string &amp;svalue, std::string *param=NULL)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a5a775da37f5ce464013813ec66b3a349">Compare</a> (<a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *pOb, std::istream &amp;ss, bool noEval, std::string *param=NULL)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#ae0859fdbf134af95a8231eb32c73b7db">Display</a> (std::string &amp;txt, const char *param, const char *ID=NULL)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#ac9b3638a021a9cafc06d8e7059907740">Order</a> (double p1, double p2)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#ada86af1dfb13dd68c119d412480c78c3">Order</a> (std::string s1, std::string s2)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__plugins.shtml#ga4a6b8d1611d5d963fc29982cc1ebcbf7">Description</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classOpenBabel_1_1OBPlugin.shtml">OBPlugin</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__plugins.shtml#ga9399e9568ab809d714385f1b237a9335">MakeInstance</a> (const std::vector&lt; std::string &gt; &amp;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__plugins.shtml#ga3e0b39e1326de703012f81ac2be7feba">Init</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__plugins.shtml#ga753a34173c6750388d33e5294556790f">GetID</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="group__plugins.shtml#ga0fd3c807ed3341c33070c93b14739bc8">PluginMapType</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__plugins.shtml#gaabc1385cbe63145ffec6edf1f2c3be98">GetMap</a> () const =0</td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a1d0907c6fab9cdb01ce11858eb5f0860">FilterCompare</a> (<a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *pOb, std::istream &amp;ss, bool noEval)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a2230dfc67c9b617df81f950e382844cc">AddProperties</a> (<a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *pOb, const std::string &amp;DescrList)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a1a089d9c827830b5a9a2e644b267e510">DeleteProperties</a> (<a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *pOb, const std::string &amp;DescrList)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a789fe3d5cae737f1caa28590fe29f460">GetValues</a> (<a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *pOb, const std::string &amp;DescrList)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static std::pair&lt; std::string, <br class="typebreak"/>
std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a9d1adeb0f4720b6af7f0fc5569a8bb3e">GetIdentifier</a> (std::istream &amp;optionText)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classOpenBabel_1_1OBPlugin.shtml">OBPlugin</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__plugins.shtml#ga295dc7f1b94da710821c562bff3e7c97">GetPlugin</a> (const char *Type, const char *ID)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__plugins.shtml#gaf95953a5793333ba51e978c4a0a00103">ListAsVector</a> (const char *PluginID, const char *param, std::vector&lt; std::string &gt; &amp;vlist)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__plugins.shtml#ga9fabfd2513038ae6ac475ac0ff2c73cd">List</a> (const char *PluginID, const char *param=NULL, std::ostream *os=&amp;std::cout)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__plugins.shtml#gaba22c5352d36c7f058299af7ddffb03e">ListAsString</a> (const char *PluginID, const char *param=NULL)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__plugins.shtml#ga84fc973fdf4bba5a6b0e2d402077991c">FirstLine</a> (const char *txt)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__plugins.shtml#ga8fac85f5497f873a2dd8734b47f0bdc0">PluginIterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__plugins.shtml#ga1d4d73999ab0518ee471c635bd0a7e87">Begin</a> (const char *PluginID)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__plugins.shtml#ga8fac85f5497f873a2dd8734b47f0bdc0">PluginIterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__plugins.shtml#ga9a330280c1cd2e7119dac87a6fd0b762">End</a> (const char *PluginID)</td></tr>
<tr><td colspan="2"><h2><a name="pro-static-methods"></a>
Static Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a20b0788ed84f1b69746dfd9ed06be507">ParsePredicate</a> (std::istream &amp;optionText, char &amp;ch1, char &amp;ch2, std::string &amp;svalue)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#ac41e9b3233ce576c2e4c5b242767eaec">ReadStringFromFilter</a> (std::istream &amp;ss, std::string &amp;result)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a00c8a88c0a36c9a1167b119214e015e6">CompareStringWithFilter</a> (std::istream &amp;optionText, std::string &amp;s, bool noEval, bool NoCompOK=false)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a865d2be70640a96f185bf78dcaaea8b2">ispunctU</a> (char ch)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a4e794d96851deaad479e17b30928a3cd">MatchPairData</a> (<a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *pOb, std::string &amp;s)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__plugins.shtml#ga0fd3c807ed3341c33070c93b14739bc8">PluginMapType</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__plugins.shtml#gac40457336d7b12bb632b4ac4e8955a3a">PluginMap</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__plugins.shtml#ga0fd3c807ed3341c33070c93b14739bc8">PluginMapType</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__plugins.shtml#gadfcf9fda27cfbc4301fc94517a4250ef">GetTypeMap</a> (const char *PluginID)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classOpenBabel_1_1OBPlugin.shtml">OBPlugin</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__plugins.shtml#ga1e58b1811ec8c1b88254ee46ccef0b78">BaseFindType</a> (<a class="el" href="group__plugins.shtml#ga0fd3c807ed3341c33070c93b14739bc8">PluginMapType</a> &amp;Map, const char *ID)</td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__plugins.shtml#ga1f8d25dafb0bc13814ca451035f67955">_id</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Base class for molecular properties, descriptors or features. </p>
<dl class="since"><dt><b>Since:</b></dt><dd>version 2.2</dd></dl>
<p><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml" title="Base class for molecular properties, descriptors or features.">OBDescriptor</a> and Filtering</p>
<p>On the command line, using the option --filter filter-string converts only those molecules which meet the criteria specified in the filter-string. This is useful to select particular molecules from a set. It is used like: babel dataset.sdf outfile.smi --filter "MW&gt;200 SMARTS!=c1ccccc1 PUBCHEM_CACTVS_ROTATABLE_BOND&lt;5"</p>
<p>The identifier , "PUBCHEM_CACTVS_ROTATABLE_BOND" is the name of an attribute of an <a class="el" href="classOpenBabel_1_1OBPairData.shtml" title="Used to store arbitrary text attribute/value relationships.">OBPairData</a> which has probably been imported from a property in a SDF or CML file. The identifier names are (currently) case dependent. A comparison is made with the value in the <a class="el" href="classOpenBabel_1_1OBPairData.shtml" title="Used to store arbitrary text attribute/value relationships.">OBPairData</a>. This is a numeric comparison if both operands can be converted to numbers (as in the example). If the 5 had been enclosed in single or double quotes the comparison would have been a string comparison, which gives a different result in some cases. <a class="el" href="classOpenBabel_1_1OBPairData.shtml" title="Used to store arbitrary text attribute/value relationships.">OBPairData</a> is searched first to match an identifier.</p>
<p>If there are no OBPair attributes that match, the identifier is taken to be the ID of an <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml" title="Base class for molecular properties, descriptors or features.">OBDescriptor</a> class object. The class <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml" title="Base class for molecular properties, descriptors or features.">OBDescriptor</a> is the base class for classes that wrap molecular properties, descriptors or features. In the example "MW" and "SMARTS" are <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml" title="Base class for molecular properties, descriptors or features.">OBDescriptor</a> IDs and are case independent. They are plugin classes, like fingerprints, forcefields and formats, so that new molecular features can be added or old ones removed (to prevent code bloat) without altering old code. A list of available descriptors is available from the commandline: babel -L descriptors or from the functions <a class="el" href="group__plugins.shtml#ga9fabfd2513038ae6ac475ac0ff2c73cd" title="As ListAsVector but sent to an ostream with a default of cout if not specified.">OBPlugin::List</a>, <a class="el" href="group__plugins.shtml#gaba22c5352d36c7f058299af7ddffb03e" title="As ListAsVector but returns a string containing the list.">OBPlugin::ListAsString</a> and <a class="el" href="group__plugins.shtml#gaf95953a5793333ba51e978c4a0a00103">OBPlugin::ListAsVector</a>.</p>
<p>The filter-string is interpreted by a static function of <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml" title="Base class for molecular properties, descriptors or features.">OBDescriptor</a>, <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a1d0907c6fab9cdb01ce11858eb5f0860" title="Interprets the --filter option string and returns the combined result of all the comparisons it conta...">FilterCompare()</a>. This identifies the descriptor IDs and then calls a virtual function, <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a5a775da37f5ce464013813ec66b3a349" title="Parses the filter stream for a relational expression and returns its result when applied to the chemi...">Compare()</a>, of each <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml" title="Base class for molecular properties, descriptors or features.">OBDescriptor</a> class to interpret the rest of relational expression, for example, "&gt;200", or "=c1ccccc1". The default version of <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a5a775da37f5ce464013813ec66b3a349" title="Parses the filter stream for a relational expression and returns its result when applied to the chemi...">Compare()</a> is suitable for descriptors, like MW or logP, which return a double from their <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a21c9550baf45496df7f4b4ee9e494683">Predict()</a> method. Classes like SMARTS which need different semantics provide their own.</p>
<p>By default, as in the example, <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a1d0907c6fab9cdb01ce11858eb5f0860" title="Interprets the --filter option string and returns the combined result of all the comparisons it conta...">OBDescriptor::FilterCompare()</a> would AND each comparison so that all the comparisons must be true for the test to succeed. However filter-string could also be a full boolean expression, with &amp;, |, !, and parenthases allowing any combination of features to be selected. FilterCompareAs calls itself recursively to give AND precidence over OR and evaluation is not carried out if not needed.</p>
<p>The aim has been to make interpretation of the filter-string as liberal as possible, so that AND can be &amp;&amp;, there can be spaces or commas in places that are reasonable.</p>
<p>The base class, <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml" title="Base class for molecular properties, descriptors or features.">OBDescriptor</a>, uses pointers to <a class="el" href="classOpenBabel_1_1OBBase.shtml" title="Base Class.">OBBase</a> in its functions, like <a class="el" href="classOpenBabel_1_1OBFormat.shtml" title="Base class for file formats.">OBFormat</a>, to improve extendability - reactions could have features too. It does mean that a dynamic_cast is needed at the start of the Predict(OBBase* pOb, string*) functions.</p>
<p>To use a particular descriptor, like logP, when programming with the API, use code like the following: </p>
<div class="fragment"><pre class="fragment">  OBDescriptor* pDescr = OBDecriptor::FindType(<span class="stringliteral">&quot;logP&quot;</span>);
  <span class="keywordflow">if</span>(pDescr)
    <span class="keywordtype">double</span> val = pDescr-&gt;Predict(mol, param);
</pre></div><p> To add the descriptor ID and the predicted data to <a class="el" href="classOpenBabel_1_1OBPairData.shtml" title="Used to store arbitrary text attribute/value relationships.">OBPairData</a> attached to the object, use <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a3a6e9ddee5b20a8911bc9f6e407d1abd">PredictAndSave()</a>.</p>
<p>Descriptors can have a string parameter, which each descriptor can interpret as it wants, maybe, for instance as multiple numeric values. The parameter is in brackets after the descriptor name, e.g. popcount(FP4). In the above programming example param is a pointer to a std::string which has a default value of NULL, meaning no parameter. <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#ade8613a3e82627568adbac497bd3422b" title="Provides a string value for non-numeric descriptors and returns NaN, or a string representation and r...">GetStringValue()</a> and <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a5a775da37f5ce464013813ec66b3a349" title="Parses the filter stream for a relational expression and returns its result when applied to the chemi...">Compare()</a> are similar.</p>
<p>To parse a string for descriptors use <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a9d1adeb0f4720b6af7f0fc5569a8bb3e" title="Read an identifier and its parameter from the filter string.">GetIdentifier()</a>, which returns both the ID and the parameter, if there is one.</p>
<p>This facility can be called from the command line.Use the option --add "descriptor list", which will add the requested descriptors to the molecule. They are then visible as properties in SDF and CML formats. The IDs in the list can be separated by spaces or commas. All Descriptors will provide an output value as a string through a virtual function GetStringValue((OBBase* pOb, string&amp; svalue)) which assigns the value of a string descriptor(like inchi) to svalue or a string representation of a numerical property like logP.</p>
<p>The classes MWFilter and TitleFilter illustrate the code that has to be provided for numerical and non-numerical descriptors. </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a45db88b29eb37e9dd105bf4032e421d2"></a><!-- doxytag: member="OpenBabel::OBDescriptor::TypeID" ref="a45db88b29eb37e9dd105bf4032e421d2" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* TypeID </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Redefined by each plugin type: "formats", "fingerprints", etc. </p>

<p>Reimplemented from <a class="el" href="group__plugins.shtml#ga45dfda1fb13d3c26ab7f8f7631e3351c">OBPlugin</a>.</p>

</div>
</div>
<a class="anchor" id="a21c9550baf45496df7f4b4ee9e494683"></a><!-- doxytag: member="OpenBabel::OBDescriptor::Predict" ref="a21c9550baf45496df7f4b4ee9e494683" args="(OBBase *, std::string *=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual double Predict </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string *&#160;</td>
          <td class="paramname"> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>the value of a numeric descriptor </dd></dl>

<p>Reimplemented in <a class="el" href="classOpenBabel_1_1OBGroupContrib.shtml#ad81c5bb776314e5eb855eca1e5bca292">OBGroupContrib</a>.</p>

</div>
</div>
<a class="anchor" id="a3a6e9ddee5b20a8911bc9f6e407d1abd"></a><!-- doxytag: member="OpenBabel::OBDescriptor::PredictAndSave" ref="a3a6e9ddee5b20a8911bc9f6e407d1abd" args="(OBBase *pOb, std::string *param=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double PredictAndSave </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *&#160;</td>
          <td class="paramname"><em>pOb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string *&#160;</td>
          <td class="paramname"><em>param</em> = <code>NULL</code>&#160;</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>the value of the descriptor and adds it to the object's <a class="el" href="classOpenBabel_1_1OBPairData.shtml" title="Used to store arbitrary text attribute/value relationships.">OBPairData</a> </dd></dl>

<p>Referenced by <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a2230dfc67c9b617df81f950e382844cc">OBDescriptor::AddProperties()</a>.</p>

</div>
</div>
<a class="anchor" id="ade8613a3e82627568adbac497bd3422b"></a><!-- doxytag: member="OpenBabel::OBDescriptor::GetStringValue" ref="ade8613a3e82627568adbac497bd3422b" args="(OBBase *pOb, std::string &amp;svalue, std::string *param=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double GetStringValue </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *&#160;</td>
          <td class="paramname"><em>pOb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>svalue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string *&#160;</td>
          <td class="paramname"><em>param</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Provides a string value for non-numeric descriptors and returns NaN, or a string representation and returns a numeric value. </p>
<p>This default version provides a string representation of the numeric value. </p>

<p>Referenced by <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a789fe3d5cae737f1caa28590fe29f460">OBDescriptor::GetValues()</a>.</p>

</div>
</div>
<a class="anchor" id="a5a775da37f5ce464013813ec66b3a349"></a><!-- doxytag: member="OpenBabel::OBDescriptor::Compare" ref="a5a775da37f5ce464013813ec66b3a349" args="(OBBase *pOb, std::istream &amp;ss, bool noEval, std::string *param=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Compare </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *&#160;</td>
          <td class="paramname"><em>pOb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>ss</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>noEval</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string *&#160;</td>
          <td class="paramname"><em>param</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Parses the filter stream for a relational expression and returns its result when applied to the chemical object. </p>
<p><a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a5a775da37f5ce464013813ec66b3a349" title="Parses the filter stream for a relational expression and returns its result when applied to the chemi...">Compare()</a> is a virtual function and can be overridden to allow different comparison behaviour. The default implementation here is suitable for <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml" title="Base class for molecular properties, descriptors or features.">OBDescriptor</a> classes which return a double value. The stringstream is parsed to retrieve a comparison operator, one of &gt; &lt; &gt;= &lt;= = == != , and a numerical value. The function compares this the value returned by <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a21c9550baf45496df7f4b4ee9e494683">Predict()</a> and returns the result. The stringstream is left after the number, and its state reflects whether any errors have occurred. If noEval is true, the parsing is as normal but Predict is not called and the function returns false. </p>

<p>Referenced by <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a1d0907c6fab9cdb01ce11858eb5f0860">OBDescriptor::FilterCompare()</a>.</p>

</div>
</div>
<a class="anchor" id="ae0859fdbf134af95a8231eb32c73b7db"></a><!-- doxytag: member="OpenBabel::OBDescriptor::Display" ref="ae0859fdbf134af95a8231eb32c73b7db" args="(std::string &amp;txt, const char *param, const char *ID=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Display </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>txt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>param</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>ID</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Write information on a plugin class to the string txt. If the parameter is a descriptor ID, displays the verbose description for that descriptor only e.g. babel -L descriptors HBA1 </p>

<p>Reimplemented from <a class="el" href="group__plugins.shtml#gae0859fdbf134af95a8231eb32c73b7db">OBPlugin</a>.</p>

</div>
</div>
<a class="anchor" id="ac9b3638a021a9cafc06d8e7059907740"></a><!-- doxytag: member="OpenBabel::OBDescriptor::Order" ref="ac9b3638a021a9cafc06d8e7059907740" args="(double p1, double p2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool Order </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>p1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>p2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Comparison of the values of the descriptor. Used in sorting. Descriptors may use more complicated ordering than this default (e.g.InChIFilter) </p>

</div>
</div>
<a class="anchor" id="ada86af1dfb13dd68c119d412480c78c3"></a><!-- doxytag: member="OpenBabel::OBDescriptor::Order" ref="ada86af1dfb13dd68c119d412480c78c3" args="(std::string s1, std::string s2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool Order </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>s1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>s2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a1d0907c6fab9cdb01ce11858eb5f0860"></a><!-- doxytag: member="OpenBabel::OBDescriptor::FilterCompare" ref="a1d0907c6fab9cdb01ce11858eb5f0860" args="(OBBase *pOb, std::istream &amp;ss, bool noEval)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool FilterCompare </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *&#160;</td>
          <td class="paramname"><em>pOb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>optionText</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>noEval</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Interprets the --filter option string and returns the combined result of all the comparisons it contains. </p>
<p>The string has the form: PropertyID1 predicate1 [booleanOp] PropertyID2 predicate2 ... The propertyIDs are the ID of instances of a <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml" title="Base class for molecular properties, descriptors or features.">OBDescriptor</a> class or the Attributes of <a class="el" href="classOpenBabel_1_1OBPairData.shtml" title="Used to store arbitrary text attribute/value relationships.">OBPairData</a>, and contain only letters, numbers and underscores. The predicates must start with a punctuation character and are interpreted by the Compare function of the <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml" title="Base class for molecular properties, descriptors or features.">OBDescriptor</a> class. The default implementation expects a comparison operator and a number, e.g. &gt;=1.3 Whitespace is optional and is ignored. Each predicate and this <a class="el" href="classOpenBabel_1_1OBBase.shtml" title="Base Class.">OBBase</a> object (usually <a class="el" href="classOpenBabel_1_1OBMol.shtml" title="Molecule Class.">OBMol</a>) is passed to the Compare function of a <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml" title="Base class for molecular properties, descriptors or features.">OBDescriptor</a>. The result of each comparison is combined in a boolean expression (which can include parentheses) in the normal way. The AND operator can be &amp; or &amp;&amp;, the OR operator can be | or ||, and a unitary NOT is ! The expected operator precedence is achieved using recursive calls of the function. If there is no boolean Op, all the tests have to return true for the function to return true, i.e. the default is AND. If the first operand of an AND is 0, or of an OR is 1, the parsing of the second operand continues but no comparisons are done since the result does not matter. </p>

</div>
</div>
<a class="anchor" id="a2230dfc67c9b617df81f950e382844cc"></a><!-- doxytag: member="OpenBabel::OBDescriptor::AddProperties" ref="a2230dfc67c9b617df81f950e382844cc" args="(OBBase *pOb, const std::string &amp;DescrList)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void AddProperties </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *&#160;</td>
          <td class="paramname"><em>pOb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>DescrList</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reads list of descriptor IDs and calls <a class="el" href="classOpenBabel_1_1OBDescriptor.shtml#a3a6e9ddee5b20a8911bc9f6e407d1abd">PredictAndSave()</a> for each. </p>

</div>
</div>
<a class="anchor" id="a1a089d9c827830b5a9a2e644b267e510"></a><!-- doxytag: member="OpenBabel::OBDescriptor::DeleteProperties" ref="a1a089d9c827830b5a9a2e644b267e510" args="(OBBase *pOb, const std::string &amp;DescrList)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void DeleteProperties </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *&#160;</td>
          <td class="paramname"><em>pOb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>DescrList</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Deletes all the OBPairDatas whose attribute names are in the list (if they exist). </p>

</div>
</div>
<a class="anchor" id="a789fe3d5cae737f1caa28590fe29f460"></a><!-- doxytag: member="OpenBabel::OBDescriptor::GetValues" ref="a789fe3d5cae737f1caa28590fe29f460" args="(OBBase *pOb, const std::string &amp;DescrList)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string GetValues </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *&#160;</td>
          <td class="paramname"><em>pOb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>DescrList</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Reads list of descriptor IDs and <a class="el" href="classOpenBabel_1_1OBPairData.shtml" title="Used to store arbitrary text attribute/value relationships.">OBPairData</a> names and returns a list of values, each precede by a space or the first character in the list if it is whitespace or punctuation. </p>

</div>
</div>
<a class="anchor" id="a9d1adeb0f4720b6af7f0fc5569a8bb3e"></a><!-- doxytag: member="OpenBabel::OBDescriptor::GetIdentifier" ref="a9d1adeb0f4720b6af7f0fc5569a8bb3e" args="(std::istream &amp;optionText)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">pair&lt; string, string &gt; GetIdentifier </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>optionText</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read an identifier and its parameter from the filter string. </p>

</div>
</div>
<a class="anchor" id="a20b0788ed84f1b69746dfd9ed06be507"></a><!-- doxytag: member="OpenBabel::OBDescriptor::ParsePredicate" ref="a20b0788ed84f1b69746dfd9ed06be507" args="(std::istream &amp;optionText, char &amp;ch1, char &amp;ch2, std::string &amp;svalue)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double ParsePredicate </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>optionText</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char &amp;&#160;</td>
          <td class="paramname"><em>ch1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char &amp;&#160;</td>
          <td class="paramname"><em>ch2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>svalue</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reads comparison operator and the following string. Return its value if possible else NaN. </p>

</div>
</div>
<a class="anchor" id="ac41e9b3233ce576c2e4c5b242767eaec"></a><!-- doxytag: member="OpenBabel::OBDescriptor::ReadStringFromFilter" ref="ac41e9b3233ce576c2e4c5b242767eaec" args="(std::istream &amp;ss, std::string &amp;result)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ReadStringFromFilter </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>ss</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>result</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reads a string from the filter string optionally preceded by = or !=. </p>
<p>Reads a string from the filter stream, optionally preceded by = or != </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>false if != operator found, and true otherwise.</dd></dl>
<p>On entry the stringstream position should be just after the ID. On exit it is after the string. If there is an error, the stringstream badbit is set. Returns false if != found, to indicate negation. Can be of any of the following forms: mystring =mystring ==mystring [must be terminated by a space or tab] "mystring" 'mystring' ="mystring" ='mystring' [mystring can contain spaces or tabs] !=mystring !="mystring" [Returns false indicating negate] There can be spaces or tabs after the operator = == != </p>

</div>
</div>
<a class="anchor" id="a00c8a88c0a36c9a1167b119214e015e6"></a><!-- doxytag: member="OpenBabel::OBDescriptor::CompareStringWithFilter" ref="a00c8a88c0a36c9a1167b119214e015e6" args="(std::istream &amp;optionText, std::string &amp;s, bool noEval, bool NoCompOK=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool CompareStringWithFilter </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>optionText</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>noEval</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>NoCompOK</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Makes a comparison using the operator and a string read from the filter stream with a provided string. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the result of the comparison and true if NoCompOK==true and there is no comparison operator. </dd></dl>

</div>
</div>
<a class="anchor" id="a865d2be70640a96f185bf78dcaaea8b2"></a><!-- doxytag: member="OpenBabel::OBDescriptor::ispunctU" ref="a865d2be70640a96f185bf78dcaaea8b2" args="(char ch)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool ispunctU </td>
          <td>(</td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>ch</em></td><td>)</td>
          <td><code> [inline, static, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a4e794d96851deaad479e17b30928a3cd"></a><!-- doxytag: member="OpenBabel::OBDescriptor::MatchPairData" ref="a4e794d96851deaad479e17b30928a3cd" args="(OBBase *pOb, std::string &amp;s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool MatchPairData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classOpenBabel_1_1OBBase.shtml">OBBase</a> *&#160;</td>
          <td class="paramname"><em>pOb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>s</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>true if s (with or without _ replaced by spaces) is a PairData attribute. On return s is the form which matches. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="descriptor_8h_source.shtml">descriptor.h</a></li>
<li><a class="el" href="descriptor_8cpp.shtml">descriptor.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">&#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:09 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>