1 double precision function qwolyness(creff,iprot)
4 include 'DIMENSIONS.ZSCOPT'
5 include 'COMMON.IOUNITS'
6 include 'COMMON.COMPAR'
8 include 'COMMON.INTERACT'
10 include 'COMMON.HEADER'
12 integer i,j,jl,ilnres,jlnres,klnres,k,l,il,kl,nl,np,ip,kp
14 double precision dist,qm
15 double precision qq,qqij,qqijCM,dij,d0ij,dijCM,d0ijCM
16 double precision qcontribs
18 double precision creff(3,maxres2)
19 logical lprn /.false./
29 if (itype(il).ne.10) then
34 if (itype(jl).ne.10) then
39 qqijCM = qcontribs(il,jl,ilnres,jlnres,creff,iprot)
42 write (iout,*) "qqijCM",qqijCM
48 write (iout,*) "nl",nl," qq",qq
54 c---------------------------------------------------------------------------
55 double precision function qcontribs(il,jl,il1,jl1,creff,iprot)
58 include 'DIMENSIONS.ZSCOPT'
59 include 'COMMON.IOUNITS'
60 include 'COMMON.COMPAR'
61 include 'COMMON.CHAIN'
62 include 'COMMON.INTERACT'
64 include 'COMMON.HEADER'
65 include 'COMMON.CLASSES'
66 integer i,j,k,il,jl,il1,jl1,nd,iref,ib,iprot
69 double precision creff(3,maxres2)
70 double precision dij1,dij2,dij3,dij4,d0ij1,d0ij2,d0ij3,d0ij4,fac,
71 & fac1,ddave,ssij,ddqij
72 logical lprn /.false./
74 & (creff(1,jl)-creff(1,il))**2+
75 & (creff(2,jl)-creff(2,il))**2+
76 & (creff(3,jl)-creff(3,il))**2)
81 d0ij2=dsqrt((creff(1,jl1)-
83 & (creff(2,jl1)-creff(2,il))**2+
84 & (creff(3,jl1)-creff(3,il))**2)
86 ddave=ddave+(dij2-d0ij2)**2
90 d0ij3=dsqrt((creff(1,jl)-
92 & (creff(2,jl)-creff(2,il1))**2+
93 & (creff(3,jl)-creff(3,il1))**2)
95 ddave=ddave+(dij3-d0ij3)**2
98 if (il1.ne.il .and. jl1.ne.jl) then
99 d0ij4=dsqrt((creff(1,jl1)-
101 & (creff(2,jl1)-creff(2,il1))**2+
102 & (creff(3,jl1)-creff(3,il1))**2)
104 ddave=ddave+(dij4-d0ij4)**2
109 write (iout,*) "il",il," jl",jl,
110 & " itype",itype(il),itype(jl)," nd",nd
111 write (iout,*)"d0ij",d0ij1,d0ij2,d0ij3,d0ij4,
112 & " dij",dij1,dij2,dij3,dij4," ddave",ddave
115 c ssij = (0.25d0*d0ij1)**2
116 if (il.ne.il1 .and. jl.ne.jl1) then
117 c ssij = 16.0d0/(d0ij1*d0ij4)
118 ssij = sigma2(iprot)*sigma2(iprot)/(d0ij1*d0ij4)
120 c ssij = 16.0d0/(d0ij1*d0ij1)
121 c ssij = sigma2(iprot)*sigma2(iprot)/(d0ij1*d0ij1)
122 ssij = 1.0d0/(sigma2(iprot)*sigma2(iprot))
124 qcontribs = dexp(-0.5d0*ddave*ssij)