@@ -112,7 +112,7 @@ def estimate_lddtG_from_lr(pred):
112
112
nres = len (pred )
113
113
P0mean = np .zeros (nres )
114
114
for i in range (nres ):
115
- n = 0
115
+ n = 0.001
116
116
for j in range (nres ):
117
117
if abs (i - j ) < 13 : continue ## up to 3 H turns
118
118
n += 1
@@ -134,7 +134,7 @@ def ULR_from_pred(pred,lddtG,
134
134
# non-local distance accuracy -- removes bias from helices
135
135
P0mean = np .zeros (nres )
136
136
for i in range (nres ):
137
- n = 0
137
+ n = 0.001
138
138
for j in range (nres ):
139
139
if abs (i - j ) < 13 : continue ## up to 3 H turns
140
140
n += 1
@@ -144,7 +144,7 @@ def ULR_from_pred(pred,lddtG,
144
144
#soften by 9-window sliding
145
145
P0mean_soft = np .zeros (nres )
146
146
for i in range (nres ):
147
- n = 0
147
+ n = 0.001
148
148
for k in range (- 4 ,5 ):
149
149
if i + k < 0 or i + k >= nres : continue
150
150
n += 1
@@ -252,6 +252,9 @@ def estogram2cst(dat,pdb,cencst,facst,
252
252
253
253
Q = np .mean (dat ['lddt' ])
254
254
dat = dat ['estogram' ]
255
+ if dat .shape [0 ] == len (DELTA ) and dat .shape [- 2 ] != len (DELTA ):
256
+ dat = np .transpose (dat )
257
+
255
258
nres = len (dat )
256
259
d0mtrx = utils .read_d0mtrx (pdb )
257
260
aas = utils .pdb2res (pdb )
@@ -414,9 +417,13 @@ def dat2ulr(pdb,pred,lddtG):
414
417
415
418
def main (npz ,pdb ,cstprefix = None ):
416
419
dat = np .load (npz )
420
+ esto = dat ['estogram' ]
421
+ if esto .shape [0 ] == len (DELTA ) and esto .shape [- 2 ] != len (DELTA ):
422
+ esto = np .transpose (esto )
423
+
417
424
lddtG = np .mean (dat ['lddt' ])
418
- lddtG_lr = estimate_lddtG_from_lr (dat [ 'estogram' ] ) #this is long-range-only lddt
419
- ulrs = dat2ulr (pdb ,dat [ 'estogram' ] ,lddtG_lr )
425
+ lddtG_lr = estimate_lddtG_from_lr (esto ) #this is long-range-only lddt
426
+ ulrs = dat2ulr (pdb ,esto ,lddtG_lr )
420
427
421
428
ulr_exharm ,weakcst ,refcorr = ([],'spline' ,True )
422
429
if '-exulr_from_harm' in sys .argv :
0 commit comments