Molcas Forum

Support and discussions for Molcas and OpenMolcas users and developers

You are not logged in.

Announcement

Welcome to the Molcas forum.

Please note: The forum's URL has changed. The new URL is: https://molcasforum.univie.ac.at. Please update your bookmarks!

You can choose an avatar and change the default style by going to "Profile" → "Personality" or "Display".

#1 2020-08-13 17:28:44

Sarah
Member
Registered: 2016-08-01
Posts: 40

Hessian from h5 files

Dear Molcas team,

I have calculated the Hessian of a diatomic molecule using OpenMolcas and I think it is stored in filename-Clf.slapaf.h5 file. When printing the hessian I get 21 numbers for a two atomic molecule.

1. This is how I print the hessian:

filename = 'file.slapaf.h5'
f = h5py.File(filename, 'r')
np.savetxt('datafile.txt', f['HESSIAN'])
f.close()

2. How can I sort the hessian data? what would be the array shape for a diatomic molecule?

Thanks,
Sarah

Offline

#2 2020-08-13 17:57:36

Ignacio
Administrator
From: Uppsala
Registered: 2015-11-03
Posts: 1,012

Re: Hessian from h5 files

2 atoms is 2*3 = 6 Cartesian coordinates. The Hessian is a symmetric 6×6 matrix, but only the unique elements are stored, that is 6*(6+1)/2 = 21. Now, the order is either (1,1), (2,1), (2,2), (3,1), (3,2), (3,3), (4,1)... or (1,1), (2,1), (3,1), (4,1), (5,1), (6,1), (2,2). It should be relatively straightforward to find out which one it is, if you know the orientation of the molecule (I think it's the first). And the Cartesian coordinates are ordered: atom1 x, y, z, atom2 x, y, z

Offline

#3 2020-08-14 14:37:05

Sarah
Member
Registered: 2016-08-01
Posts: 40

Re: Hessian from h5 files

Thanks,

I know.. I am missing some background knowledge here but would be thankful if you can help me understand this. 

1. How can I know the orientation of the molecule?
2. How the orientation helps me realize the order?
3. Is there a Python command that reshapes the hessian, in say the first order?

4. Or maybe you could recommend a reference that can help me understand how it works.

Thanks you,
Sarah

Offline

#4 2020-08-14 18:38:26

Ignacio
Administrator
From: Uppsala
Registered: 2015-11-03
Posts: 1,012

Re: Hessian from h5 files

You know the orientation from the coordinates. If it's a diatomic, it will typically be oriented along the x, y or z axis. If it's oriented along the x axis, for example, you can expect  the x-x components of the Hessian to be the largest, and in the diagonal that corresponds to elements (1,1) and (4,4), which should be equal. Element (1,1) is always the first, but depending on the order the position of element (4,4) would change, and finding where it is will tell you which order is the correct one.

Offline

Board footer

Powered by FluxBB 1.5.11

Last refresh: Today 21:40:27