#115 A sort method for AtomContainerSets

Mark Rijnbeek

Patch reason: JChempaint currently has peculiar beahviour when displaying a bucky ball or any complex molecule with multiple rings.
What happens is that the double bonds can 'jump' when you hover over the structure.
Under the hood, this is caused by the re-rendering of the structure using a non predictable order of the rings created by SSSR class.

The patch fixes this: before rendering, BasicBondGenerator forces a predictable order of the atom containers in the ringset, by sorting the atom containers using a comparator that in its turn uses the 2d centers to sort on.


  • Patch 0001 looks fine (it guess the scope is not really just limited to JChemPaint, which the JavaDoc claims? And new tests should be added to the module suite too.) Applied 0001 to master.

  • Patch 0002 applied to master.

    Arvid should have looked at 0003 by now, and should hit jcp-prim next week.

  • Applied 0003 to CDK-JChemPaint 2.