Dear Andrew,

On Sun, Mar 25, 2012 at 4:23 PM, Andrew Dalke <da...@dalkescientific.com> wrote:
>
>  I'm doing some work where I want to turn a subgraph of a molecule
> into a canonical SMARTS. I can almost use the canonical SMILES, but
> it uses "cc" for aromatic bonds connecting aromatic atoms, rather
> than "c:c". Thus, as a SMARTS it matches both "c:c" and "c-c".
>
>  RDKit does generate an explicit single bond, as 'c-c', for single
> bonds which connect two aromatic atoms. This is the right thing
> to do, and it means that I can work around this problem syntactically
> by post-processing the SMILES to insert the ':'s where needed. That's
> a non-trivial effort though.
>
>  I wondered if there was an easier way to do it. For example, how
> hard is it to change the MolToSmiles code to handle another parameter,
> perhaps 'explicitAromaticBonds', and have it put in the ':'s? Or is
> there some way to get RDKit to do what I want directly? Perhaps some
> secret option to MolToSmarts?

Unfortunately there's no secret option to MolToSmarts. Adding an
"allBondsExplicit" option to MolToSmiles would, on the other hand, be
easy. Easy enough that it ought to be doable for this release. I'll
take a look over the next couple days and let you know when it's in.

>
>  For reference, here's the code I use to generate the 'canonical
> SMARTS.'

Haven't looked at this yet... that's for later.

-greg

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to