Rosetta
Functions | Variables
gen_env_dep_orient_decompose.m File Reference

Functions

end end get env env_index (i)
 
 num_res_env (res_index(i), env_index(i))
 
 if (ai >NAA) continue end for j
 
 if (aj >NAA) continue end if(env_index(i)
 
 surf_surf_th1 (ai, aj, :, :)+
 
i, j, :, : th1_table ()
 
 surf_core_th1 (ai, aj, :, :)+
 
end else if (env_index(j)==1) %c-s core_surf_th1(ai
 
end else core_surf_th1 (ai, aj, :, :)+
 
 core_core_th1 (ai, aj, :, :)+
 
id beta ()
 
surf_surf_th1, NAA pre_fill_dfire_2D ()
 
 surf_surf_th1 (i, j,:,:)
 
 surf_core_th1 (i, j,:,:)
 
 core_surf_th1 (i, j,:,:)
 
 core_core_th1 (i, j,:,:)
 
 if (i!=j) % surf_surf_th1(j
 
 surf_core_th1 (j, i,:,:)
 
 core_surf_th1 (j, i,:,:)
 
 core_core_th1 (j, i,:,:)
 
NAA, 30, 16 zeros ()
 
sum(surf_surf_th1, 2 squeeze ()
 
id i: (aasurf_surf_da1(i,:,:) calc_NtoP)
 
 aasurf_core_da1 (i,:,:)
 
 aacore_surf_da1 (i,:,:)
 
 aacore_core_da1 (i,:,:)
 
 aasurf_surf_da2 (i,:,:)
 
 aacore_surf_da2 (i,:,:)
 
 aasurf_core_da2 (i,:,:)
 
 aacore_core_da2 (i,:,:)
 
end p_a_r_ang1 (ii, kk,:)
 
 p_a_r_ang2 (ii, kk,:)
 
end p_r_ang (kk,:)
 
 set (f, "visible", "off") else fp_ang
 
end if exist ("iii", "var") % iii %else % iii
 
debug if debug printf ("score_w(%d,%d): max=%f, min=%f\n", iii, jjj, max(max(score)), min(min(score)))
 
 contourf (xx, yy, score)
 
 print (fname, "-dpng") else fprintf(fp_ang
 
ANGLE1 reslist (iii,:)
 
ANGLE1 reslist (jjj,:))
 
end fprintf (fp_ang, "\n")
 
end fprintf (fp_ang, "%.6f ", score(xx, 16))
 
end end end if debug printf ("Done!\n")
 
 set (f, "visible", "on") else fclose(fp_ang)
 
end debug subplot (2, 1, 1) %[xx
 
 contourf (xx, yy, score_w)
 
 plot (1:16, p_ii_w(30,:), 1:16, squeeze(p_ii(1, 30,:)), 1:16, squeeze(aa_surf_da1(4, 30,:))/sum(squeeze(aa_surf_da1(4, 30,:))), 1:16, squeeze(aa_core_da1(4, 30,:))/sum(squeeze(aa_core_da1(4, 30,:)))) %subplot(2
 
plot(1:16, score(24,:),"r", 1:16, score_w(24,:),"b") %axis([1 16 -0.2 0.2]) %plot(1 contourf (xx, yy, Na1_r_surf_surf) %subplot(4
 
plot(1:16, score(24,:),"r", 1:16, score_w(24,:),"b") %axis([1 16 -0.2 0.2]) %plot(1 contourf (xx, yy, Na2_r_surf_surf) %subplot(4
 
plot(1:16, score(24,:),"r", 1:16, score_w(24,:),"b") %axis([1 16 -0.2 0.2]) %plot(1 contourf (xx, yy, Na1_r_core_surf) %subplot(4
 
plot(1:16, score(24,:),"r", 1:16, score_w(24,:),"b") %axis([1 16 -0.2 0.2]) %plot(1 contourf (xx, yy, Na2_r_surf_core) %subplot(4
 
plot(1:16, score(24,:),"r", 1:16, score_w(24,:),"b") %axis([1 16 -0.2 0.2]) %plot(1 contourf (xx, yy, Na1_r_surf_core) %subplot(4
 
plot(1:16, score(24,:),"r", 1:16, score_w(24,:),"b") %axis([1 16 -0.2 0.2]) %plot(1 contourf (xx, yy, Na2_r_core_surf) %subplot(4
 
plot(1:16, score(24,:),"r", 1:16, score_w(24,:),"b") %axis([1 16 -0.2 0.2]) %plot(1 contourf (xx, yy, Na1_r_core_core) %subplot(4
 

Variables

 debug = 0
 
 reslist
 
 CYS
 
 ASP
 
 GLU
 
 PHE
 
 TRP
 
 HIS
 
 ILE
 
 LYS
 
 LEU
 
 MET
 
 ASN
 
 VAL
 
 GLN
 
 ARG
 
 SER
 
 THR
 
 PRO
 
 ALA
 
 GLY
 
should not contain ALA GLY PRO NAA = 17
 
 Rcut = 12
 
 Bcut = 24
 
buildlist res_index = zeros(40,1)
 
 env_index = zeros(40,1)
 
 num_res_env = zeros(NAA,2)
 
for i
 
 break
 
end split surf_surf_th1 =zeros(NAA,NAA,30,16)
 
 surf_core_th1 =zeros(NAA,NAA,30,16)
 
 core_surf_th1 =zeros(NAA,NAA,30,16)
 
 core_core_th1 =zeros(NAA,NAA,30,16)
 
end else aj
 
end else j
 
 smoothed = smooth_2D(surf_core_th1(i,j,:,:), [15, 0.1, 2], [360, 40, 2])
 
 __pad0__
 
 __pad1__
 
 __pad2__
 
 __pad3__
 
end end end sum symm aasurf_surf_da1 =zeros(NAA,30,16)
 
 aacore_surf_da1 =squeeze(sum(core_surf_th1,2))
 
 aasurf_core_da1 =squeeze(sum(surf_core_th1,2))
 
 aacore_core_da1 =squeeze(sum(core_core_th1,2))
 
 aasurf_surf_da2 =squeeze(sum(surf_surf_th1))
 
 aacore_surf_da2 =squeeze(sum(surf_core_th1))
 
 aasurf_core_da2 =squeeze(sum(core_surf_th1))
 
 aacore_core_da2 =squeeze(sum(core_core_th1))
 
 Na1_r_surf_surf = squeeze(sum(aasurf_surf_da1))
 
 Na1_r_surf_core = squeeze(sum(aasurf_core_da1))
 
 Na1_r_core_surf = squeeze(sum(aacore_surf_da1))
 
 Na1_r_core_core = squeeze(sum(aacore_core_da1))
 
 Na2_r_surf_surf = squeeze(sum(aasurf_surf_da2))
 
 Na2_r_surf_core = squeeze(sum(aasurf_core_da2))
 
 Na2_r_core_surf = squeeze(sum(aacore_surf_da2))
 
 Na2_r_core_core = squeeze(sum(aacore_core_da2))
 
 aa_aa_th1 = (surf_surf_th1 + surf_core_th1 + core_surf_th1 + core_core_th1)
 
NAAaa to NAAaa cal ntype = NAA
 
 dat_a_a_r_ang = aa_aa_th1
 
old way sum_a_a_r = sum(dat_a_a_r_ang,4)
 
sum over ang dat_a_r_ang1 = squeeze(sum(dat_a_a_r_ang, 2))
 
sum over the second aa sum_a1_r = sum(dat_a_r_ang1, 3)
 
sum over ang dat_a_r_ang2 = squeeze(sum(dat_a_a_r_ang))
 
sum over the first aa sum_a2_r = sum(dat_a_r_ang2, 3)
 
sum over ang dat_r_ang = squeeze(sum(dat_a_r_ang1))
 
sum over all aa sum_r = sum(dat_r_ang,2)
 
sum over ang p_a_a_r_ang = zeros(ntype, ntype, 30, 16)
 
 p_a_r_ang1 = zeros(ntype, 30, 16)
 
 p_a_r_ang2 = zeros(ntype, 30, 16)
 
 p_r_ang = zeros(30, 16)
 
for kk
 
end shift shift = zeros(30,16)
 
end debug if debug f = figure()
 
 wj = num_res_env(jjj,1)/sum(num_res_env(jjj,:))
 
 p_ii_jj = squeeze(p_a_a_r_ang( iii, jjj, :, : ))
 
 p_ii = p_a_r_ang1(iii, :, :)
 
 p_ii_w = calc_Pi_ang_sc(aasurf_surf_da1(iii,:,:), aasurf_core_da1(iii,:,:), aacore_surf_da1(iii,:,:), aacore_core_da1(iii,:,:), wi, wj)
 
 p_jj = p_a_r_ang2(jjj, :, :)
 
 p_jj_w = calc_Pi_ang_sc(aasurf_surf_da2(jjj,:,:), aasurf_core_da2(jjj,:,:), aacore_surf_da2(jjj,:,:), aacore_core_da2(jjj,:,:), wj, wi)
 
 p_ii_p_jj = squeeze(p_ii .* p_jj)
 
 p_ii_p_jj_w = squeeze(p_ii_w .* p_jj_w)
 
 p = (p_ii_jj .* p_r_ang) ./ (p_ii_p_jj)
 
 p_r_ang_w = calc_Pi_ang_sc(Na1_r_surf_surf, Na1_r_surf_core, Na1_r_core_surf, Na1_r_core_core, wi, wj)
 
 p_w = (p_ii_jj .* p_r_ang_w + shift) ./ (p_ii_p_jj_w + shift)
 
 score = -log(p)
 
 score_w = -log(p_w)
 
 fname = [ "score_", int2str(iii), "_", int2str(jjj), ".png" ]
 
ANGLE1 __pad4__
 
for yy
 
for xx
 

Function Documentation

◆ aacore_core_da1()

aacore_core_da1 ( i  ,
,
 
)

◆ aacore_core_da2()

aacore_core_da2 ( i  ,
,
 
)

◆ aacore_surf_da1()

aacore_surf_da1 ( i  ,
,
 
)

◆ aacore_surf_da2()

aacore_surf_da2 ( i  ,
,
 
)

◆ aasurf_core_da1()

aasurf_core_da1 ( i  ,
,
 
)

◆ aasurf_core_da2()

aasurf_core_da2 ( i  ,
,
 
)

◆ aasurf_surf_da2()

aasurf_surf_da2 ( i  ,
,
 
)

◆ beta()

id beta ( )
virtual

◆ contourf() [1/9]

plot (1:16,score(24,:),"r",1:16,score_w(24,:),"b") %axis([1 16 -0.2 0.2]) %plot(1 contourf ( xx  ,
yy  ,
Na1_r_core_core   
)

◆ contourf() [2/9]

plot (1:16,score(24,:),"r",1:16,score_w(24,:),"b") %axis([1 16 -0.2 0.2]) %plot(1 contourf ( xx  ,
yy  ,
Na1_r_core_surf   
)

◆ contourf() [3/9]

plot (1:16,score(24,:),"r",1:16,score_w(24,:),"b") %axis([1 16 -0.2 0.2]) %plot(1 contourf ( xx  ,
yy  ,
Na1_r_surf_core   
)

◆ contourf() [4/9]

plot (1:16,score(24,:),"r",1:16,score_w(24,:),"b") %axis([1 16 -0.2 0.2]) %plot(1 contourf ( xx  ,
yy  ,
Na1_r_surf_surf   
)

◆ contourf() [5/9]

plot (1:16,score(24,:),"r",1:16,score_w(24,:),"b") %axis([1 16 -0.2 0.2]) %plot(1 contourf ( xx  ,
yy  ,
Na2_r_core_surf   
)

◆ contourf() [6/9]

plot (1:16,score(24,:),"r",1:16,score_w(24,:),"b") %axis([1 16 -0.2 0.2]) %plot(1 contourf ( xx  ,
yy  ,
Na2_r_surf_core   
)

◆ contourf() [7/9]

plot (1:16,score(24,:),"r",1:16,score_w(24,:),"b") %axis([1 16 -0.2 0.2]) %plot(1 contourf ( xx  ,
yy  ,
Na2_r_surf_surf   
)

◆ contourf() [8/9]

contourf ( xx  ,
yy  ,
score   
)

◆ contourf() [9/9]

contourf ( xx  ,
yy  ,
score_w   
)

◆ core_core_th1() [1/3]

core_core_th1 ( ai  ,
aj  ,
,
 
)

◆ core_core_th1() [2/3]

core_core_th1 ( i  ,
j  ,
,
 
)

◆ core_core_th1() [3/3]

core_core_th1 ( j  ,
i  ,
,
 
)

◆ core_surf_th1() [1/3]

end else core_surf_th1 ( ai  ,
aj  ,
,
 
)

◆ core_surf_th1() [2/3]

core_surf_th1 ( i  ,
j  ,
,
 
)

◆ core_surf_th1() [3/3]

core_surf_th1 ( j  ,
i  ,
,
 
)

◆ env_index()

end end get env env_index ( i  )

◆ exist()

end if exist ( "iii"  ,
"var"   
)

◆ fprintf() [1/2]

end fprintf ( fp_ang  ,
"%.6f "  ,
score(xx, 16)   
)

◆ fprintf() [2/2]

end fprintf ( fp_ang  ,
"\n"   
)

◆ i:()

id i: ( aasurf_surf_da1(i,:,:)  calc_NtoP)
virtual

◆ if() [1/4]

if ( ai  ,
NAA   
)

◆ if() [2/4]

if ( aj  ,
NAA   
)

◆ if() [3/4]

end else if ( env_index(j = =1)

◆ if() [4/4]

if ( i!  = j)

◆ num_res_env()

num_res_env ( res_index(i ,
env_index(i  
)

◆ p_a_r_ang1()

end p_a_r_ang1 ( ii  ,
kk  ,
 
)

◆ p_a_r_ang2()

p_a_r_ang2 ( ii  ,
kk  ,
 
)

◆ p_r_ang()

end p_r_ang ( kk  ,
 
)

◆ plot()

plot ( 1:16  ,
p_ii_w(30,:)  ,
1:16  ,
squeeze(p_ii(1, 30,:))  ,
1:16  ,
squeeze(aa_surf_da1(4, 30,:))/sum(squeeze(aa_surf_da1(4, 30,:)))  ,
1:16  ,
squeeze(aa_core_da1(4, 30,:))/sum(squeeze(aa_core_da1(4, 30,:)))   
)

◆ pre_fill_dfire_2D()

core_core_th1 NAA pre_fill_dfire_2D ( )
staticvirtual

◆ print()

print ( fname  ,
"-dpng"   
)

◆ printf() [1/2]

end end end if debug printf ( "Done!\n"  )

◆ printf() [2/2]

debug if debug printf ( "score_w(%d,%d):  max = %f)

◆ reslist() [1/2]

ANGLE1 reslist ( iii  ,
 
)

◆ reslist() [2/2]

ANGLE1 reslist ( jjj  ,
 
)

◆ set() [1/2]

set ( f  ,
"visible"  ,
"off"   
)

◆ set() [2/2]

set ( f  ,
"visible"  ,
"on"   
)

◆ squeeze()

sum(surf_surf_th1,2 squeeze ( )
virtual

◆ subplot()

end debug subplot ( ,
,
 
)

◆ surf_core_th1() [1/3]

surf_core_th1 ( ai  ,
aj  ,
,
 
)

◆ surf_core_th1() [2/3]

surf_core_th1 ( i  ,
j  ,
,
 
)

◆ surf_core_th1() [3/3]

surf_core_th1 ( j  ,
i  ,
,
 
)

◆ surf_surf_th1() [1/2]

surf_surf_th1 ( ai  ,
aj  ,
,
 
)

◆ surf_surf_th1() [2/2]

surf_surf_th1 ( i  ,
j  ,
,
 
)

◆ th1_table()

i, j, :, : th1_table ( )
virtual

◆ zeros()

NAA,30,16 zeros ( )
virtual

Variable Documentation

◆ __pad0__

__pad0__

◆ __pad1__

__pad1__

◆ __pad2__

__pad2__

◆ __pad3__

__pad3__

◆ __pad4__

ANGLE1 __pad4__

◆ aa_aa_th1

◆ aacore_core_da1

aacore_core_da1 =squeeze(sum(core_core_th1,2))

◆ aacore_core_da2

aacore_core_da2 =squeeze(sum(core_core_th1))

◆ aacore_surf_da1

aacore_surf_da1 =squeeze(sum(core_surf_th1,2))

◆ aacore_surf_da2

aacore_surf_da2 =squeeze(sum(surf_core_th1))

◆ aasurf_core_da1

aasurf_core_da1 =squeeze(sum(surf_core_th1,2))

◆ aasurf_core_da2

aasurf_core_da2 =squeeze(sum(core_surf_th1))

◆ aasurf_surf_da1

end end end sum symm aasurf_surf_da1 =zeros(NAA,30,16)

◆ aasurf_surf_da2

aasurf_surf_da2 =squeeze(sum(surf_surf_th1))

◆ aj

end else aj

◆ ALA

ALA

◆ ARG

ARG

◆ ASN

ASN

◆ ASP

ASP

◆ Bcut

Bcut = 24

◆ break

break

◆ core_core_th1

core_core_th1 =zeros(NAA,NAA,30,16)

◆ core_surf_th1

core_surf_th1 =zeros(NAA,NAA,30,16)

◆ CYS

CYS

◆ dat_a_a_r_ang

dat_a_a_r_ang = aa_aa_th1

◆ dat_a_r_ang1

sum over ang dat_a_r_ang1 = squeeze(sum(dat_a_a_r_ang, 2))

◆ dat_a_r_ang2

sum over ang dat_a_r_ang2 = squeeze(sum(dat_a_a_r_ang))

◆ dat_r_ang

sum over ang dat_r_ang = squeeze(sum(dat_a_r_ang1))

◆ debug

debug = 0

◆ env_index

env_index = zeros(40,1)

◆ f

end debug if debug f = figure()

◆ fname

fname = [ "score_", int2str(iii), "_", int2str(jjj), ".png" ]

◆ GLN

GLN

◆ GLU

GLU

◆ GLY

GLY

◆ HIS

HIS

◆ i

for i
Initial value:
= 1:40
%get aa
for n = 1:20
if (list(i,1:3)==reslist(n,:))
for aa
Definition: gen_env_dep_orient.m:107
for i
Definition: gen_env_dep_orient_decompose.m:39
reslist
Definition: gen_env_dep_orient_decompose.m:6
buildlist res_index
Definition: gen_env_dep_orient_decompose.m:36
FileVectorOptionKey const list
n
Definition: kmeans_adaptive_kernel_density_bb_dependent_rotlib.py:205

◆ ILE

ILE

◆ j

j

◆ kk

for kk
Initial value:
= 1:30
for ii = 1:ntype
for jj = 1:ntype
old way sum_a_a_r
Definition: gen_env_dep_orient_decompose.m:173
NAAaa to NAAaa cal ntype
Definition: gen_env_dep_orient_decompose.m:169
dat_a_a_r_ang
Definition: gen_env_dep_orient_decompose.m:170
sum over ang p_a_a_r_ang
Definition: gen_env_dep_orient_decompose.m:182
for kk
Definition: gen_env_dep_orient_decompose.m:187
int jj
Definition: beta_nonlocal.py:73
ii
Definition: create_a3b_hbs.py:759

◆ LEU

LEU

◆ LYS

LYS

◆ MET

MET

◆ Na1_r_core_core

Na1_r_core_core = squeeze(sum(aacore_core_da1))

◆ Na1_r_core_surf

Na1_r_core_surf = squeeze(sum(aacore_surf_da1))

◆ Na1_r_surf_core

Na1_r_surf_core = squeeze(sum(aasurf_core_da1))

◆ Na1_r_surf_surf

end Na1_r_surf_surf = squeeze(sum(aasurf_surf_da1))

◆ Na2_r_core_core

Na2_r_core_core = squeeze(sum(aacore_core_da2))

◆ Na2_r_core_surf

Na2_r_core_surf = squeeze(sum(aacore_surf_da2))

◆ Na2_r_surf_core

Na2_r_surf_core = squeeze(sum(aasurf_core_da2))

◆ Na2_r_surf_surf

Na2_r_surf_surf = squeeze(sum(aasurf_surf_da2))

◆ NAA

should not contain ALA GLY PRO NAA = 17

◆ ntype

NAAaa to NAAaa cal ntype = NAA

◆ num_res_env

num_res_env = zeros(NAA,2)

◆ p

p = (p_ii_jj .* p_r_ang) ./ (p_ii_p_jj)

◆ p_a_a_r_ang

sum over ang p_a_a_r_ang = zeros(ntype, ntype, 30, 16)

◆ p_a_r_ang1

p_a_r_ang1 = zeros(ntype, 30, 16)

◆ p_a_r_ang2

p_a_r_ang2 = zeros(ntype, 30, 16)

◆ p_ii

p_ii = p_a_r_ang1(iii, :, :)

◆ p_ii_jj

p_ii_jj = squeeze(p_a_a_r_ang( iii, jjj, :, : ))

◆ p_ii_p_jj

p_ii_p_jj = squeeze(p_ii .* p_jj)

◆ p_ii_p_jj_w

p_ii_p_jj_w = squeeze(p_ii_w .* p_jj_w)

◆ p_ii_w

p_ii_w = calc_Pi_ang_sc(aasurf_surf_da1(iii,:,:), aasurf_core_da1(iii,:,:), aacore_surf_da1(iii,:,:), aacore_core_da1(iii,:,:), wi, wj)

◆ p_jj

p_jj = p_a_r_ang2(jjj, :, :)

◆ p_jj_w

p_jj_w = calc_Pi_ang_sc(aasurf_surf_da2(jjj,:,:), aasurf_core_da2(jjj,:,:), aacore_surf_da2(jjj,:,:), aacore_core_da2(jjj,:,:), wj, wi)

◆ p_r_ang

p_r_ang = zeros(30, 16)

◆ p_r_ang_w

p_r_ang_w = calc_Pi_ang_sc(Na1_r_surf_surf, Na1_r_surf_core, Na1_r_core_surf, Na1_r_core_core, wi, wj)

◆ p_w

p_w = (p_ii_jj .* p_r_ang_w + shift) ./ (p_ii_p_jj_w + shift)

◆ PHE

PHE

◆ PRO

PRO

◆ Rcut

Rcut = 12

◆ res_index

buildlist res_index = zeros(40,1)

◆ reslist

reslist
Initial value:
=

◆ score

score = -log(p)

◆ score_w

score_w = -log(p_w)

◆ SER

SER

◆ shift

end shift shift = zeros(30,16)

◆ smoothed

smoothed = smooth_2D(surf_core_th1(i,j,:,:), [15, 0.1, 2], [360, 40, 2])

◆ sum_a1_r

sum over the second aa sum_a1_r = sum(dat_a_r_ang1, 3)

◆ sum_a2_r

sum over the first aa sum_a2_r = sum(dat_a_r_ang2, 3)

◆ sum_a_a_r

old way sum_a_a_r = sum(dat_a_a_r_ang,4)

◆ sum_r

sum over all aa sum_r = sum(dat_r_ang,2)

◆ surf_core_th1

surf_core_th1 =zeros(NAA,NAA,30,16)

◆ surf_surf_th1

end split surf_surf_th1 =zeros(NAA,NAA,30,16)

◆ THR

THR

◆ TRP

TRP

◆ VAL

VAL

◆ wj

wj = num_res_env(jjj,1)/sum(num_res_env(jjj,:))

◆ xx

for xx
Initial value:
=1:Bcut
fprintf(fp_ang, "%.6f ", score(xx,1))
end fprintf(fp_ang, "\n")
Bcut
Definition: gen_env_dep_orient_decompose.m:33
score
Definition: gen_env_dep_orient_decompose.m:238
for xx
Definition: gen_env_dep_orient_decompose.m:257

◆ yy

end debug yy
Initial value:
=1:18
fprintf(fp_ang, "%.6f ", 0)