Skip to content

Commit 7f4227e

Browse files
authored
Update domhmm.py
Apparently we run into problems with the order calculation (at least) if the resids are not sorted according to magnitude (e.g., ...20 20 20 15 15 15...).
1 parent 8fae55a commit 7f4227e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

domhmm/analysis/domhmm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def calc_order_parameter(chain):
8585
"""
8686

8787
# Separate the coordinates according to their residue index
88-
ridx = np.where(np.diff(chain.resids) > 0)[0] + 1
88+
ridx = np.where( np.abs(np.diff(chain.resids)) > 0)[0] + 1
8989

9090
pos = np.split(chain.positions, ridx)
9191

0 commit comments

Comments
 (0)