Validity of mock-IR spectra (was Avogadro for NWchem periodic calculations)

On Sun, Mar 29, 2009 at 8:32 PM, Jonas Baltrusaitis jasius_1@yahoo.com wrote:

What about the variety of other spectroscopic data calculated which I mentioned before? Can those easily be incorporated (selected from some drop down menu). What about other packages (NWChem, ORCA etc)

That’s something I wouldn’t mind working on – I’ll have to read up on
how to get the calculated data to transform into spectra, but it might
be a good idea at some point to move vibrationplot.* out of the
Vibrations extension and into a new spectra extension.

For now I’d just like to get the vibrational spectra cleaned up and
finalized (ish), then it should be a simple matter to extend it to
plot other spectra.

I’m thinking that the vibrationplot.* dialog would be the main dialog
for the extension, but as Jonas has suggested, put a drop down
menu in that contains the various types of spectra that can done with
the loaded molecule, and just update the plot when the selection changes.

While on the topic, does anyone know if there is a better way to
convert from the calculated intensities to transmittance than what
I’ve got right now? As it stands, transmittance is being calculated
via:

t = i / maxIntensity; // Normalize
t = 0.97 * t; // Keeps the peaks from extending to the
limits of the plot
t = 1 - t; // Simulate transmittance

where i is the intensity of the vibration.

Also, I’m toying with the idea of fitting a gaussian to the peaks. The
more I think about it, it seems like it would just be aesthetic and
rather useless. At worst, misleading even, since AFAIK there is no way
to get the width of the peak from the calculated data. Any thoughts?

A third question for the experienced folks (e.g. not me :slight_smile: ): Is there
a way to separate out the vibrations that are IR vs. Raman active? I
imagine it would be possible to go through and calculate dipole
moments and polarizability tensors for each mode, but that sounds like
a nuts&bolts-type job for the openbabel package. Does something like
this already exist?

Dave

On Mar 30, 2009, at 11:35 AM, David Lonie wrote:

be a good idea at some point to move vibrationplot.* out of the
Vibrations extension and into a new spectra extension.

Yes, this would be a good project – particularly if we have some ways
to load experimental spectra. :slight_smile:

I’m thinking that the vibrationplot.* dialog would be the main dialog
for the extension, but as Jonas has suggested, put a drop down
menu in that contains the various types of spectra that can done with
the loaded molecule, and just update the plot when the selection
changes.

There’s probably more than one way to do it. I’ve always thought that
we’d want multiple extensions – one for vibration, NMR, UV/Vis, etc.
since these are very different types of quantum calculations. Plus,
consider vibrations – you want to animate the vibrations, while you
might want to display orbitals for UV/Vis.

So I think the plot dialog would best live in the main libavogadro/src
directory to be used by multiple extensions.

While on the topic, does anyone know if there is a better way to
convert from the calculated intensities to transmittance than what
I’ve got right now?

That’s the definition of transmittance…

Also, I’m toying with the idea of fitting a gaussian to the peaks.

This is a useful feature for comparing to experimental data, where
there is some linewidth to the spectra. It’s particularly important
for UV/Vis, but also somewhat useful for IR. And who said “aesthetic”
was useless? You’ll probably want to make the Gaussian linewidth into
a parameter you can change (e.g., as a user, and for different types
of spectra). But IMHO, it’s a good feature to add.

At worst, misleading even, since AFAIK there is no way to get the
width of the peak from the calculated data. Any thoughts?

That’s correct, there’s no easy way of getting the width of the peak
from most vibrational calculations.

Is there a way to separate out the vibrations that are IR vs. Raman
active?

Almost all vibrational calculations simply consider IR activity. This
depends on the parameters passed to the QM program (e.g., Gaussian).
So Raman data is almost always missing, and not something which can be
easily reconstructed by Avogadro or Open Babel.

You do raise a good point, which is that I don’t have any example
files where Raman intensities are calculated. Could you file that as
an Open Babel bug before I forget?

Thanks,
-Geoff

On Mon, Mar 30, 2009 at 11:17 AM, Geoffrey Hutchison
geoff.hutchison@gmail.com wrote:

Plus, consider vibrations
– you want to animate the vibrations, while you might want to display
orbitals for UV/Vis.

Good point, I hadn’t considered the “extras” that go with each
spectra. Another way of handling this that I was considering is
changing the “customize” groupbox into a tab widget. Then we could add
tabs with calculation-specific options and features, like the table of
vibrations and animation options for IR and Raman. Maybe even move the
plot to a separate tab.

That’s the definition of transmittance…

Ok – just making sure :slight_smile: I wasn’t sure if they scaled linearly, or if
there was an maximum intensity value that correlated to 0%
transmittance that I should use to normalize instead of the max
intensity in the set.

And who said “aesthetic” was useless? You’ll
probably want to make the Gaussian linewidth into a parameter you can change
(e.g., as a user, and for different types of spectra). But IMHO, it’s a good
feature to add.

Useless in the sense that the linewidth would have been an arbitrarily
set parameter to make it look “more realistic”. But yes, adding the option
for the user to define the width would alleviate my concerns there.

Almost all vibrational calculations simply consider IR activity.

Good to know – I wasn’t aware of that.

You do raise a good point, which is that I don’t have any example files
where Raman intensities are calculated. Could you file that as an Open Babel
bug before I forget?

Will do.

Thanks,

Dave

David,

are you talking in general or for a specific package?

I hope to get the .exe version for windows of dev package then I would be able to answer all the questions below better

Jonas

— On Mon, 3/30/09, David Lonie loniedavid@gmail.com wrote:

From: David Lonie loniedavid@gmail.com
Subject: Validity of mock-IR spectra (was Avogadro for NWchem periodic calculations)
To: jasius_1@yahoo.com, avogadro-devel@lists.sourceforge.net
Date: Monday, March 30, 2009, 8:35 AM
On Sun, Mar 29, 2009 at 8:32 PM, Jonas Baltrusaitis
jasius_1@yahoo.com wrote:

What about the variety of other spectroscopic data
calculated which I mentioned before? Can those easily be
incorporated (selected from some drop down menu). What about
other packages (NWChem, ORCA etc)

That’s something I wouldn’t mind working on –
I’ll have to read up on
how to get the calculated data to transform into spectra,
but it might
be a good idea at some point to move vibrationplot.* out of
the
Vibrations extension and into a new spectra extension.

For now I’d just like to get the vibrational spectra
cleaned up and
finalized (ish), then it should be a simple matter to
extend it to
plot other spectra.

I’m thinking that the vibrationplot.* dialog would be
the main dialog
for the extension, but as Jonas has suggested, put a drop
down
menu in that contains the various types of spectra that can
done with
the loaded molecule, and just update the plot when the
selection changes.

While on the topic, does anyone know if there is a better
way to
convert from the calculated intensities to transmittance
than what
I’ve got right now? As it stands, transmittance is
being calculated
via:

t = i / maxIntensity; // Normalize
t = 0.97 * t; // Keeps the peaks from extending
to the
limits of the plot
t = 1 - t; // Simulate transmittance

where i is the intensity of the vibration.

Also, I’m toying with the idea of fitting a gaussian to
the peaks. The
more I think about it, it seems like it would just be
aesthetic and
rather useless. At worst, misleading even, since AFAIK
there is no way
to get the width of the peak from the calculated data. Any
thoughts?

A third question for the experienced folks (e.g. not me :slight_smile:
): Is there
a way to separate out the vibrations that are IR vs. Raman
active? I
imagine it would be possible to go through and calculate
dipole
moments and polarizability tensors for each mode, but that
sounds like
a nuts&bolts-type job for the openbabel package. Does
something like
this already exist?

Dave

Suggestions on spectral part:

  1. let user type in a number where it says scale. Have a total 5 digits after on scale (e.g. 0.9632, this is a common scaling factor)
  2. Add absorbance
  3. being able to change fonts
  4. being able to move words transmittance and wavenumber on the spectrum, also superscript Cm-1
  5. being able to add broadening to calculated peaks. this it very important. broaden them Gaussian or Lorentzian and change the FWHM of the broadening at will with a slider
  6. zoom onto particular region of the spectrum by dragging a mouse over the spectrum and zooming back to the full spectrum

I’ll revisit separation of IR and Raman. One thing is that in Gaussian you can request IR only be calculated. I should look at how the output is different from that when both IR and Raman are calculated

On a completely unrelated note, a customization of visualization should be added, e.g. user should be able to adjust colors and representation of atoms and save it as his/her own scheme. I come up on that a lot when one journal needs black and white images and the other in color. Saved customizable schemes would help a lot

Jonas

— On Mon, 3/30/09, David Lonie loniedavid@gmail.com wrote:

From: David Lonie loniedavid@gmail.com
Subject: Validity of mock-IR spectra (was Avogadro for NWchem periodic calculations)
To: jasius_1@yahoo.com, avogadro-devel@lists.sourceforge.net
Date: Monday, March 30, 2009, 8:35 AM
On Sun, Mar 29, 2009 at 8:32 PM, Jonas Baltrusaitis
jasius_1@yahoo.com wrote:

What about the variety of other spectroscopic data
calculated which I mentioned before? Can those easily be
incorporated (selected from some drop down menu). What about
other packages (NWChem, ORCA etc)

That’s something I wouldn’t mind working on –
I’ll have to read up on
how to get the calculated data to transform into spectra,
but it might
be a good idea at some point to move vibrationplot.* out of
the
Vibrations extension and into a new spectra extension.

For now I’d just like to get the vibrational spectra
cleaned up and
finalized (ish), then it should be a simple matter to
extend it to
plot other spectra.

I’m thinking that the vibrationplot.* dialog would be
the main dialog
for the extension, but as Jonas has suggested, put a drop
down
menu in that contains the various types of spectra that can
done with
the loaded molecule, and just update the plot when the
selection changes.

While on the topic, does anyone know if there is a better
way to
convert from the calculated intensities to transmittance
than what
I’ve got right now? As it stands, transmittance is
being calculated
via:

t = i / maxIntensity; // Normalize
t = 0.97 * t; // Keeps the peaks from extending
to the
limits of the plot
t = 1 - t; // Simulate transmittance

where i is the intensity of the vibration.

Also, I’m toying with the idea of fitting a gaussian to
the peaks. The
more I think about it, it seems like it would just be
aesthetic and
rather useless. At worst, misleading even, since AFAIK
there is no way
to get the width of the peak from the calculated data. Any
thoughts?

A third question for the experienced folks (e.g. not me :slight_smile:
): Is there
a way to separate out the vibrations that are IR vs. Raman
active? I
imagine it would be possible to go through and calculate
dipole
moments and polarizability tensors for each mode, but that
sounds like
a nuts&bolts-type job for the openbabel package. Does
something like
this already exist?

Dave

Hi all.

The IR plot is a great addition to Avogadro and I was very pleased
to discover it. The addition of Gaussian line shapes and Lorentzian
(for IR) would be a good idea: this is actually implemented in Molden.
The half-height width should be a user option.
It may be worth extending the display of vibration modes down to
0 wave number and provide an option to display part of the spectrum (?).

As for Raman spectrum, Geoff is wright: this is rarely used, but may be
useful for high symmetry molecules. It requires a special instruction
(freq=raman in gaussian) and lenthy calculations but may be interesting
for teaching purposes.

In general, wishes similar to Jonas’s ones that arrived while typing
this message.

And, off subject,

Félicitations à la maman et au papa !

Cheers,

Louis
Le 30 mars 09 à 18:38, David Lonie a écrit :

On Mon, Mar 30, 2009 at 11:17 AM, Geoffrey Hutchison
geoff.hutchison@gmail.com wrote:

Plus, consider vibrations
– you want to animate the vibrations, while you might want to
display
orbitals for UV/Vis.

Good point, I hadn’t considered the “extras” that go with each
spectra. Another way of handling this that I was considering is
changing the “customize” groupbox into a tab widget. Then we could add
tabs with calculation-specific options and features, like the table of
vibrations and animation options for IR and Raman. Maybe even move the
plot to a separate tab.

That’s the definition of transmittance…

Ok – just making sure :slight_smile: I wasn’t sure if they scaled linearly, or if
there was an maximum intensity value that correlated to 0%
transmittance that I should use to normalize instead of the max
intensity in the set.

And who said “aesthetic” was useless? You’ll
probably want to make the Gaussian linewidth into a parameter you
can change
(e.g., as a user, and for different types of spectra). But IMHO,
it’s a good
feature to add.

Useless in the sense that the linewidth would have been an arbitrarily
set parameter to make it look “more realistic”. But yes, adding the
option
for the user to define the width would alleviate my concerns there.

Almost all vibrational calculations simply consider IR activity.

Good to know – I wasn’t aware of that.

You do raise a good point, which is that I don’t have any example
files
where Raman intensities are calculated. Could you file that as an
Open Babel
bug before I forget?

Will do.

Thanks,

Dave



Avogadro-devel mailing list
Avogadro-devel@lists.sourceforge.net
avogadro-devel List Signup and Options

I too, will someday learn the utility of the “reply to all” feature in gmail :wink:

---------- Forwarded message ----------
From: David Lonie loniedavid@gmail.com
Date: Mon, Mar 30, 2009 at 1:30 PM
Subject: Re: Validity of mock-IR spectra (was Avogadro for NWchem
periodic calculations)
To: jasius_1@yahoo.com

On Mon, Mar 30, 2009 at 1:06 PM, Jonas Baltrusaitis jasius_1@yahoo.com wrote:

Suggestions on spectral part:

  1. let user type in a number where it says scale. Have a total 5 digits after on scale (e.g. 0.9632, this is a common scaling factor)

That is planned, I just haven’t gotten around to it yet :slight_smile:

  1. Add absorbance

Good idea.

  1. being able to change fonts

As in the actual font face, or other aspects? I think there is a
prefab’ed Qt dialog I can add in for this, QFontDialog or similar…

  1. being able to move words transmittance and wavenumber on the spectrum, also superscript Cm-1

This may be a little tricky – the plotting library doesn’t allow
movement of the labels right now. But since it’s an internal library
we can add this. I’ll put this on low priority – it seems like a lot
of work for little payoff, but it would be nice to have the
functionality there.

The cm-1 will be fixed in the next few days for sure.

  1. being able to add broadening to calculated peaks. this it very important. broaden them Gaussian or Lorentzian and change the FWHM of the broadening at will with a slider

We’ve been discussing this earlier. A slider isn’t a good idea – we’d
need one for each peak which would get obnoxious very quickly :slight_smile: I was
thinking of adding a table of the modes with a QSpinBox delegate to
adjust this peak-by-peak.

  1. zoom onto particular region of the spectrum by dragging a mouse over the spectrum and zooming back to the full spectrum

That would be handy. I’ll see how flexible the plotting widget is
about grabbing mouse events. It probably won’t be too hard.

I’ll revisit separation of IR and Raman. One thing is that in Gaussian you can request IR only be calculated. I should look at how the output is different from that when both IR and Raman are calculated

On a completely unrelated note, a customization of visualization should be added, e.g. user should be able to adjust colors and representation of atoms and save it as his/her own scheme. I come up on that a lot when one journal needs black and white images and the other in color. Saved customizable schemes would help a lot

I was talking with Marcus about persistent color settings earlier
today on IRC. The scheme idea is wonderful, and would make a good
goal, although it would also be lower priority. Right now, persistent
colors are more important. Maybe a goal for the big 1.0?

Thanks for the ideas – I need to make a consolidated TODO list somewhere! :slight_smile:

Dave

Daniel,

Not shure about it, but I think that line broadening is applied
to the whole spectrum, not individual absorbtions.
An approximation, but…

Louis

Le 30 mars 09 à 20:32, David Lonie a écrit :

  1. being able to add broadening to calculated peaks. this it very
    important. broaden them Gaussian or Lorentzian and change the FWHM
    of the broadening at will with a slider

We’ve been discussing this earlier. A slider isn’t a good idea – we’d
need one for each peak which would get obnoxious very quickly :slight_smile: I was
thinking of adding a table of the modes with a QSpinBox delegate to
adjust this peak-by-peak.

Dave



Avogadro-devel mailing list
Avogadro-devel@lists.sourceforge.net
avogadro-devel List Signup and Options

On Mar 30, 2009, at 2:32 PM, David Lonie wrote:

Thanks for the ideas – I need to make a consolidated TODO list
somewhere! :slight_smile:

http://avogadro.openmolecules.net/wiki/To_Do
http://avogadro.openmolecules.net/wiki/To_Do_For_1.0

I kindly suggest these features of the wiki for any and all TODO
lists. (This includes comments from Jonas and others.)

Cheers,
-Geoff

Not shure about it, but I think that line broadening is applied
to the whole spectrum, not individual absorbtions.
An approximation, but…

This is correct. It’s usually a decent approximation – and for those
who want a more accurate treatment, they usually have their own
utilities.

One “catch” is for UV/Vis. We usually plot these spectra against
wavelength (nm), but the broadening occurs in energy units (e.g., eV).
So the spectra accurately has a slightly asymmetric look.

Of course that’s when we actually get to a UV/Vis plot. :slight_smile:

Cheers,
-Geoff

P.S. Jonas… there has been discussion for a molecular orbital energy
“ladder” diagram. This would lead into your requests for density of
states diagrams too.

On Mon, Mar 30, 2009 at 12:17:35PM -0400, Geoffrey Hutchison wrote:

Almost all vibrational calculations simply consider IR activity. This
depends on the parameters passed to the QM program (e.g., Gaussian).
So Raman data is almost always missing, and not something which can be
easily reconstructed by Avogadro or Open Babel.

I think e.g. gaussian outputs Raman activity when it does not require
additional qm computations (i.e. using a method with analytical second
derivatives I guess).

This is the output of a CClH_3 calculation I just did:

#P GFPRINT POP=FULL HF/6-31G* opt=z-matrix freq
[…]
Harmonic frequencies (cm**-1), IR intensities (KM/Mole), Raman scattering
activities (A**4/AMU), depolarization ratios for plane and unpolarized
incident light, reduced masses (AMU), force constants (mDyne/A),
and normal coordinates:
1 2 3
A’ A" A’
Frequencies – 782.5879 1138.4107 1138.4108
Red. masses – 7.1001 1.1671 1.1671
Frc consts – 2.5620 0.8912 0.8912
IR Inten – 47.1738 2.3466 2.3466
Raman Activ – 24.0025 7.0850 7.0850
Depolar (P) – 0.3292 0.7500 0.7500
Depolar (U) – 0.4953 0.8571 0.8571
Atom AN X Y Z X Y Z X Y Z
1 6 0.00 0.61 0.00 0.00 0.00 -0.11 0.11 0.00 0.00
2 17 0.00 -0.25 0.00 0.00 0.00 0.02 -0.02 0.00 0.00
3 1 -0.05 0.43 0.00 0.00 0.00 0.27 -0.13 -0.75 0.00
4 1 0.03 0.43 -0.04 0.06 0.65 0.16 -0.23 0.38 -0.06
5 1 0.03 0.43 0.04 -0.06 -0.65 0.16 -0.23 0.38 0.06
4 5 6
A’ A" A’
Frequencies – 1538.1129 1628.9639 1628.9639
Red. masses – 1.1338 1.0556 1.0556
Frc consts – 1.5803 1.6503 1.6503
IR Inten – 30.1424 4.7603 4.7603
Raman Activ – 1.7427 16.5524 16.5524
Depolar (P) – 0.5637 0.7500 0.7500
Depolar (U) – 0.7210 0.8571 0.8571
Atom AN X Y Z X Y Z X Y Z
1 6 0.00 0.11 0.00 0.00 0.00 -0.07 0.07 0.00 0.00
2 17 0.00 0.01 0.00 0.00 0.00 0.00 0.00 0.00 0.00
3 1 -0.20 -0.54 0.00 0.00 0.00 0.74 0.15 0.31 0.00
4 1 0.10 -0.54 -0.17 0.38 -0.27 0.07 -0.52 -0.16 -0.38
5 1 0.10 -0.54 0.17 -0.38 0.27 0.07 -0.52 -0.16 0.38
7 8 9
A’ A’ A"
Frequencies – 3267.2017 3370.8838 3370.8838
Red. masses – 1.0272 1.1102 1.1102
Frc consts – 6.4603 7.4325 7.4325
IR Inten – 33.3233 9.8385 9.8385
Raman Activ – 113.5161 66.8044 66.8044
Depolar (P) – 0.0147 0.7500 0.7500
Depolar (U) – 0.0290 0.8571 0.8571
Atom AN X Y Z X Y Z X Y Z
1 6 0.00 0.04 0.00 0.10 0.00 0.00 0.00 0.00 0.10
2 17 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
3 1 0.55 -0.17 0.00 -0.78 0.24 0.00 0.00 0.00 0.02
4 1 -0.28 -0.17 0.48 -0.18 -0.12 0.34 0.34 0.21 -0.58
5 1 -0.28 -0.17 -0.48 -0.18 -0.12 -0.34 -0.34 -0.21 -0.58

