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




_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to