Skip to content

Commit

Permalink
Correct the DensityProfile limits
Browse files Browse the repository at this point in the history
  • Loading branch information
MBartkowiakSTFC committed Oct 15, 2024
1 parent 0abac6f commit dd68dd4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MDANSE/Src/MDANSE/Framework/Jobs/DensityProfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ def run_step(self, index):
conf = self.configuration["trajectory"]["instance"].configuration(frame_index)

box_coords = conf.to_box_coordinates()
box_coords = box_coords - np.floor(box_coords)

axis_index = self.configuration["axis"]["index"]
axis = conf.unit_cell.direct[axis_index, :]
Expand All @@ -146,7 +147,7 @@ def run_step(self, index):

for k, v in self._indexes_per_element.items():
h = np.histogram(
box_coords[v, axis_index], bins=self._n_bins, range=[-0.5, 0.5]
box_coords[v, axis_index], bins=self._n_bins, range=[0.0, 1.0]
)
dp_per_frame[k] = h[0]

Expand Down

0 comments on commit dd68dd4

Please sign in to comment.