1 subroutine contacts_in_fragments(lprint,is,ncont,icont,ncont_frag,
5 include 'DIMENSIONS.COMPAR'
6 include 'COMMON.INTERACT'
7 include 'COMMON.COMPAR'
8 include 'COMMON.IOUNITS'
10 include 'COMMON.NAMES'
11 integer icont(2,maxcont),ncont_frag(maxfrag),
12 & icont_frag(2,maxcont,maxfrag)
13 logical OK1,OK2,lprint
16 c write (iout,*) "i",1," j",j,(ifrag(1,k,j,ib,iprot),
17 c & ifrag(2,k,j,ib,iprot)
18 c & ,k=1,npiece(j,1,ib,iprot))
24 do while (.not.OK1 .and. l.lt.npiece(j,1,ib,iprot))
26 OK1=ic1.ge.ifrag(1,l,j,ib,iprot)-is .and.
27 & ic1.le.ifrag(2,l,j,ib,iprot)+is
31 do while (.not.OK2 .and. l.lt.npiece(j,1,ib,iprot))
33 OK2=ic2.ge.ifrag(1,l,j,ib,iprot)-is .and.
34 & ic2.le.ifrag(2,l,j,ib,iprot)+is
36 c write(iout,*) "k",k," ic1",ic1," ic2",ic2," OK1",OK1,
40 icont_frag(1,nc,j)=ic1
41 icont_frag(2,nc,j)=ic2
42 c write (iout,*) "nc",nc," ic1",ic1," ic2",ic2
46 c do k=1,ncont_frag(j)
47 c i1=icont_frag(1,k,j)
48 c i2=icont_frag(2,k,j)
51 c write (iout,'(i3,2x,a,i4,2x,a,i4)')
52 c & i,restyp(it1),i1,restyp(it2),i2
56 write (iout,*) "Electrostatic contacts in fragments:"
57 write (iout,*) "Level 1"
58 do j=1,nfrag(1,ib,iprot)
59 write (iout,*) "Fragment",j,"(",(ifrag(1,k,j,ib,iprot),
60 & ifrag(2,k,j,ib,iprot),k=1,npiece(j,1,ib,iprot)),")"
61 write (iout,*) "Number of contacts",ncont_frag(j)
67 write (iout,'(i3,2x,a,i4,2x,a,i4)')
68 & i,restyp(it1),i1,restyp(it2),i2