1 double precision function qwolynes(ilevel,jfrag)
4 include 'DIMENSIONS.ZSCOPT'
5 include 'DIMENSIONS.COMPAR'
6 include 'COMMON.IOUNITS'
7 include 'COMMON.COMPAR'
9 include 'COMMON.INTERACT'
11 integer i,j,jl,k,l,il,kl,nl,np,ip,kp
14 double precision qq,qqij,qqijCM,dij,d0ij,dijCM,d0ijCM
15 logical lprn /.false./
16 double precision sigm,x
18 c write (iout,*) "QWolyes: " jfrag",jfrag,
22 if (lprn) write (iout,*) "Q computed for whole molecule"
33 d0ij=dsqrt((cref(1,jl)-cref(1,il))**2+
34 & (cref(2,jl)-cref(2,il))**2+
35 & (cref(3,jl)-cref(3,il))**2)
37 qqij = dexp(-0.5d0*((dij-d0ij)/(sigm(d0ij)))**2)
38 if (itype(il).ne.10 .or. itype(jl).ne.10) then
41 & (cref(1,jl+nres)-cref(1,il+nres))**2+
42 & (cref(2,jl+nres)-cref(2,il+nres))**2+
43 & (cref(3,jl+nres)-cref(3,il+nres))**2)
44 dijCM=dist(il+nres,jl+nres)
45 qqijCM = dexp(-0.5d0*((dijCM-d0ijCM)/(sigm(d0ijCM)))**2)
49 write (iout,*) "il",il," jl",jl,
50 & " itype",itype(il),itype(jl)
51 write (iout,*)"d0ij",d0ij," dij",dij," d0ijCM",d0ijCM,
52 & " dijCM",dijCM," qqij",qqij," qqijCM",qqijCM
57 if (lprn) write (iout,*) "nl",nl," qq",qq
58 else if (ilevel.eq.1) then
59 if (lprn) write (iout,*) "Level",ilevel," fragment",jfrag
61 c write (iout,*) "nlist_frag",nlist_frag(jfrag)
62 do i=2,nlist_frag(jfrag)
66 if (iabs(il-jl).gt.nsep) then
74 d0ij=dsqrt((cref(1,jl)-cref(1,il))**2+
75 & (cref(2,jl)-cref(2,il))**2+
76 & (cref(3,jl)-cref(3,il))**2)
78 qqij = dexp(-0.5d0*((dij-d0ij)/(sigm(d0ij)))**2)
79 if (itype(il).ne.10 .or. itype(jl).ne.10) then
82 & (cref(1,jl+nres)-cref(1,il+nres))**2+
83 & (cref(2,jl+nres)-cref(2,il+nres))**2+
84 & (cref(3,jl+nres)-cref(3,il+nres))**2)
85 dijCM=dist(il+nres,jl+nres)
86 qqijCM = dexp(-0.5d0*((dijCM-d0ijCM)/(sigm(d0ijCM)))**2)
90 write (iout,*) "i",i," j",j," il",il," jl",jl,
91 & " itype",itype(il),itype(jl)
92 write (iout,*)"d0ij",d0ij," dij",dij," d0ijCM",d0ijCM,
93 & " dijCM",dijCM," qqij",qqij," qqijCM",qqijCM
99 if (lprn) write (iout,*) "nl",nl," qq",qq
100 else if (ilevel.eq.2) then
101 np=npiece(jfrag,ilevel)
104 ip=ipiece(i,jfrag,ilevel)
105 do j=1,nlist_frag(ip)
108 kp=ipiece(k,jfrag,ilevel)
109 do l=1,nlist_frag(kp)
111 if (iabs(kl-il).gt.nsep) then
119 d0ij=dsqrt((cref(1,kl)-cref(1,il))**2+
120 & (cref(2,kl)-cref(2,il))**2+
121 & (cref(3,kl)-cref(3,il))**2)
123 qqij = dexp(-0.5d0*((dij-d0ij)/(sigm(d0ij)))**2)
124 if (itype(il).ne.10 .or. itype(kl).ne.10) then
127 & (cref(1,kl+nres)-cref(1,il+nres))**2+
128 & (cref(2,kl+nres)-cref(2,il+nres))**2+
129 & (cref(3,kl+nres)-cref(3,il+nres))**2)
130 dijCM=dist(il+nres,kl+nres)
131 qqijCM = dexp(-0.5d0*((dijCM-d0ijCM)/
132 & (sigm(d0ijCM)))**2)
136 write (iout,*) "i",i," j",j," k",k," l",l," il",il,
137 & " kl",kl," itype",itype(il),itype(kl)
138 write (iout,*) " d0ij",d0ij," dij",dij," d0ijCM",
139 & d0ijCM," dijCM",dijCM," qqij",qqij," qqijCM",qqijCM
147 if (lprn) write (iout,*) "nl",nl," qq",qq
149 write (iout,*)"Error: Q can be computed only for level 1 and 2."
154 c-------------------------------------------------------------------------------
155 subroutine fragment_list
158 include 'DIMENSIONS.ZSCOPT'
159 include 'DIMENSIONS.COMPAR'
160 include 'COMMON.IOUNITS'
161 include 'COMMON.COMPAR'
162 logical lprn /.true./
163 integer i,ilevel,j,k,jfrag
166 do i=1,npiece(jfrag,1)
167 if (lprn) write (iout,*) "jfrag=",jfrag,
168 & "i=",i," fragment",ifrag(1,i,jfrag),
170 do j=ifrag(1,i,jfrag),ifrag(2,i,jfrag)
171 do k=1,nlist_frag(jfrag)
172 if (list_frag(k,jfrag).eq.j) goto 10
174 nlist_frag(jfrag)=nlist_frag(jfrag)+1
175 list_frag(nlist_frag(jfrag),jfrag)=j
180 write (iout,*) "Fragment list"
182 write (iout,*)"Fragment",j," list",(list_frag(k,j),