Orbital / density plot in Avogadro

Hi,

I’m working on implementing some new features in my SCF code called
ERKALE ( http://erkale.googlecode.com ; new developers are warmly
welcome!). Related to this, I would like to visualize e.g. molecular
orbitals and electron densities. I currently intend to do this by
implementing output in Gaussian cube format.

To get started, I generated some cube files with Gaussian '09: one with
the electronic density, and one with the molecular orbitals of a water
molecule (PBEPBE aug-cc-pVTZ).

However, I am unable to visualize these with Avogadro. When I open the
cube file all I get is the molecule. I tried the Surfaces display type;
there the Orbital drop down menu doesn’t work (or it’s empty).
Google’ing wasn’t of any help either. I’m running Avogadro 1.0.3 on
Fedora 15.

Maybe someone could help me with my problem? The cube files are
available in compressed format at
http://theory.physics.helsinki.fi/~jzlehtol/avogadro/


Mr. Jussi Lehtola, M. Sc. Doctoral Student
jussi.lehtola@helsinki.fi Department of Physics
http://www.helsinki.fi/~jzlehtol University of Helsinki
Office phone: +358 9 191 50 632 Finland

Jussi Lehtola, FM Tohtorikoulutettava
jussi.lehtola@helsinki.fi Fysiikan laitos
http://www.helsinki.fi/~jzlehtol Helsingin Yliopisto
Työpuhelin: (0)9 191 50 632

orbitals and electron densities. I currently intend to do this by
implementing output in Gaussian cube format.

While Cube is an OK format, I strongly suggest using something like the Gaussian fchk or Molden file for output. These simply output the exponents/coefficients of basis sets and MO coefficients – so they’re MUCH more space and memory efficient than cube files. Avogadro can also generate the orbitals/surfaces to arbitrary resolution with these formats.

One limit to the fchk / Molden (or other MO files) is that Avogadro currently only has support for s, p, and d angular momenta. Suggestions on implementing higher-order basis functions would be most welcome.

To get started, I generated some cube files with Gaussian '09: one with
the electronic density, and one with the molecular orbitals of a water
molecule (PBEPBE aug-cc-pVTZ).

Actually, I can’t access those files – permission forbidden.

Thanks very much,
-Geoff

Can it be true? An Open Source DFT code for small molecules…!

  • Noel

On 12 July 2011 14:40, Jussi Lehtola jussi.lehtola@helsinki.fi wrote:

Hi,

I’m working on implementing some new features in my SCF code called
ERKALE ( http://erkale.googlecode.com ; new developers are warmly
welcome!). Related to this, I would like to visualize e.g. molecular
orbitals and electron densities. I currently intend to do this by
implementing output in Gaussian cube format.

To get started, I generated some cube files with Gaussian '09: one with
the electronic density, and one with the molecular orbitals of a water
molecule (PBEPBE aug-cc-pVTZ).

However, I am unable to visualize these with Avogadro. When I open the
cube file all I get is the molecule. I tried the Surfaces display type;
there the Orbital drop down menu doesn’t work (or it’s empty).
Google’ing wasn’t of any help either. I’m running Avogadro 1.0.3 on
Fedora 15.

Maybe someone could help me with my problem? The cube files are
available in compressed format at
http://theory.physics.helsinki.fi/~jzlehtol/avogadro/


Mr. Jussi Lehtola, M. Sc. Doctoral Student
jussi.lehtola@helsinki.fi Department of Physics
http://www.helsinki.fi/~jzlehtol University of Helsinki
Office phone: +358 9 191 50 632 Finland

Jussi Lehtola, FM Tohtorikoulutettava
jussi.lehtola@helsinki.fi Fysiikan laitos
http://www.helsinki.fi/~jzlehtol Helsingin Yliopisto
Työpuhelin: (0)9 191 50 632


All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2


Avogadro-Discuss mailing list
Avogadro-Discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/avogadro-discuss

On Tue, 12 Jul 2011 09:56:17 -0400
Geoffrey Hutchison geoff.hutchison@gmail.com wrote:

orbitals and electron densities. I currently intend to do this by
implementing output in Gaussian cube format.

While Cube is an OK format, I strongly suggest using something like
the Gaussian fchk or Molden file for output. These simply output the
exponents/coefficients of basis sets and MO coefficients – so
they’re MUCH more space and memory efficient than cube files.
Avogadro can also generate the orbitals/surfaces to arbitrary
resolution with these formats.

Yes, computing and storing values on a fixed grid is far from
efficient, but it is workable as a first step (and is anyway necessary
for electrostatic stuff?).

I haven’t implemented any checkpointing yet, since it’s a really
boring thing to do and I haven’t needed it so far. The computations
I have been running haven’t taken very long (up to a week or so).
Anyway, I’ll probably implement a trivial checkpoint scheme in the
near future, where I just save the MOs each iteration.

One limit to the fchk / Molden (or other MO files) is that Avogadro
currently only has support for s, p, and d angular momenta.
Suggestions on implementing higher-order basis functions would be
most welcome.

