#115 A sort method for AtomContainerSets


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.


  • Egon Willighagen

    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.

  • Egon Willighagen

    Patch 0002 applied to master.

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

  • Egon Willighagen

    Applied 0003 to CDK-JChemPaint 2.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks