cniehaus (cniehaus) wrote,
cniehaus
cniehaus

Kalzium @ 3D, Part III

Benoit and myself improved the 3D-feature again. For all "chemistry" we are using OpenBabel. Well, we quickly learned that OpenBabel2.0 didn't provide everything what we needed. So in true OpenSource-spirit we simply hacked OpenBabel ;-) Well, as a result OpenBabel now supports an better way to calculate the angles between three atoms, has a more precise and less error-prone math-code for doings specific calculations and can calculate the volume of so called Unit Cells.
With all that done, Kalzium now requires OpenBabel 2.1-preview as of yesterday ;-) But As OpenBabel 2.1 will be released in two or three month that shouldn't be a problem, the 3D-feature is not compiled of OpenBabel 2.1 is not found anyway.

Ok, this is the result of our hacking:

Free Image Hosting at www.ImageShack.us

As you can see the molecule is on the right, you can simply rotate it with your mouse. On the left you have an overview over all atoms in the molecule. If you select an atom there it will be highlighted in the 3D-view (see the blue blur around two atoms?). The number in the QTreeWidget is the internal ID of the atom. I am not sure what information to put into that treewidget. If you have ideas please comment to this blog or write a mail to kalzium AT kde DOT org. That is of valid for the whole GUI. Any idea might lead to a better GUI!
Currently the widget supports for different "designs" of the rendered molecule. I GIMP'ed a little to show you all in one view:

Free Image Hosting at www.ImageShack.us

The molecule you see is 7H-Purin-6-amine and includes some double bonds. Again: Do you see room for improvements? If so, tell us :-)

PS: The rendering was done without hardware acceleration but is very fast
PPS: This is the lowest of three quality levels. The best looks much better but I forgot to switch to it when doing the screenies
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 101 comments
Previous
← Ctrl ← Alt
Next
Ctrl → Alt →
Previous
← Ctrl ← Alt
Next
Ctrl → Alt →