ihmwg / python-ihm

Python package for handling IHM mmCIF and BinaryCIF files
MIT License
14 stars 7 forks source link

Support auth_seq_id #9

Closed benmwebb closed 6 years ago

benmwebb commented 6 years ago

Currently we assume that the author-provided seq_id is the same as the internal 1-based consecutive numbering and provide no mechanism to change it. This is true for all currently-deposited IMP models but is not true for Nup133 or some HADDOCK models. Provide a mechanism to allow the user to number residues. The simplest way to do this would be for AsymUnit to take an auth_seq_id parameter which could be either an int (add it to each seq_id to get auth_seq_id) or a mapping (list or dict; auth_seq_id = mapping[seq_id]).

benmwebb commented 6 years ago

Note that this may be the most appropriate place to add insertion codes too - the provided mapping could return a tuple of (auth_seq_id, insertion_code).