Skip to content

Commit

Permalink
Fix Dihedral box (#198)
Browse files Browse the repository at this point in the history
* add box to calc_dihedrals so that PBC are always taken into account
  • Loading branch information
ALescoulie authored Sep 14, 2021
1 parent 5628473 commit 9810b74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mdpow/analysis/dihedral.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ def _single_frame(self):
cord2 = np.concatenate(tuple([cord_dict2[k] for k in key_list]))
cord3 = np.concatenate(tuple([cord_dict3[k] for k in key_list]))
cord4 = np.concatenate(tuple([cord_dict4[k] for k in key_list]))
angle = calc_dihedrals(cord1, cord2, cord3, cord4)
angle = calc_dihedrals(cord1, cord2, cord3, cord4,
box=self.g1[key_list[0]].dimensions)
angle = np.rad2deg(angle)
for i in range(len(self.names)):
result = list(key_list[i]) + [self._ts.time, angle[i]]
Expand Down

0 comments on commit 9810b74

Please sign in to comment.