Re: [Rdkit-discuss] Round-tripping Aromatic (And Radical) N using SMILES - Fails
On Thu, Feb 19, 2015 at 12:37 PM, JP wrote: > > The round trip SMILES -> RDKit Mol -> SMILES -> RDKit Mol fails, but I > don't think it should (if it was successfully instanced to an RDKit > molecule the first time, converting it to SMILES and back to the molecule > should not 'break' my molecule subsequently). Note that the non-radical > versions of the molecules work. > > Here's my notebook explaining the problem: http://goo.gl/Ma9klv > > Perhaps, bug #340 ( https://github.com/rdkit/rdkit/issues/340 ) is more > general than first thought, and doesn't apply only to CTABs? This somehow > looks related. > I think it was more directly this one: https://github.com/rdkit/rdkit/issues/432 but there is certainly a connection to #340. The problem is that there is no general way for the RDKit to know how to deal with a radical N when considering aromaticity from SMILES. The examples of the indoles you have in your notebook are theoretically manageable, but the tetrazole example that Riccardo found is pretty much impossible. Dealing with the SMILES c1[n]nnn1 seems easy enough: we just assign a radical to the nitrogen with the square brackets. But what should we do with the perfectly legal SMILES c1[n][n][n][n]1 ? How many of the nitrogens should get radicals? Which ones? It ends up being the same as the "which heteroatom gets the implicit H?" problem we all know from things like c1nncc1 and c1c1. The fix I have implemented is to no longer consider heteroatoms with radicals as candidates for aromaticity. Your example now produces: In [2]: mol2 = Chem.MolFromSmiles('C1=C2[N]C=CC2=CC=C1') In [3]: Chem.MolToSmiles(mol2) Out[3]: 'C1=Cc2c2[N]1' I added a couple examples to the documentation to explain this: https://github.com/rdkit/rdkit/blob/master/Docs/Book/RDKit_Book.rst -greg -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] SimilarityMaps
Hi Serenia, Yep that fixed it! Thanks! Matthew On Fri, Feb 20, 2015 at 10:59 PM, Sereina wrote: > Hi Matthew, > > I think this is related to a previous mailing list item ( > https://www.mail-archive.com/rdkit-discuss@lists.sourceforge.net/msg03528.html > ). > > It has probably something to do with the bounding boxes (they get scaled > during the map generation process). In the previous case it was enough to > set bbox_inches='tight' when saving the image to solve the problem. > > I hope this helps. > > Best, > Sereina > > > On 21 Feb 2015, at 02:28, Matthew Lardy wrote: > > Hi, > > I am having an issue with the python similaritymaps. I am only seeing a > fraction of the molecule. Anyone else have this issue? > > Thanks in advance! > Matthew > > -- > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > > > -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss