Skip to content

Commit

Permalink
Merge pull request mala-project#605 from RandomDefaultUser/density_cu…
Browse files Browse the repository at this point in the history
…be_reading_fix

Made a density read from a cube file a 4D array as well
  • Loading branch information
RandomDefaultUser authored Nov 14, 2024
2 parents 5466623 + 273fb35 commit 9a45d69
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mala/targets/density.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ def read_from_cube(self, path, units="1/Bohr^3", **kwargs):
"We recommend to check and change the requested units"
)
data, meta = read_cube(path)
data = np.expand_dims(data, -1)
data *= self.convert_units(1, in_units=units)
self.density = data
self.grid_dimensions = list(np.shape(data)[0:3])
Expand Down

0 comments on commit 9a45d69

Please sign in to comment.