On 12/14/2017 02:10 PM, Greg Landrum wrote: > > On Thu, Dec 14, 2017 at 4:22 AM, Francois BERENGER > <beren...@bioreg.kyushu-u.ac.jp <mailto:beren...@bioreg.kyushu-u.ac.jp>> > wrote: > > On 12/14/2017 05:15 AM, Sundar wrote: > > Hi RDkit users, > > > > I encounter following sanitize issue while I was trying to load an SD > > file using > > Chem.SDMolSupplier('lig.sdf') > > > > Explicit valence for atom # 16 N, 4, is greater than permitted > > ERROR: Could not sanitize molecule ending on line 3145 > > I also encounter this exact error sometimes. > > Is there a way to tell rdkit to automatically correct this atom type? > > > The code currently only automatically corrects cases where it's really, > really obvious what the correction should be, like C-N(=O)=O -> > C-[N+](=O)[O-].
Where is this in the code? I might have a look one day. > If there are additional commonly "misdrawn" functional groups, it would > be straightforward to add them > > I guess that sanitization failure means the molecule > goes to the trash, which is terrible when there are so few molecules to > learn from. > > The philosophy taken in the RDKit is that it's better to have a bad > structure be rejected than it is to try and learn from it. > If you disagree with this, it is pretty easy to switch off the > sanitization checks and keep the bad molecules. I understand. I also guess unsanitized molecules would make some things crash, just later. > -greg > > > > > > The molecule RDkit complains about has a charged N atom. > > How do I sanitize it to fix these errors without losing its charge and > > 3D coordinates? > > Or how to disregard all these errors and get all the molecules read with > > nothing missing? > > > > Thanks, > > Sundar > > > > > > > > > > > > ------------------------------------------------------------------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > > > > > > _______________________________________________ > > Rdkit-discuss mailing list > > Rdkit-discuss@lists.sourceforge.net > <mailto:Rdkit-discuss@lists.sourceforge.net> > > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > <https://lists.sourceforge.net/lists/listinfo/rdkit-discuss> > > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > <mailto:Rdkit-discuss@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > <https://lists.sourceforge.net/lists/listinfo/rdkit-discuss> > > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss