Support and discussions for Molcas and OpenMolcas users and developers
You are not logged in.
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".Pages: 1
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
No, but if you compiled with HDF5 support, you read energies and gradients from the .h5 files using the h5py python module.
Offline
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
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
Gradients are stored in the slapaf.h5 file (if you run SLAPAF).
Offline
I don't actually need to do a geometry update; does SLAPAF slow the code down significantly?
Offline
No, but it may be easier to actually read the gradient from the log file.
Offline
Pages: 1