forked from openbabel/openbabel
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathobgrep.1
92 lines (92 loc) · 2.83 KB
/
obgrep.1
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
.Dd Oct 10, 2019
.Os "Open Babel" 3.1
.Dt obgrep 1 URM
.Sh NAME
.Nm obgrep
.Nd an advanced molecular search program using SMARTS
.Sh SYNOPSIS
.Nm
.Op Ar OPTIONS
.Ar 'SMARTS-pattern'
.Ar filename
.Sh DESCRIPTION
The obgrep tool can be used to search for molecules inside
multi-molecule database files (e.g., SMILES, SDF, etc.) or across
multiple files.
.Sh OPTIONS
If only a filename is given, obgrep will attempt to guess the file
type from the filename extension.
.Bl -tag -width flag
.It Fl c
Print the number of matches
.It Fl f
Full match, print matching-molecules only when the number of heavy
atoms is also equal to the number of atoms in the SMARTS pattern
.It Fl i Ar format
Specifies input and output format, see
.Xr obabel 1
for available formats
.It Fl n
Only print the name of the molecules
.It Fl t Ar #
Print a molecule only if the pattern occurs # times inside the molecule
.It Fl v
Invert the matching, print non-matching molecules
.El
.Sh EXAMPLES
Note that in all examples, the SMARTS pattern is enclosed in single
quotes '...' to ensure it is not changed by the shell.
.Pp
Print all the molecules with a methylamine group:
.Dl "obgrep 'CN' database.smi"
.Pp
Print all the molecules without a methylamine group:
.Dl "obgrep -v 'CN' database.smi"
.Pp
Print the number of molecules without a methylamine group:
.Dl "obgrep -v -c 'CN' database.smi"
.Pp
Print methylamine (if it exists in the file):
.Dl "obgrep -f 'CN' database.smi"
.Pp
Print methylamine and/or methanol (if they exist):
.Dl "obgrep -f 'C[N,O]' database.smi"
Print all molecules with aromatic carbon in all SMILES files in the
directory (i.e., *.smi)
.Dl "obgrep 'c' *.smi"
.Sh SEE ALSO
.Xr obabel 1 ,
.Xr obfit 1 ,
.Xr obrotate 1 .
.Pp
The web pages for Open Babel can be found at:
\%<\fBhttp://openbabel.org/\fR>
.Pp
A guide for constructing SMARTS patterns can be found at:
\%<\fBhttp://www.daylight.com/dayhtml/doc/theory/theory.smarts.html\fR>
.Sh AUTHORS
The obgrep program was contributed by
.An Fabien Fontaine
.Pp
.An -nosplit
Open Babel is developed by a cast of many, including currrent maintainers
.An Geoff Hutchison ,
.An Chris Morley ,
.An Michael Banck ,
and innumerable others who have contributed fixes and additions.
For more contributors to Open Babel, see
\%<\fBhttp://openbabel.org/wiki/THANKS\fR>
.Sh COPYRIGHT
Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc.
.br
Some portions Copyright (C) 2001-2007 by Geoffrey R. Hutchison and
other contributors.
.Pp
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.
.Pp
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.