Skip to content

Commit

Permalink
Atomic density formula working for two elements
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomDefaultUser committed Dec 2, 2024
1 parent a6ff4c3 commit ace21a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion mala/descriptors/atomic_density.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def __calculate_lammps(self, outdir, **kwargs):
array_shape=(nrows_ggrid, ncols_ggrid),
use_fp64=use_fp64,
)

self._clean_calculation(lmp, keep_logs)

# In comparison to bispectrum, the atomic density always returns
Expand Down Expand Up @@ -241,7 +242,7 @@ def __calculate_lammps(self, outdir, **kwargs):
self.grid_dimensions[2],
self.grid_dimensions[1],
self.grid_dimensions[0],
7,
6 + len(set(self._atoms.numbers)),
)
)
gaussian_descriptors_np = gaussian_descriptors_np.transpose(
Expand Down
4 changes: 2 additions & 2 deletions mala/targets/density.py
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ def __setup_total_energy_module(
t0 = time.perf_counter()
gaussian_descriptors = np.reshape(
gaussian_descriptors,
[number_of_gridpoints_mala, 1],
[number_of_gridpoints_mala, len(set(self.atoms.numbers))],
order="F",
)
reference_gaussian_descriptors = np.reshape(
Expand Down Expand Up @@ -1244,7 +1244,7 @@ def __setup_total_energy_module(
reference_gaussian_descriptors,
sigma,
number_of_gridpoints,
1,
len(set(self.atoms.numbers)),
)
barrier()
printout(
Expand Down

0 comments on commit ace21a9

Please sign in to comment.