While this doesn't answer your core question of can RDKit do what you want
without manually editing the smarts strings, if you do end up hacking it
using 'C[CX3v4](~O)~O' might be cleaner than 'CC(~O)~O)' as it would
exclude the case where both Os were singly bonded.

Yours,

Toby Wright

--
InhibOx Ltd


On 30 October 2013 01:12, S.L. Chan <[email protected]> wrote:

> Good evening,
>
> I would like to get an exhaustive substructure matching of a molecule onto
> itself. Generally I could use the GetSubstructMatches function with the
> "uniquify=False" option. However, if there is a carboxylate or a
> guanidinium head around, this would give only "one side" of the match since
> the two oxygens / nitrogens are not considered equivalent:
>
> >>> mol = Chem.MolFromSmiles('CC(=O)[O-]')
> >>> patt = Chem.MolFromSmarts('CC(=O)[O-]')
> >>> print mol.GetSubstructMatches(patt,uniquify=False)
> ((0,1,2,3),)
>
> Now, I suppose I could do an ugly (could in principle match two single
> bonds) hack to achieve my purpose:
> >>> mol = Chem.MolFromSmiles('CC(=O)[O-]')
> >>> patt = Chem.MolFromSmarts('CC(~O)~O')
> >>> print mol.GetSubstructMatches(patt,uniquify=False)
> ((0,1,2,3), (0,1,3,2))
>
> However, this would mean that I would need to manually edit the smarts
> string for all molecules. I just wonder if there is something similar to
> the "Kekulize" command that would make the two oxygens equivalent? Or are
> there other ways around this?
>
> Ling
>
>
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to