Yes, I understand that. I think the original workflow was first to establish the bonds ("single" by default) and then use valency information and hoping that the structure makes sense (no hydrogens missing), etc. The book has a follow up section on that second step. But I agree with your doubt about how well it works. I do not remember if I did a validation like we would do nowadays. It would be good to do something like this:
1. take 1000 random 3D structures from PubChem (add zeros according to taste) 2. remove all bond info, and keep only the 3D locations 3. rebond, add missing bond orders 4. compare. Now, this set would not really be a real world scenario. I could imagine one would like to repeat this for structures from COD too. Actually, maybe check out this paper: https://jcheminf.biomedcentral.com/articles/10.1186/s13321-018-0279-6 Egon On Wed, Jan 20, 2021 at 8:19 AM Andrew Dalke <da...@dalkescientific.com> wrote: > On Jan 20, 2021, at 07:37, Egon Willighagen <egon.willigha...@gmail.com> > wrote: > > Jmol had code to deduce bonds (for files which only have coordinates and > no bond info, like XYZ), which was ported at some point to the CDK. Here's > some example code: > https://egonw.github.io/cdkbook/missing.html#reconnecting-atoms > > Thanks for the pointer, Egon. > > I used your book when trying to figure this out. I was blocked because I > couldn't figure out how to then identify double and triple bonds. > > Eg, quoting part of RebondTool.java where it makes the bond: > > /** > * Returns the bond order for the bond. At this moment, it only returns > * 0 or 1, but not 2 or 3, or aromatic bond order. > */ > > private boolean isBonded(double covalentRadiusA, double > covalentRadiusB, double distance2) { > > > The book's example uses methane, which of course only has single bonds. > > Cheers, > > Andrew > da...@dalkescientific.com > > > -- Have you heard about Wikidata already? "Use Scholia and Wikidata to find scientific literature" is a new tutorial from my colleague Lauren Dupuis. https://laurendupuis.github.io/Scholia_tutorial/ ----- E.L. Willighagen Department of Bioinformatics - BiGCaT Maastricht University (http://www.bigcat.unimaas.nl/) Homepage: http://egonw.github.com/ Blog: http://chem-bla-ics.blogspot.com/ PubList: https://www.zotero.org/egonw ORCID: 0000-0001-7542-0286 <http://orcid.org/0000-0001-7542-0286> ImpactStory: https://impactstory.org/u/egonwillighagen
_______________________________________________ Cdk-user mailing list Cdk-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdk-user