I don't know how obgrep works, but similar functionality in obabel
works like this:

C:\Users\noel>obabel methane.sdf -osmi -s "C"
C

Note that using single quotes fails (at least on Windows).

- Noel

On 11 June 2013 15:44, Pascal Muller <pascal.jm.mul...@gmail.com> wrote:
>  - Sorry, forgot to cc the list -
>
>
> Hi,
>
>
>>
>>
>>>
>>> Usually, I use obgrep (Open Babel 2.3.2) with smiles files, but today I
>>> tried with an sdf - and it doesn't work. There is no match, and no error
>>> message (e.g.
>>> obgrep 'C' methane.sdf
>>> gives no output, as if there were no match. Tried with and without H in
>>> the sdf).
>>
>>
>> Forgive me if this is too simple, but are sure there are aliphatic carbons
>> in your SDF?  The SMARTS "C" won't match aromatic carbon atoms.
>
>
> Sure :)
>
>>
>>
>> If that's not the case, then maybe you could attach your SDF.  Otherwise,
>> we're just guessing.
>
>
> No obgrep query is working with any of my sdf, e.g. methane structure, but
> these queries are all working with the corresponding smiles files. E.g.
> methane.sdf is:
>
>
> methane
>  OpenBabel06111316402D
>
>   1  0  0  0  0  0  0  0  0  0999 V2000
>     1.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
> M  END
> $$$$
>
>
>
> Regards,
> Pascal
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to