Closed Andrew-S-Rosen closed 1 month ago
The recent update in the codebase primarily involves a refinement in the calculate
function of the ase.py
module, where the method of accessing the free_energy
value has been enhanced. This change ensures that the value is fetched as a single scalar by utilizing the .item()
method, which helps in handling the data type more effectively and ensures consistency in the type of value returned.
File Path | Change Summary |
---|---|
.../ext/ase.py |
Modified access method for free_energy to use .item() for scalar extraction. |
Hi @Andrew-S-Rosen, thanks for your changes! Merged.
The
PESCalculator.results["free_energy"]
property should be formatted as afloat
but is currently formatted as anp.array(float)
. For instance,array(-4.0938973, dtype=float32)
. Since this is not the expected ASE type and because it is not iterable, this can cause a variety of unexpected problems. https://github.com/materialsvirtuallab/monty/issues/668 is just one example.I have ensured the
free_energy
property is returned as afloat
in this PR.