On 9 Aug 2012, at 07:05, Egon Willighagen <egon.willighagen@gmail.com> wrote:

E.g. http://en.wikipedia.org/wiki/Diborane

2-electron-3-atom bonds ...

It doesn't typically happen for carbon chemistry, but known chemistry.

Crazy!

Yes... unless Mark and Stefan forked that too…

Don't think so...

so please expect a further patch in the pull request.

Does cdk-sdg have a dependency on the cdk-standard? If so you should patch it to use Egon's suggestion:

Have a look at AtomContainerManipulator.removeHydrogensPreserveMultiplyBonded()
http://pele.farmbio.uu.se/nightly/api/org/openscience/cdk/tools/manipulator/AtomContainerManipulator.html#removeHydrogensPreserveMultiplyBonded(org.openscience.cdk.interfaces.IAtomContainer)

It might also be possible to remove the shallow copy as the manipulator method will shallow copy anyways (you may need an IMolecule though). The removeHydrogensPreserveMultiplyBonded method might need some small changes though. I doesn't suffer from the order problem of H-H-H but it's doing a linear search for each atom.

J