Michael

This is the output of a CClH_3 calculation I just did:

Could you send me that file as an example for Avogadro? I’d like to
make sure the vibration import in Open Babel handles that properly.

Thanks,
-Geoff

On Tue, Mar 31, 2009 at 09:02:11PM -0400, Geoffrey Hutchison wrote:

This is the output of a CClH_3 calculation I just did:

Could you send me that file as an example for Avogadro? I’d like to
make sure the vibration import in Open Babel handles that properly.

It’s attached. Note that there might be at least two additional
problems:

  1. Gaussian has different levels of output verbosity, this file has “P”
    (though I am not sure it matters for vibrations)

  2. There is the freq=hpmodes parameter which (additonally I believe)
    outpus the normal modes with 4 or 5 digits.

Michael

On Thu, Apr 02, 2009 at 12:36:23AM +0200, Michael Banck wrote:

On Tue, Mar 31, 2009 at 09:02:11PM -0400, Geoffrey Hutchison wrote:

This is the output of a CClH_3 calculation I just did:

Could you send me that file as an example for Avogadro? I’d like to
make sure the vibration import in Open Babel handles that properly.

It’s attached. Note that there might be at least two additional
problems:

Hrm, looking at the gaussformat.cpp parsing code, I think there’s a
problem if Raman intensities are present, because then the output has
three more lines which are not taken into account in the code.

And indeed the vibrations are off when displayed in Avogadro (but
anyway, it’s awesome that Avo can now display vibrations from Gaussian!)

I’m going to file a bug about this so we don’t forget.

Michael

On Mon, Mar 30, 2009 at 1:47 PM, Geoffrey Hutchison
geoff.hutchison@gmail.com wrote:

One “catch” is for UV/Vis. We usually plot these spectra against wavelength
(nm), but the broadening occurs in energy units (e.g., eV). So the spectra
accurately has a slightly asymmetric look.

Of course that’s when we actually get to a UV/Vis plot. :slight_smile:

Is there support for UV/Vis data in openbabel? It’s still on the todo
list, but I’m not sure how uptodate that is…

Dave

On Apr 8, 2009, at 6:48 PM, David Lonie wrote:

Is there support for UV/Vis data in openbabel? It’s still on the todo
list, but I’m not sure how uptodate that is…

Actually, the issue would be to parse TDDFT or CIS or other excitation
method to create a predicted UV/Vis spectra. That doesn’t really need
Open Babel – you can have an extension which re-reads the output file
from Gaussian or whatever.

There’s a professor at Carnegie Mellon who has some code for this –
he wants to open the codebase, but it’s still a bit messy.

-Geoff