1 subroutine elecont(lprint,ncont,icont,ist,ien)
4 include 'DIMENSIONS.ZSCOPT'
5 include 'DIMENSIONS.COMPAR'
6 include 'COMMON.IOUNITS'
8 include 'COMMON.INTERACT'
9 include 'COMMON.FFIELD'
10 include 'COMMON.NAMES'
11 include 'COMMON.LOCAL'
13 integer i,j,k,ist,ien,iteli,itelj,ind,i1,i2,it1,it2,ic1,ic2
14 double precision rri,xi,yi,zi,dxi,dyi,dzi,xmedi,ymedi,zmedi,
15 & xj,yj,zj,dxj,dyj,dzj,aaa,bbb,ael6i,ael3i,rrmij,rmij,r3ij,r6ij,
16 & vrmij,cosa,cosb,cosg,fac,ev1,ev2,fac3,fac4,evdwij,el1,el2,
18 double precision elpp6c(2,2),elpp3c(2,2),ael6c(2,2),ael3c(2,2),
20 double precision elcutoff,elecutoff_14
21 integer ncont,icont(2,maxcont)
22 double precision econt(maxcont)
24 * Load the constants of peptide bond - peptide bond interactions.
25 * Type 1 - ordinary peptide bond, type 2 - alkylated peptide bond (e.g.
26 * proline) - determined by averaging ECEPP energy.
30 c data epp / 0.3045d0, 0.3649d0, 0.3649d0, 0.5743d0/
31 c data rpp / 4.5088d0, 4.5395d0, 4.5395d0, 4.4846d0/
32 data elpp6c /-0.2379d0,-0.2056d0,-0.2056d0,-0.0610d0/
33 data elpp3c / 0.0503d0, 0.0000d0, 0.0000d0, 0.0692d0/
34 data elcutoff /-0.3d0/,elecutoff_14 /-0.5d0/
37 if (lprint) write (iout,'(a)')
38 & "Constants of electrostatic interaction energy expression."
42 appc(i,j)=epp(i,j)*rri*rri
43 bppc(i,j)=-2.0*epp(i,j)*rri
44 ael6c(i,j)=elpp6c(i,j)*4.2**6
45 ael3c(i,j)=elpp3c(i,j)*4.2**3
47 & write (iout,'(2i2,4e15.4)') i,j,appc(i,j),bppc(i,j),ael6c(i,j),
66 if (j.eq.i+2 .and. itelj.eq.2) iteli=2
67 if (iteli.eq.2 .and. itelj.eq.2) goto 4
70 ael6i=ael6c(iteli,itelj)
71 ael3i=ael3c(iteli,itelj)
75 xj=c(1,j)+0.5*dxj-xmedi
76 yj=c(2,j)+0.5*dyj-ymedi
77 zj=c(3,j)+0.5*dzj-zmedi
78 rrmij=1.0/(xj*xj+yj*yj+zj*zj)
83 cosa=(dxi*dxj+dyi*dyj+dzi*dzj)*vblinv2
84 cosb=(xj*dxi+yj*dyi+zj*dzi)*vrmij
85 cosg=(xj*dxj+yj*dyj+zj*dzj)*vrmij
86 fac=cosa-3.0*cosb*cosg
92 el1=fac3*(4.0+fac*fac-3.0*(cosb*cosb+cosg*cosg))
95 if (j.gt.i+2 .and. eesij.le.elcutoff .or.
96 & j.eq.i+2 .and. eesij.le.elecutoff_14) then
107 write (iout,*) 'Total average electrostatic energy: ',ees
108 write (iout,*) 'VDW energy between peptide-group centers: ',evdw
110 write (iout,*) 'Electrostatic contacts before pruning: '
116 write (iout,'(i3,2x,a,i4,2x,a,i4,f10.5)')
117 & i,restyp(it1),i1,restyp(it2),i2,econt(i)
120 c For given residues keep only the contacts with the greatest energy.
122 do while (i.lt.ncont)
128 do while (j.lt.ncont)
130 if (ic1.eq.icont(1,j).and.iabs(icont(2,j)-ic2).le.2 .or.
131 & ic2.eq.icont(2,j).and.iabs(icont(1,j)-ic1).le.2) then
132 c write (iout,*) "i",i," j",j," ic1",ic1," ic2",ic2,
133 c & " jc1",icont(1,j)," jc2",icont(2,j)," ncont",ncont
134 if (econt(j).lt.ene .and. icont(2,j).ne.icont(1,j)+2) then
135 if (ic1.eq.icont(1,j)) then
137 if (k.ne.i .and. k.ne.j .and. icont(2,k).eq.icont(2,j)
138 & .and. iabs(icont(1,k)-ic1).le.2 .and.
139 & econt(k).lt.econt(j) ) goto 21
141 else if (ic2.eq.icont(2,j) ) then
143 if (k.ne.i .and. k.ne.j .and. icont(1,k).eq.icont(1,j)
144 & .and. iabs(icont(2,k)-ic2).le.2 .and.
145 & econt(k).lt.econt(j) ) goto 21
150 icont(1,k-1)=icont(1,k)
151 icont(2,k-1)=icont(2,k)
156 c write (iout,*) "ncont",ncont
158 c write (iout,*) icont(1,k),icont(2,k)
161 else if (econt(j).gt.ene .and. ic2.ne.ic1+2)
163 if (ic1.eq.icont(1,j)) then
165 if (k.ne.i .and. k.ne.j .and. icont(2,k).eq.ic2
166 & .and. iabs(icont(1,k)-icont(1,j)).le.2 .and.
167 & econt(k).lt.econt(i) ) goto 21
169 else if (ic2.eq.icont(2,j) ) then
171 if (k.ne.i .and. k.ne.j .and. icont(1,k).eq.ic1
172 & .and. iabs(icont(2,k)-icont(2,j)).le.2 .and.
173 & econt(k).lt.econt(i) ) goto 21
178 icont(1,k-1)=icont(1,k)
179 icont(2,k-1)=icont(2,k)
183 c write (iout,*) "ncont",ncont
185 c write (iout,*) icont(1,k),icont(2,k)
196 write (iout,*) 'Electrostatic contacts after pruning: '
202 write (iout,'(i3,2x,a,i4,2x,a,i4,f10.5)')
203 & i,restyp(it1),i1,restyp(it2),i2,econt(i)