Avogadro: New Orbital Support and Gaussian Cube Format

So over the weekend I spent quite a lot of time hacking away at OpenBabel working on the Gaussian cube format support I needed to get working in order to be able to visualise electronic orbitals. The initial support was taken from Molekel but contained no error checking and it was not reading in the example cube file I had.

Thankfully a colleague pointed out a page with details on the Gaussian cube format and I used this as a basis to get it working in OpenBabel with better error checking and a more resilient tokenisation of the cube points. I made my first few commits to OpenBabel over the weekend and got at least simple Gaussian cube files loading that only contain one cube. More will follow I am sure.

Benzene HOMO orbitals visualised in Avogadro

After I got the file loading sorted a few more changes to Avogadro got me my first ever orbitals in Avogadro - the benzene HOMO! I believe the cube file came from the JMol test files. Geoff informed me that chemists for some reason see positive as blue and negative as red. That seemed very strange to me and I had initially put it the other way around. Growing up playing with electronics it seemed to me that positive should be red just as the wires in a circuit have a red positive... Other than that orbitals seemed to be working well and I was very pleased.

CH3Cl electrostatic potential visualised in Avogadro

Next I started to load up some other cube files I had been given as examples. I thought the above image of the electrostatic potential of CH3Cl looked very nice. When I showed Geoff he also liked it and we wondered if it had been visualised in this way before. I know normally the cube would be mapped onto the Van der Waals surface of a molecule.

Anyway I was pleased and also felt more productive as I now have my laptop back up and running and am developing on Gentoo again. It would be great to hear what other people think of this new support. I am already working on various improvements to the code and getting ready for another release of Avogadro!

Share Comments
comments powered by Disqus