Tuesday, July 31, 2007

innerbonds including funky colors

So, at breakfast I was thinking about the best way/place to draw the innerbonds. After drawing a simple Benzene-molecule on paper I figured there are a lot of triangles which could be usefull to figure out the right place.
It seems to me that the innerbonds should always inside the triangle with an atom in 2 corners and the center of the ring in the other, giving the green/green/black triangle in the picture. The pink lines are orthogonal to the outerbonds. It seems logical to place the innerbond parallel to the outerbond.
After working this out in the code it seems like the idea works, the picture shows how the current code shows some molecules.

The current code can be found on this page.
The distance between the innerbond and outerbond can be easily changed. I think the distance is fine on the left 2 molecules, and a little too high at the right one. What should the default distance be?

Monday, July 30, 2007

Rings: ellipse or circle?

How do you like your rings to displayed?

The first option with painting aromatic ring is whether to display the aromaticity as double bonding or as a ring.
If you want them to be displayed as a ring, then second question is whether to draw this as a ellipse or as a perfect circle.

In these pictures below you can see the two different options to show aromaticity inside for a Benzene ring.

Is one of them clearly better then the other, is it personal taste or doesn't it matter at all?

Tuesday, July 24, 2007


This new blog is about the project I'm working on for the Dutch summer of code, called 'Programmeerzomer', organised by the Holland Open Software Platform The project I'm working on is called JChemPaint, an editor for 2D molecular structures and part of the The Chemistry Development Kit (CDK). My goal for this project is to rewrite JChemPaint with proper Java2D and SWT support. Egon Willighagen is my mentor for this project.

Why doing this?
-Java2D isn't used efficiently in JChemPaint atm.
-Bioclipse is currently using the SWT_AWT bridge with proprietary code which is not working on virtual machines.

My Goals
-Getting known to CDk, Bioclipse and SWT.
-Checking out current JChemPaint code.
-Find out requirements for code to be replaced.
-Implementing SWT/Java2D in JchedmPaint
-Making chances at other places of the CDK (Renderer2D for example)
-Get new version of JChemPaint working in Bioclipse

25 June There was a meeting at which the project became clear.
12 July Presentation about the planning and goals
9 August Half-way meeting
20 September Endpresentation at the Holland Open 'Netwerkborrel'