sc_bb_dep.py (pymol-v1.8.6.0.tar.bz2) | : | sc_bb_dep.py (pymol-v2.1.0.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 99 | skipping to change at line 99 | |||
for line in lines: | for line in lines: | |||
field = line.split() | field = line.split() | |||
len_field = len(field) | len_field = len(field) | |||
if len_field>11: | if len_field>11: | |||
resn = field[0] | resn = field[0] | |||
phi = int(field[1]) | phi = int(field[1]) | |||
psi = int(field[2]) | psi = int(field[2]) | |||
if (((psi==(60*(psi/60))) and (phi==(60*(phi/60)))) or | if (((psi==(60*(psi/60))) and (phi==(60*(phi/60)))) or | |||
((psi==(20*(psi/20))) and (phi==(20*(phi/20))) and (int(field[3] )>0)) or | ((psi==(20*(psi/20))) and (phi==(20*(phi/20))) and (int(field[3] )>0)) or | |||
((psi==(10*(psi/10))) and (phi==(10*(phi/10))) and (int(field[3] )>=250))): | ((psi==(10*(psi/10))) and (phi==(10*(phi/10))) and (int(field[3] )>=250))): | |||
if not dd.has_key((phi,psi)): | if (phi,psi) not in dd: | |||
# print phi,psi | # print phi,psi | |||
dd[(phi,psi)]=1 | dd[(phi,psi)]=1 | |||
key = (resn, phi, psi) | key = (resn, phi, psi) | |||
list = output.get(key,[]) | list = output.get(key,[]) | |||
fsum = float(field[8]) | fsum = float(field[8]) | |||
dict = {} | dict = {} | |||
if total[key]>0.0: | if total[key]>0.0: | |||
freq = fsum/total[key] | freq = fsum/total[key] | |||
else: | else: | |||
freq = 0.0 | freq = 0.0 | |||
if freq>0.01: | if freq>0.01: | |||
dict['FREQ'] = freq | dict['FREQ'] = freq | |||
len_chi = len(chi[resn].keys()) | len_chi = len(chi[resn]) | |||
if len_chi>0: | if len_chi>0: | |||
chi1 = float(field[9]) | chi1 = float(field[9]) | |||
dict[chi[resn]['1']] = chi1 | dict[chi[resn]['1']] = chi1 | |||
if len_chi>1: | if len_chi>1: | |||
chi2 = float(field[10]) | chi2 = float(field[10]) | |||
dict[chi[resn]['2']] = chi2 | dict[chi[resn]['2']] = chi2 | |||
if len_chi>2: | if len_chi>2: | |||
chi3 = float(field[11]) | chi3 = float(field[11]) | |||
dict[chi[resn]['3']] = chi3 | dict[chi[resn]['3']] = chi3 | |||
if len_chi>3: | if len_chi>3: | |||
chi4 = float(field[12]) | chi4 = float(field[12]) | |||
dict[chi[resn]['4']] = chi4 | dict[chi[resn]['4']] = chi4 | |||
list.append((freq,dict)) | list.append((freq,dict)) | |||
output[key] = list | output[key] = list | |||
# sort by priority | # sort by priority | |||
for key in output.keys(): | for key in list(output.keys()): | |||
list = output[key] | list = output[key] | |||
list.sort() | list.sort() | |||
list.reverse() | list.reverse() | |||
output[key] = map(lambda x:x[1],list) | output[key] = [x[1] for x in list] | |||
#for key in output.keys(): | #for key in output.keys(): | |||
# | # | |||
# if key[0] == 'HIS': | # if key[0] == 'HIS': | |||
# output[( 'HIE', ) + key[1:]] = output[key] | # output[( 'HIE', ) + key[1:]] = output[key] | |||
# output[( 'HID', ) + key[1:]] = output[key] | # output[( 'HID', ) + key[1:]] = output[key] | |||
# output[( 'HIP', ) + key[1:]] = output[key] | # output[( 'HIP', ) + key[1:]] = output[key] | |||
# elif key[0] == 'CYS': | # elif key[0] == 'CYS': | |||
# output[( 'CYX', ) + key[1:]] = output[key] | # output[( 'CYX', ) + key[1:]] = output[key] | |||
End of changes. 4 change blocks. | ||||
4 lines changed or deleted | 4 lines changed or added |