From 63949d57bb8545d9b30f61f29e56c0da6d875c34 Mon Sep 17 00:00:00 2001 From: Louis Smith Date: Fri, 12 Jul 2024 17:04:26 -0400 Subject: [PATCH 1/3] Trying to fix the angle=360 issue with a ceiling on values. --- enspara/geometry/rotamer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/enspara/geometry/rotamer.py b/enspara/geometry/rotamer.py index 3006c6873..4a2d0a234 100644 --- a/enspara/geometry/rotamer.py +++ b/enspara/geometry/rotamer.py @@ -14,6 +14,7 @@ def dihedral_angles(traj, dihedral_type): # transform so angles range from 0 to 360 instead of radians or -180 to 180 angles = np.rad2deg(angles) angles[np.where(angles < 0)] += 360 + angles[np.where(angles > 359.5)] = 359.5 n_angles = angles.shape[1] ref_atom_inds = np.zeros(n_angles) From 7a8aed40b08e96cd8a2b2520d00d7e35e897b0fa Mon Sep 17 00:00:00 2001 From: lgsmith Date: Mon, 15 Jul 2024 14:36:18 -0400 Subject: [PATCH 2/3] changed to just updating the 360. value. --- enspara/geometry/rotamer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enspara/geometry/rotamer.py b/enspara/geometry/rotamer.py index 4a2d0a234..99573a555 100644 --- a/enspara/geometry/rotamer.py +++ b/enspara/geometry/rotamer.py @@ -14,7 +14,7 @@ def dihedral_angles(traj, dihedral_type): # transform so angles range from 0 to 360 instead of radians or -180 to 180 angles = np.rad2deg(angles) angles[np.where(angles < 0)] += 360 - angles[np.where(angles > 359.5)] = 359.5 + angles[np.where(angles == 360)] = 0 n_angles = angles.shape[1] ref_atom_inds = np.zeros(n_angles) From cd7fc4a246019fa2756861d8d359cb6e288508ce Mon Sep 17 00:00:00 2001 From: lgsmith Date: Thu, 18 Jul 2024 16:12:46 -0400 Subject: [PATCH 3/3] Revert "changed to just updating the 360. value." This reverts commit 7a8aed40b08e96cd8a2b2520d00d7e35e897b0fa. --- enspara/geometry/rotamer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enspara/geometry/rotamer.py b/enspara/geometry/rotamer.py index 99573a555..4a2d0a234 100644 --- a/enspara/geometry/rotamer.py +++ b/enspara/geometry/rotamer.py @@ -14,7 +14,7 @@ def dihedral_angles(traj, dihedral_type): # transform so angles range from 0 to 360 instead of radians or -180 to 180 angles = np.rad2deg(angles) angles[np.where(angles < 0)] += 360 - angles[np.where(angles == 360)] = 0 + angles[np.where(angles > 359.5)] = 359.5 n_angles = angles.shape[1] ref_atom_inds = np.zeros(n_angles)