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

Reply via email to