I’m guessing your problem is with solid harmonics, which get quite
messy beyond D. In this case you’ll probably be very interested in

which generates the necessary transformation matrices from a cartesian
basis to a spherical basis.

To get started, I generated some cube files with Gaussian '09: one
with the electronic density, and one with the molecular orbitals of
a water molecule (PBEPBE aug-cc-pVTZ).

Actually, I can’t access those files – permission forbidden.

Whoops, fixed.


Mr. Jussi Lehtola, M. Sc. Doctoral Student
jussi.lehtola@helsinki.fi Department of Physics
http://www.helsinki.fi/~jzlehtol University of Helsinki
Office phone: +358 9 191 50 632 Finland

Jussi Lehtola, FM Tohtorikoulutettava
jussi.lehtola@helsinki.fi Fysiikan laitos
http://www.helsinki.fi/~jzlehtol Helsingin Yliopisto
Työpuhelin: (0)9 191 50 632

On Tue, 12 Jul 2011 17:29:14 +0300
Jussi Lehtola jussi.lehtola@helsinki.fi wrote:

To get started, I generated some cube files with Gaussian '09: one
with the electronic density, and one with the molecular orbitals
of a water molecule (PBEPBE aug-cc-pVTZ).

Actually, I can’t access those files – permission forbidden.

Whoops, fixed.

Has anyone had a look at this yet…?


Mr. Jussi Lehtola, M. Sc. Doctoral Student
jussi.lehtola@helsinki.fi Department of Physics
http://www.helsinki.fi/~jzlehtol University of Helsinki
Office phone: +358 9 191 50 632 Finland

Jussi Lehtola, FM Tohtorikoulutettava
jussi.lehtola@helsinki.fi Fysiikan laitos
http://www.helsinki.fi/~jzlehtol Helsingin Yliopisto
Työpuhelin: (0)9 191 50 632

Has anyone had a look at this yet…?

Sorry, I’ve been swamped with a new baby and grant-writing. This weekend and next week, I’ll be doing some coding and it’s at the top of my list.

From what I could tell, the problem was with Open Babel, not Avogadro. So I’ll start there.

Best regards,
-Geoff

However, I am unable to visualize these with Avogadro. When I open the
cube file all I get is the molecule. I tried the Surfaces display type;
there the Orbital drop down menu doesn’t work (or it’s empty).

Oh… I realized my error when I looked at this bug last night. When you wrote, I did a quick check and thought there was some error.

There’s no error – you have to create the isosurface from the cube first. In early versions of Avogadro (0.8, for example) the display type would create isosurfaces itself. This lead to all sorts of bad crashes due to race conditions.

What I think we need to do going forward, is to have the display types enable/disable themselves depending on the data available. I think many people make this error.

So to visualize your cubes (BTW, Avogadro also reads .cube.gz files), open the file, go to the Extensions -> Create Surfaces command, pick the options you want:
http://avogadro.openmolecules.net/wiki/Create_Surfaces

Then you’ll see the isosurfaces!

Hope that helps and sorry for the long delay!
-Geoff

On Wed, 24 Aug 2011 10:21:16 -0400
Geoffrey Hutchison geoff.hutchison@gmail.com wrote:

However, I am unable to visualize these with Avogadro. When I open
the cube file all I get is the molecule. I tried the Surfaces
display type; there the Orbital drop down menu doesn’t work (or
it’s empty).

So to visualize your cubes (BTW, Avogadro also reads .cube.gz files),
open the file, go to the Extensions -> Create Surfaces command, pick
the options you want:
http://avogadro.openmolecules.net/wiki/Create_Surfaces

Then you’ll see the isosurfaces!

Great, thanks! I tried it out and it worked just fine.

I’m busy doing other things, so I won’t implement a cube output for
now. But I’ll probably come back to this at some later stage. I also
might consider writing a function for molden output, especially if you
add support for higher order basis functions.

But if any of you are interested, you are welcome to interface Avogadro
with my code, which should be even easier, since you already have some
GUI stuff implemented.

Even more so, since you won’t have to care at all about the specifics
of the evaluation of the values of density or orbitals, which is all
done by my code.

What you’d need to do first is write a wrapper that plugs in the atomic
coordinates, loads the basis set and gives the specifics of the
calculation, and then runs the calculation; the same things that are
done by my main executable. This is a few hundred lines of code.

From this you get the MO coefficients (and the density matrix if you
want it). Then you can use the combination of the basis set and the
MOs / density matrix to get values in any points you want to.


Mr. Jussi Lehtola, M. Sc. Doctoral Student
jussi.lehtola@helsinki.fi Department of Physics
http://www.helsinki.fi/~jzlehtol University of Helsinki
Office phone: +358 9 191 50 632 Finland

Jussi Lehtola, FM Tohtorikoulutettava
jussi.lehtola@helsinki.fi Fysiikan laitos
http://www.helsinki.fi/~jzlehtol Helsingin Yliopisto
Työpuhelin: (0)9 191 50 632