1 subroutine contact(lprint,ncont,icont,ist,ien)
4 include 'DIMENSIONS.ZSCOPT'
5 include 'DIMENSIONS.FREE'
6 include 'COMMON.CONTROL'
7 include 'COMMON.IOUNITS'
9 include 'COMMON.INTERACT'
10 include 'COMMON.FFIELD'
11 include 'COMMON.NAMES'
13 include 'COMMON.CONTPAR'
14 include 'COMMON.LOCAL'
15 integer ist,ien,kkk,iti,itj,itypi,itypj,i1,i2,it1,it2
17 real*8 cscore(maxcont),omt1(maxcont),omt2(maxcont),omt12(maxcont),
18 & ddsc(maxcont),ddla(maxcont),ddlb(maxcont)
19 integer ncont,icont(2,maxcont)
20 real*8 u,v,a(3),b(3),dla,dlb
26 write (iout,110) restyp(itype(i)),i,c(1,i),c(2,i),
27 & c(3,i),dc(1,nres+i),dc(2,nres+i),dc(3,nres+i),
28 & dc_norm(1,nres+i),dc_norm(2,nres+i),dc_norm(3,nres+i)
31 110 format (a,'(',i3,')',9f8.3)
34 if (iti.le.0 .or. iti.gt.ntyp) cycle
37 if (itj.le.0 .or. itj.gt.ntyp) cycle
40 xj = c(1,nres+j)-c(1,nres+i)
41 yj = c(2,nres+j)-c(2,nres+i)
42 zj = c(3,nres+j)-c(3,nres+i)
43 dxi = dc_norm(1,nres+i)
44 dyi = dc_norm(2,nres+i)
45 dzi = dc_norm(3,nres+i)
46 dxj = dc_norm(1,nres+j)
47 dyj = dc_norm(2,nres+j)
48 dzj = dc_norm(3,nres+j)
53 c write (iout,*) (a(k),k=1,3),(b(k),k=1,3)
54 if (icomparfunc.eq.1) then
55 call contfunc(csc,iti,itj)
56 else if (icomparfunc.eq.2) then
57 call scdist(csc,iti,itj)
58 else if (icomparfunc.eq.3 .or. icomparfunc.eq.5) then
59 csc = dist(nres+i,nres+j)
60 else if (icomparfunc.eq.4) then
61 call odlodc(c(1,i),c(1,j),a,b,u,v,dla,dlb,csc)
63 write (*,*) "Error - Unknown sidechain contact function"
64 write (iout,*) "Error - Unknown sidechain contact function"
66 if (csc.lt.sc_cutoff(iti,itj)) then
67 c write(iout,*) "i",i," j",j," dla",dla,dsc(iti),
68 c & " dlb",dlb,dsc(itj)," csc",csc,sc_cutoff(iti,itj),
69 c & dxi,dyi,dzi,dxi**2+dyi**2+dzi**2,
70 c & dxj,dyj,dzj,dxj**2+dyj**2+dzj**2,om1,om2,om12,
72 c write(iout,*)'egb',itypi,itypj,chi1,chi2,chip1,chip2,
73 c & sig0ij,rij,rrij,om1,om2,om12,chiom1,chiom2,chiom12,
74 c & chipom1,chipom2,chipom12,sig,eps2rt,rij_shift,e2,evdw,
90 write (iout,'(a)') 'Contact map:'
96 write (iout,'(i3,2x,a,i4,2x,a,i4,5f8.3,3f10.5)')
97 & i,restyp(it1),i1,restyp(it2),i2,cscore(i),
98 & sc_cutoff(iabs(it1),iabs(it2)),ddsc(i),ddla(i),ddlb(i),
99 & omt1(i),omt2(i),omt12(i)
104 c----------------------------------------------------------------------------
105 double precision function contact_fract(ncont,ncont_ref,
109 include 'COMMON.IOUNITS'
111 integer ncont,ncont_ref,icont(2,maxcont),icont_ref(2,maxcont)
113 c print *,'ncont=',ncont,' ncont_ref=',ncont_ref
114 c write (iout,'(20i4)') (icont_ref(1,i),i=1,ncont_ref)
115 c write (iout,'(20i4)') (icont_ref(2,i),i=1,ncont_ref)
116 c write (iout,'(20i4)') (icont(1,i),i=1,ncont)
117 c write (iout,'(20i4)') (icont(2,i),i=1,ncont)
120 if (icont(1,i).eq.icont_ref(1,j) .and.
121 & icont(2,i).eq.icont_ref(2,j)) nmatch=nmatch+1
124 c print *,' nmatch=',nmatch
125 c contact_fract=dfloat(nmatch)/dfloat(max0(ncont,ncont_ref))
126 contact_fract=dfloat(nmatch)/dfloat(ncont_ref)
129 c------------------------------------------------------------------------------
130 subroutine pept_cont(lprint,ncont,icont)
133 include 'DIMENSIONS.ZSCOPT'
134 include 'COMMON.IOUNITS'
135 include 'COMMON.CHAIN'
136 include 'COMMON.INTERACT'
137 include 'COMMON.FFIELD'
138 include 'COMMON.NAMES'
139 integer ncont,icont(2,maxcont)
140 integer i,j,k,kkk,i1,i2,it1,it2
146 print *,'Entering pept_cont: nnt=',nnt,' nct=',nct
149 c(k,2*nres+1)=0.5d0*(c(k,i)+c(k,i+1))
153 c(k,2*nres+2)=0.5d0*(c(k,j)+c(k,j+1))
155 if (dist(2*nres+1,2*nres+2).lt.rcomp) then
163 write (iout,'(a)') 'PP contact map:'
169 write (iout,'(i3,2x,a,i4,2x,a,i4)')
170 & i,restyp(it1),i1,restyp(it2),i2