allpy
changeset 757:08d24e214709
auto_pdb(): fix regular expression to distinguish resi_start from model
Previously "1jcc_A/1:2" was resolved as model="1".
Currently it is fixed.
Broken backwards-compatibility: model can not be separated with "/"
from pdb code and chain.
see #77
author | boris (kodomo) <bnagaev@gmail.com> |
---|---|
date | Tue, 12 Jul 2011 14:00:17 +0400 |
parents | 31a76e12258d |
children | 5f0c15a3cbca |
files | allpy/structure.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line diff
1.1 --- a/allpy/structure.py Tue Jul 12 00:48:56 2011 +0200 1.2 +++ b/allpy/structure.py Tue Jul 12 14:00:17 2011 +0400 1.3 @@ -27,7 +27,7 @@ 1.4 1.5 1.6 # for pdb-codes 1.7 -re1 = re.compile(r"(^|[^a-z0-9])(?P<code>[0-9][0-9a-z]{3})([^a-z0-9](?P<chain>[0-9a-z ]?)([^a-z0-9](?P<model>[0-9]{1,3}))?)?(/(?P<resi_begin>-?\d+):(?P<resi_end>-?\d+))?", re.I) 1.8 +re1 = re.compile(r"(^|[^a-z0-9])(?P<code>[0-9][0-9a-z]{3})([^a-z0-9](?P<chain>[0-9a-z ]?)([^a-z0-9/](?P<model>[0-9]{1,3}))?)?(/(?P<resi_begin>-?\d+):(?P<resi_end>-?\d+))?", re.I) 1.9 1.10 def pdb_id_parse(ID): 1.11 match = re1.search(ID)