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'
10 include 'COMMON.CONTROL'
11 integer ilevel,jfrag,kkk
12 integer i,j,jl,k,l,il,kl,nl,np,ip,kp
14 double precision dist,tempus(maxperm),maxiQ
15 double precision qq,qqij,qqijCM,dij,d0ij,dijCM,d0ijCM
16 logical lprn /.false./
17 double precision sigm,x
24 c write (iout,*) "QWolyes: " jfrag",jfrag,
29 if (lprn) write (iout,*) "Q computed for whole molecule"
40 d0ij=dsqrt((cref(1,jl,kkk)-cref(1,il,kkk))**2+
41 & (cref(2,jl,kkk)-cref(2,il,kkk))**2+
42 & (cref(3,jl,kkk)-cref(3,il,kkk))**2)
44 qqij = dexp(-0.5d0*((dij-d0ij)/(sigm(d0ij)))**2)
45 if (itype(il).ne.10 .or. itype(jl).ne.10) then
48 & (cref(1,jl+nres,kkk)-cref(1,il+nres,kkk))**2+
49 & (cref(2,jl+nres,kkk)-cref(2,il+nres,kkk))**2+
50 & (cref(3,jl+nres,kkk)-cref(3,il+nres,kkk))**2)
51 dijCM=dist(il+nres,jl+nres)
52 qqijCM = dexp(-0.5d0*((dijCM-d0ijCM)/(sigm(d0ijCM)))**2)
56 write (iout,*) "il",il," jl",jl,
57 & " itype",itype(il),itype(jl)
58 write (iout,*)"d0ij",d0ij," dij",dij," d0ijCM",d0ijCM,
59 & " dijCM",dijCM," qqij",qqij," qqijCM",qqijCM
64 if (lprn) write (iout,*) "nl",nl," qq",qq
65 else if (ilevel.eq.1) then
66 if (lprn) write (iout,*) "Level",ilevel," fragment",jfrag
68 c write (iout,*) "nlist_frag",nlist_frag(jfrag)
69 do i=2,nlist_frag(jfrag)
73 if (iabs(il-jl).gt.nsep) then
81 d0ij=dsqrt((cref(1,jl,kkk)-cref(1,il,kkk))**2+
82 & (cref(2,jl,kkk)-cref(2,il,kkk))**2+
83 & (cref(3,jl,kkk)-cref(3,il,kkk))**2)
85 qqij = dexp(-0.5d0*((dij-d0ij)/(sigm(d0ij)))**2)
86 if (itype(il).ne.10 .or. itype(jl).ne.10) then
89 & (cref(1,jl+nres,kkk)-cref(1,il+nres,kkk))**2+
90 & (cref(2,jl+nres,kkk)-cref(2,il+nres,kkk))**2+
91 & (cref(3,jl+nres,kkk)-cref(3,il+nres,kkk))**2)
92 dijCM=dist(il+nres,jl+nres)
93 qqijCM = dexp(-0.5d0*((dijCM-d0ijCM)/(sigm(d0ijCM)))**2)
97 write (iout,*) "i",i," j",j," il",il," jl",jl,
98 & " itype",itype(il),itype(jl)
99 write (iout,*)"d0ij",d0ij," dij",dij," d0ijCM",d0ijCM,
100 & " dijCM",dijCM," qqij",qqij," qqijCM",qqijCM
106 if (lprn) write (iout,*) "nl",nl," qq",qq
107 else if (ilevel.eq.2) then
108 np=npiece(jfrag,ilevel)
111 ip=ipiece(i,jfrag,ilevel)
112 do j=1,nlist_frag(ip)
115 kp=ipiece(k,jfrag,ilevel)
116 do l=1,nlist_frag(kp)
118 if (iabs(kl-il).gt.nsep) then
126 d0ij=dsqrt((cref(1,kl,kkk)-cref(1,il,kkk))**2+
127 & (cref(2,kl,kkk)-cref(2,il,kkk))**2+
128 & (cref(3,kl,kkk)-cref(3,il,kkk))**2)
130 qqij = dexp(-0.5d0*((dij-d0ij)/(sigm(d0ij)))**2)
131 if (itype(il).ne.10 .or. itype(kl).ne.10) then
134 & (cref(1,kl+nres,kkk)-cref(1,il+nres,kkk))**2+
135 & (cref(2,kl+nres,kkk)-cref(2,il+nres,kkk))**2+
136 & (cref(3,kl+nres,kkk)-cref(3,il+nres,kkk))**2)
137 dijCM=dist(il+nres,kl+nres)
138 qqijCM = dexp(-0.5d0*((dijCM-d0ijCM)/
139 & (sigm(d0ijCM)))**2)
143 write (iout,*) "i",i," j",j," k",k," l",l," il",il,
144 & " kl",kl," itype",itype(il),itype(kl)
145 write (iout,*) " d0ij",d0ij," dij",dij," d0ijCM",
146 & d0ijCM," dijCM",dijCM," qqij",qqij," qqijCM",qqijCM
154 if (lprn) write (iout,*) "nl",nl," qq",qq
156 write (iout,*)"Error: Q can be computed only for level 1 and 2."
161 if (maxiQ.le.tempus(kkk)) maxiQ=tempus(kkk)
166 c-------------------------------------------------------------------------------
167 subroutine fragment_list
170 include 'DIMENSIONS.ZSCOPT'
171 include 'DIMENSIONS.COMPAR'
172 include 'COMMON.IOUNITS'
173 include 'COMMON.COMPAR'
174 logical lprn /.true./
175 integer i,ilevel,j,k,jfrag
178 do i=1,npiece(jfrag,1)
179 if (lprn) write (iout,*) "jfrag=",jfrag,
180 & "i=",i," fragment",ifrag(1,i,jfrag),
182 do j=ifrag(1,i,jfrag),ifrag(2,i,jfrag)
183 do k=1,nlist_frag(jfrag)
184 if (list_frag(k,jfrag).eq.j) goto 10
186 nlist_frag(jfrag)=nlist_frag(jfrag)+1
187 list_frag(nlist_frag(jfrag),jfrag)=j
192 write (iout,*) "Fragment list"
194 write (iout,*)"Fragment",j," list",(list_frag(k,j),