Re: [Rdkit-discuss] SDWriter kekulizes by default
Hi Michal, On Mon, Jan 6, 2014 at 3:30 PM, Michal Krompiec wrote: > Hello Greg, > >>> Chem.MolToSmiles(Chem.MolFromSmiles('O=C1NC=CC1=C1C=C(-c2nccc2)NC1=O')) > [14:25:55] Can't kekulize mol > > The problem is, once again, in the pyrrole: In [2]: Chem.MolFromSmiles('O=C1NC=CC1=C1C=C(-c2nccc2)NC1=O') [15:38:53] Can't kekulize mol If you add the "explicit" H, everything works: In [3]: Chem.MolFromSmiles('O=C1NC=CC1=C1C=C(-c2[nH]ccc2)NC1=O') Out[3]: This smiles was generated from ChemSketch. OpenBabel converts it to > O=C1NC=CC1=C1C=C(c2[nH]ccc2)NC1=O which is correctly interpreted by > RDKit (no problems with kekulization). > But IMHO both representations are correct, am I wrong? > The SMILES c1cccn1 does not really contain sufficient information to figure out what the user meant. The RDKit does not, in general, try to "guess" intent, so it fails on that form. Daylight's depictor also does not process that form of pyrrole. It's possible to imagine adding a special case for pyrrole, but something like Cc1nncc1 would still cause problems. The fact that you're getting those SMILES at all is really a bug in ChemSketch. It should be adding the H. -greg -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] SDWriter kekulizes by default
Hello Greg, >>> Chem.MolToSmiles(Chem.MolFromSmiles('O=C1NC=CC1=C1C=C(-c2nccc2)NC1=O')) [14:25:55] Can't kekulize mol This smiles was generated from ChemSketch. OpenBabel converts it to O=C1NC=CC1=C1C=C(c2[nH]ccc2)NC1=O which is correctly interpreted by RDKit (no problems with kekulization). But IMHO both representations are correct, am I wrong? Best wishes, Michal On 5 December 2013 12:19, Greg Landrum wrote: > Hi Michal, > > On Thu, Dec 5, 2013 at 11:52 AM, Michal Krompiec > wrote: >> >> Hello, >> Is it possible to suppress kekulization by SDWriter? I get the >> following error on a call to SDWriter.write: >> ValueError: Sanitization error: Can't kekulize mol >> But some molecules can't be kekulized using RDKit's algorithm, even >> though they are otherwise 'correct'. > > > hmm, I'd love to see examples of those if you can share them. > >> >> I browsed the sources and it seems that SDWriter calls MolToMolBlock >> with the default parameter kekulize=True. Can this parameter be >> exposed in SDWriter? > > > Yep, I'll get it in for the next release. > > -greg > -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] SDWriter kekulizes by default
Dear Greg, It seems that all examples I found are in fact incorrect (due to an error during conversion of SDF produced by ISIS Draw with OpenBabel) and contain this bit: c1(sc(c2c1nsn2)) which was meant to be: c1scc2N=S=Nc12. By the way, ChemSketch understands c1(sc(c2c1nsn2)) as N1SNc2cscc12. So it is not a bug in your code, unless you consider the fused thiadiazole ring aromatic. Best wishes, Michal On 5 December 2013 12:19, Greg Landrum wrote: > Hi Michal, > > On Thu, Dec 5, 2013 at 11:52 AM, Michal Krompiec > wrote: >> >> Hello, >> Is it possible to suppress kekulization by SDWriter? I get the >> following error on a call to SDWriter.write: >> ValueError: Sanitization error: Can't kekulize mol >> But some molecules can't be kekulized using RDKit's algorithm, even >> though they are otherwise 'correct'. > > > hmm, I'd love to see examples of those if you can share them. > >> >> I browsed the sources and it seems that SDWriter calls MolToMolBlock >> with the default parameter kekulize=True. Can this parameter be >> exposed in SDWriter? > > > Yep, I'll get it in for the next release. > > -greg > -- Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] SDWriter kekulizes by default
Hi Michal, On Thu, Dec 5, 2013 at 11:52 AM, Michal Krompiec wrote: > Hello, > Is it possible to suppress kekulization by SDWriter? I get the > following error on a call to SDWriter.write: > ValueError: Sanitization error: Can't kekulize mol > But some molecules can't be kekulized using RDKit's algorithm, even > though they are otherwise 'correct'. > hmm, I'd love to see examples of those if you can share them. > I browsed the sources and it seems that SDWriter calls MolToMolBlock > with the default parameter kekulize=True. Can this parameter be > exposed in SDWriter? > Yep, I'll get it in for the next release. -greg -- Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] SDWriter kekulizes by default
Hello, Is it possible to suppress kekulization by SDWriter? I get the following error on a call to SDWriter.write: ValueError: Sanitization error: Can't kekulize mol But some molecules can't be kekulized using RDKit's algorithm, even though they are otherwise 'correct'. I browsed the sources and it seems that SDWriter calls MolToMolBlock with the default parameter kekulize=True. Can this parameter be exposed in SDWriter? Thanks, Michal -- Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss