You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In mala's DataConverter class, in which the LDOS is processed from QE outputs, the default target_units=None in the add_snapshot function. This means that MALA performs no unit conversion by default on the QE outputs, which are in atomic units.
On the other hand, the default units in MALA are eV and Angstrom. For example, in the read_from_numpy_file function of of the LDOS class, the default units units="1/(eV*A^3)".
So if a user runs a QE calculation, processes the output from that using the DataConverter class, and then performs calculations on the LDOS using the LDOS class, there will be a units inconsistency and energies will be wrong.
Although it's possible to override the default units in either the DataConverter or LDOS classes, I strongly think that, if a user 'does nothing', i.e. uses everywhere defaults, then these should align to produce a consistent result. I would propose to account for this in the DataConverter class by making the default target_units="1/(Ry*Bohr^3)".
What do you think @RandomDefaultUser? If you agree I'll make a PR to address this issue.
The text was updated successfully, but these errors were encountered:
Thanks for pointing this out @timcallow, you are absolutely right, the default settings should agree.
I am wondering though if instead of changing the default unit, we should implement an internal check mapping the unit to the specified target file. I.e., if it is from a cube file, we can (at least at the moment) safely assume it originated from QE. And therefore automatically assign the correct units. At any rate, feel free to create a PR to address the issue, that would be greatly appreciated!
In mala's
DataConverter
class, in which the LDOS is processed from QE outputs, the defaulttarget_units=None
in theadd_snapshot
function. This means that MALA performs no unit conversion by default on the QE outputs, which are in atomic units.On the other hand, the default units in MALA are eV and Angstrom. For example, in the
read_from_numpy_file
function of of theLDOS
class, the default unitsunits="1/(eV*A^3)"
.So if a user runs a QE calculation, processes the output from that using the
DataConverter
class, and then performs calculations on the LDOS using theLDOS
class, there will be a units inconsistency and energies will be wrong.Although it's possible to override the default units in either the
DataConverter
orLDOS
classes, I strongly think that, if a user 'does nothing', i.e. uses everywhere defaults, then these should align to produce a consistent result. I would propose to account for this in theDataConverter
class by making the defaulttarget_units="1/(Ry*Bohr^3)"
.What do you think @RandomDefaultUser? If you agree I'll make a PR to address this issue.
The text was updated successfully, but these errors were encountered: