Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when reading the total energies of a Gaussian16 optimization fchk #377

Open
mbocus opened this issue Mar 7, 2025 · 4 comments
Open
Assignees

Comments

@mbocus
Copy link

mbocus commented Mar 7, 2025

Hi all,

I was reading the energies from a simple water optimization with Gaussian16 using:

[f.energy for f in load_many("out.fchk", fmt="fchk")]

I noticed, however, that I do not get the correct results since in the fchk the line

Opt point       1 Results for each geome   R   N=           6

Is preceded by

Optimization Reference Energy              R     -7.600000000000000E+01

So the energy that iodata reads when looking for 1 Results for each geome (in iodata.formats.fchk.py) is actually not the total energy but the difference with this reference energy. I am not sure if/when this was introduced in Gaussian16, I have noticed it is present in both revision B and C but I do not have information on older version. I could also not really find any information online.

The full fchk is attached. Do you think it'd be possible to look for this reference energy and add it to the ones from the results (or, of course, let me know if I have overlooked something)?

Thanks in advance,
Massimo

input.fchk.txt

@PaulWAyers
Copy link
Member

I'm not sure exactly what has gone wrong here. It is possible that we didn't implement tests for MP2 or frozen-core MP2 calculations like this one seems to be. To fix this it will be important to determine if this is specific to MP2 or universal in G16 (I don't think so, but I'm not sure; we usually run a single point after our geometry optimizations in my group so I'm not sure we would have seen this error) and, if not, how to engineer a robust solution.

@mbocus
Copy link
Author

mbocus commented Mar 8, 2025

Thanks a lot for the swift response and the valid point. I have tried to run the same optimization with some other methods (HF, UHF, B3LYP, PBEPBE) and in all cases the reference energy is there. So it seems to be pretty generic. I have searched a bit more about this but I do still not find much on the Gaussian website or online.

@tovrstra
Copy link
Member

tovrstra commented Mar 9, 2025

Thanks for bringing this up @mbocus.

The FCHK files in the IOData tests do not have a Optimization Reference Energy field, so this is probably something introduced in G16. We can look for this field and, if present, correct the energies from Results for each geome.

Just to make sure it works correctly in all cases, can you also generate an FCHK file of a relaxed scan with a few points (to keep the file small)? It is not clear whether such a file will contain multiple reference energies, or just one for all points. Thanks!

@mbocus
Copy link
Author

mbocus commented Mar 10, 2025

Thanks a lot for the suggestion @tovrstra!
I have performed one calculation per type (scf, opt, freq and scan) on a methanol molecule. The fchk are in attachment. From what I can see, scf and freq only return one energy value after the sfc. opt behaves as mentioned before while scan prints first the reference energy and then, for each scan point, the Results for each geome (all referred to the reference energy).
I hope this helps, do not hesitate to let me know if there is any additional test I can perform!

freq.fchk.txt
scan.fchk.txt
scf.fchk.txt
opt.fchk.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants