Comments on using cclib to open files for Avogadro

I’ve been trying to writing a plugin to use cclib to open files for
Avogadro. The technical part works fine. But I have some problems…

(1) The Avogadro Molecule API doesn’t provide enough access to the
OBMol. In particular, I can’t set or get vibration data (or electronic
transition data - but I’m not sure whether this is already present in
OB) - which means that you can’t use cclib to parse frequencies or
write a Python plugin to plot them.

(2) The animation extension should plot conformers. This would open up
a whole range of uses of Avogadro: geometry optimisation viewing being
the principal one.

(3) The Python console is quite good but it should print out what an
expression evaluates to. For example…

1 + 1
2
This causes me some pain, particularly as I am always typing
dir(whatever) to figure out the methods of an object.

  • Noel

On Oct 28, 2009, at 6:16 AM, Noel O’Boyle wrote:

(1) The Avogadro Molecule API doesn’t provide enough access to the
OBMol. In particular, I can’t set or get vibration data (or electronic
transition data - but I’m not sure whether this is already present in
OB) - which means that you can’t use cclib to parse frequencies or
write a Python plugin to plot them.

The vibration data is available in OBMol, although I don’t remember if
Avogadro caches it for the internal Molecule::OBMol call.

Nevertheless, if you want to use cclib, you’re probably better off
grabbing the filename and re-parsing the file through cclib. :slight_smile:

(2) The animation extension should plot conformers. This would open up
a whole range of uses of Avogadro: geometry optimisation viewing being
the principal one.

Tim can correct me, but I believe the animation extension does exactly
that – animate conformers.

Most (if not all) OB formats don’t read individual steps in a geometry
optimization.

(3) The Python console is quite good but it should print out what an
expression evaluates to. For example…

1 + 1
2

That would be great. Can you provide any tips as to how to do that?
I’ve poked through the embedded Python documentation, but can’t figure
out how to make an embedded console operate like interactive Python.

Thanks!
-Geoff

2009/10/28 Geoffrey Hutchison geoff.hutchison@gmail.com:

On Oct 28, 2009, at 6:16 AM, Noel O’Boyle wrote:

(1) The Avogadro Molecule API doesn’t provide enough access to the
OBMol. In particular, I can’t set or get vibration data (or electronic
transition data - but I’m not sure whether this is already present in
OB) - which means that you can’t use cclib to parse frequencies or
write a Python plugin to plot them.

The vibration data is available in OBMol, although I don’t remember if
Avogadro caches it for the internal Molecule::OBMol call.

Nevertheless, if you want to use cclib, you’re probably better off grabbing
the filename and re-parsing the file through cclib. :slight_smile:

Like I said in my earlier email, the Python interface doesn’t have
access to the underlying OBMol wrapped by the Avogadro::Molecule, so
if it’s not available from the Molecule API, there’s no way to get at
it or set it.

(2) The animation extension should plot conformers. This would open up
a whole range of uses of Avogadro: geometry optimisation viewing being
the principal one.

Tim can correct me, but I believe the animation extension does exactly that
– animate conformers.

Most (if not all) OB formats don’t read individual steps in a geometry
optimization.

Ah ok - I didn’t realise this. I’ll try creating conformers, as we
have this info in cclib.

(3) The Python console is quite good but it should print out what an
expression evaluates to. For example…

1 + 1

2

That would be great. Can you provide any tips as to how to do that? I’ve
poked through the embedded Python documentation, but can’t figure out how to
make an embedded console operate like interactive Python.

Sorry - I haven’t a clue. There is an application called IDLE whose
interactive console may provide inspiration.

Thanks!
-Geoff