1obgrep(1) User's Reference Manual obgrep(1)
2
4 obgrep — an advanced molecular search program using SMARTS
5
7 obgrep [OPTIONS] 'SMARTS-pattern' filename
8
10 The obgrep tool can be used to search for molecules inside multi-molecule
11 database files (e.g., SMILES, SDF, etc.) or across multiple files.
12
14 If only a filename is given, obgrep will attempt to guess the file type
15 from the filename extension.
16
17 -c Print the number of matches
18
19 -f Full match, print matching-molecules only when the number of heavy
20 atoms is also equal to the number of atoms in the SMARTS pattern
21
22 -i format
23 Specifies input and output format, see babel(1) for available for‐
24 mats
25
26 -n Only print the name of the molecules
27
28 -t # Print a molecule only if the pattern occurs # times inside the mol‐
29 ecule
30
31 -v Invert the matching, print non-matching molecules
32
34 Note that in all examples, the SMARTS pattern is enclosed in single
35 quotes '...' to ensure it is not changed by the shell.
36
37 Print all the molecules with a methylamine group:
38 obgrep 'CN' database.smi
39
40 Print all the molecules without a methylamine group:
41 obgrep -v 'CN' database.smi
42
43 Print the number of molecules without a methylamine group:
44 obgrep -v -c 'CN' database.smi
45
46 Print methylamine (if it exists in the file):
47 obgrep -f 'CN' database.smi
48
49 Print methylamine and/or methanol (if they exist):
50 obgrep -f 'C[N,O]' database.smi
51 Print all molecules with aromatic carbon in all SMILES files in the
52 directory (i.e., *.smi)
53 obgrep 'c' *.smi
54
56 babel(1), obfit(1), obrotate(1).
57
58 The web pages for Open Babel can be found at: <http://openbabel.source‐
59 forge.net/>
60
61 A guide for constructing SMARTS patterns can be found at:
62 <http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html>
63
65 The obgrep program was contributed by Fabien Fontaine
66
67 Open Babel is developed by a cast of many, including currrent maintainers
68 Geoff Hutchison, Chris Morley, Michael Banck, and innumerable others who
69 have contributed fixes and additions. For more contributors to Open
70 Babel, see <http://openbabel.sourceforge.net/wiki/THANKS>
71
73 Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc.
74 Some portions Copyright (C) 2001-2007 by Geoffrey R. Hutchison and other
75 contributors.
76
77 This program is free software; you can redistribute it and/or modify it
78 under the terms of the GNU General Public License as published by the
79 Free Software Foundation version 2 of the License.
80
81 This program is distributed in the hope that it will be useful, but
82 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABIL‐
83 ITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
84 License for more details.
85
86Open Babel 2.1 April 7, 2007 Open Babel 2.1