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 2018-11-30 16:52:24

hrgrimsl
Member
Registered: 2018-07-16
Posts: 8

Obtaining Data from Log File

Is there a generally accepted way to pull energies/gradients from a file from within a python script?  Something similar to awk but that willl give me the gradient as a numpy array, and doesn't require me to know the exact preceding string?

Offline

#2 2018-11-30 17:19:48

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

Re: Obtaining Data from Log File

No, but if you compiled with HDF5 support, you read energies and gradients from the .h5 files using the h5py python module.

Offline

#3 2018-11-30 22:06:47

valera
Administrator
Registered: 2015-11-03
Posts: 127

Re: Obtaining Data from Log File

hrgrimsl,
the idea of internally markup-ed output was never fully implemented. but for energies you may rely on the fact that grep '^::' should spot them. The gradient is another matter - it is a big data, so stored either in runfile or in hdf5.

Offline

#4 2018-12-05 22:21:35

hrgrimsl
Member
Registered: 2018-07-16
Posts: 8

Re: Obtaining Data from Log File

Thank you both; it looks like the default is to throw gradients in the log file.  Is there a keyword in the input to specify that I want them in HDF5 form or  something?

EDIT:   I did compile with HDF5 support, and I'm getting an scf.h5 file when I run that calculation, just not Alaska.

Last edited by hrgrimsl (2018-12-05 22:57:18)

Offline

#5 2018-12-06 09:25:49

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

Re: Obtaining Data from Log File

Gradients are stored in the slapaf.h5 file (if you run SLAPAF).

Offline

#6 2018-12-06 15:16:01

hrgrimsl
Member
Registered: 2018-07-16
Posts: 8

Re: Obtaining Data from Log File

I don't actually need to do a geometry update; does SLAPAF slow the code down significantly?

Offline

#7 2018-12-06 16:17:38

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

Re: Obtaining Data from Log File

No, but it may be easier to actually read the gradient from the log file.

Offline

Board footer

Powered by FluxBB 1.5.11

Last refresh: Today 00:29:58