How did you create the .fs file? BTW, there should be no need to escape if you use double quotation mark, i.e. ".
On 21 March 2015 at 21:52, Stefano Forli <fo...@scripps.edu> wrote: > I think there's an error either in the documentation or in the implementation > of the > filter by pattern in obabel (v2.3.2). The online help says: > > $ obabel -H > ... > -s"smarts" Convert only if match SMARTS or mols in file: > ... > > as well as the documentation page here: > > http://openbabel.org/docs/dev/Fingerprints/fingerprints.html#substructure-searching > > Although, when trying the following example, I get an error message that > implies the code > is expecting a SMILES string: > > -------------------- > $ obabel -ifs mol2_files_top50K.fs > -s'[#6]-1(=[#6](-[$([#1]),$([#6](-[#1])-[#1]),$([#6]=[#8])])-[#16]-[#6](-[#7]-1-[$([#1]),$([#6]-[#1]),$([#6]:[#6])])=[#7;\!R])-[$([#6](-[#1])-[#1]),$([#6]:[#6])]' > -osmi -O first.smi > ============================== > *** Open Babel Error in ReadMolecule > C-1(=C(-[$(H),$(C(-H)-H),$(C=O)])-S contained a character ',' which is > invalid in SMILES > ============================== > *** Open Babel Error in ObtainTarget > Cannot read the SMILES string > 0 molecules converted > ---------------------- > > (note: I've escaped some characters in the pattern to avoid shell errors). > > Thanks, > > S > > > > -- > Stefano Forli, PhD > > Staff Scientist > Molecular Graphics Laboratory > Dept. of Integrative Structural > and Computational Biology, MB-112F > The Scripps Research Institute > 10550 North Torrey Pines Road > La Jolla, CA 92037-1000, USA. > > tel: +1 (858)784-2055 > fax: +1 (858)784-2860 > email: fo...@scripps.edu > http://www.scripps.edu/~forli/ > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for all > things parallel software development, from weekly thought leadership blogs to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > OpenBabel-discuss mailing list > OpenBabel-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss