stfc / janus-core

Tools for machine learnt interatomic potentials
https://stfc.github.io/janus-core/
BSD 3-Clause "New" or "Revised" License
17 stars 8 forks source link

Save the final energy in geometry optimisation to log/summary #315

Closed RastislavTuranyi closed 1 month ago

RastislavTuranyi commented 1 month ago

Hi!

In my workflow using Janus CLI, I would like to access the final energy of the geometry optimisation for further processing. However, I wasn't able to find this value in either the geomopt-summary.yml file or the geomopt-log.yml file (I only found the final force). Would it be possible to save the final energy at the end of the geometry optimisation somewhere?

Thank you!

ElliottKasoar commented 1 month ago

Hi, thanks for the question!

The final energy of the optimized structure should be saved in the final structure file (e.g. NaCl-opt.extxyz), if you're using the default format (extxyz).

ajjackson commented 1 month ago

I note that the yaml file does already give the final force, which is useful for checking if the geometry optimisation finished as expected. The energy is useful for comparing multiple optimisations which may have reached different local minima.

What is the general design principle for which outputs are included in the summary?

ElliottKasoar commented 1 month ago

Very broadly, I see the summary yaml file as any useful, non-calculation-specific information, mostly focused on being able to re-run commands, but also summarising statistics of the overall command. Since it's unique to the CLI, it's not really designed to be relied on for anything needed for future processing or to inform physics decisions.

The log yaml file is broader in scope. It does captures physics settings, outputs etc.. However, it is designed to be optional, and I see it more as a tool for debugging than something I would extract physics values from.

Still, I discussed this with @alinelena yesterday and I think we agreed we probably could add the energy to the log alongside the final force.

ajjackson commented 1 month ago

That all sounds reasonable!