Skip to content

Commit

Permalink
Bug nchains resclust (#332)
Browse files Browse the repository at this point in the history
* changed n_segments to u.chainIDs

* removed conversion to list

* clarified chain error message
  • Loading branch information
mgiulini authored Aug 31, 2023
1 parent 0ca68c2 commit ad9dd8e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/arctic3d/cli_resclust.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,14 @@ def main(input_arg, residue_list, chain, threshold, linkage, criterion):
unique_sorted_resids = u.resids
log.info(f"retrieved residues: {unique_sorted_resids}")

n_chains = u.n_segments
n_chains = len(set(u.chainIDs))

if n_chains != 1:
log.error(f"Number of consistent segments ({n_chains}) != 1.Aborting.")
log.error(
f"Number of consistent chains ({n_chains}) != 1."
"Please use the --chain option to specify the chain ID."
)

sys.exit(1)
if len(unique_sorted_resids) != 1:
# do the clustering
Expand Down

0 comments on commit ad9dd8e

Please sign in to comment.