Skip to content

Commit

Permalink
Change default units for read_from_cube functions
Browse files Browse the repository at this point in the history
  • Loading branch information
timcallow committed Oct 23, 2024
1 parent 47ab001 commit b5e6385
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mala/targets/density.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def from_numpy_array(cls, params, array, units="1/A^3"):
return return_dos

@classmethod
def from_cube_file(cls, params, path, units="1/A^3"):
def from_cube_file(cls, params, path, units="1/Bohr^3"):
"""
Create a Density calculator from a cube file.
Expand Down
4 changes: 2 additions & 2 deletions mala/targets/ldos.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def from_numpy_array(cls, params, array, units="1/(eV*A^3)"):

@classmethod
def from_cube_file(
cls, params, path_name_scheme, units="1/(eV*A^3)", use_memmap=None
cls, params, path_name_scheme, units="1/(Ry*Bohr^3)", use_memmap=None
):
"""
Create an LDOS calculator from multiple cube files.
Expand Down Expand Up @@ -463,7 +463,7 @@ def backconvert_units(array, out_units):
raise Exception("Unsupported unit for LDOS.")

def read_from_cube(
self, path_scheme, units="1/(eV*A^3)", use_memmap=None, **kwargs
self, path_scheme, units="1/(Ry*Bohr^3)", use_memmap=None, **kwargs
):
"""
Read the LDOS data from multiple cube files.
Expand Down

0 comments on commit b5e6385

Please sign in to comment.