From 86f2141c9c18b13ff22c269515cee5a5d1a95a9a Mon Sep 17 00:00:00 2001 From: ymyung Date: Tue, 11 Jan 2022 23:23:52 +1100 Subject: [PATCH] Fix for resnum with negative sign --- arpeggio.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arpeggio.py b/arpeggio.py index a88607c..a4263e1 100644 --- a/arpeggio.py +++ b/arpeggio.py @@ -209,6 +209,14 @@ def selection_parser(selection_list, atom_list): else: raise SelectionError(original_selection) + # ALLOW IF RESNUM STARTS WITH NEGATIVE SIGN + elif selection[1][0] == '-': + if selection[1][-1].isalpha(): + residue_number = int(selection[1][:-1]) + insertion_code = selection[1][-1] + else: + residue_number = int(selection[1]) + else: raise SelectionError(original_selection)