-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstrip3UX4a_HISTORY.txt
30 lines (26 loc) · 1.41 KB
/
strip3UX4a_HISTORY.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
### The following edits to chain A of 3ux4.pdb for Crick-helical paramaterization
## 8/4/15 Marco Mravic DeGrado Lab UCSF using PYTHON 2.7 interpreter (and ProDy package)
>>> inF = open( './3ux4a.pdb', 'rU')
>>> inF = inF.readlines()
>>> loopyList = ['22', '23', '24', '25','26','27', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '74', '75', '76', '98', '99', '100','101', '123', '124', '125', '126', '127', '128', '129', '130', '131', '132', '133', '134', '135', '136', '137', '138', '139', '140', '141', '162', '163', '164', '165', '166', '167', '168', '190' ,'191', '192', '193', '194', '195']
>>> from prody import *
>>> import numpy as np
>>> inPdb = parsePDB('./3ux4a.pdb')
>>> chainDict = {}
>>> helices = [ np.arange(1,22), np.arange(28,49), np.arange(77,98), np.arange(102,123), np.arange(142,162), np.arange(169,190) ]
>>> chains = ['A', 'B', 'C', 'D', 'E', 'F']
>>> for c,h in zip( chains, helices):
... for res in h:
... chainDict[str(res)] = c
>>> for i in inPdb.iterResidues():
... if str( i.getResnum() ) not in loopyList:
... i.setChids( chainDict[ str( i.getResnum() ) ] )
... print chainDict[str( i.getResnum() ) ]
>>> inF = open( './strip3UX4a.pdb', 'rU')
>>> inF = inF.readlines()
>>> outF = open( './3UX4a.pdb', 'w')
>>> for i in inF:
... if i[22:26].strip() in loopyList:
... continue
... else:
... outF.write(i)