1 subroutine define_pairs(iprot)
4 include 'DIMENSIONS.ZSCOPT'
5 include 'DIMENSIONS.COMPAR'
6 include 'COMMON.IOUNITS'
8 include 'COMMON.SBRIDGE'
9 include 'COMMON.COMPAR'
11 include 'COMMON.CHAIN'
12 include 'COMMON.HEADER'
14 include 'COMMON.CONTACTS1'
15 include 'COMMON.PEPTCONT'
16 include 'COMMON.CLASSES'
17 integer i,j,k,ind,ll1,ll2,len_cut,length_frag,ib,iprot,icant
19 write (iout,*) "define_pairs: iprot",iprot," nfrag",nfrag(1,iprot)
21 do ib=1,nclass(iprot)-1
24 do k=1,npiece(j,1,ib,iprot)
25 length_frag=length_frag+ifrag(2,k,j,ib,iprot)
26 & -ifrag(1,k,j,ib,iprot)+1
28 len_frag(j,1,ib,iprot)=length_frag
30 write (iout,*) "Batch",ib," fragment",j,
31 & " length",len_frag(j,1,ib,iprot)
37 do j=i+1,nfrag(1,iprot)
39 if (istruct(i,1,iprot).le.1 .or. istruct(j,1,iprot).le.1)
41 if (istruct(i,1,iprot).le.1) then
42 ll1=len_frag(i,1,1,iprot)
44 ll1=len_frag(i,1,1,iprot)/2
46 if (istruct(j,1,iprot).le.1) then
47 ll2=len_frag(j,1,1,iprot)
49 ll2=len_frag(j,1,1,iprot)/2
51 len_cut=max0(min0(ll1*2/3,ll2*4/5),3)
53 if (istruct(i,1,iprot).eq.2.or.istruct(i,1,iprot).eq.4)
55 ll1=len_frag(i,1,1,iprot)/2
57 ll1=len_frag(i,1,1,iprot)
59 if (istruct(j,1,iprot).eq.2 .or. istruct(j,1,iprot).eq.4)
61 ll2=len_frag(j,1,1,iprot)/2
63 ll2=len_frag(j,1,1,iprot)
65 len_cut=max0(min0(ll1*4/5,ll2)*4/5,3)
68 write (iout,*) "Fragments",i,j," structure",
70 & istruct(j,1,iprot)," # contacts",
71 & ncont_frag_ref(ind,1,iprot),
72 & nsccont_frag_ref(ind,1,iprot),
73 & " lengths",len_frag(i,1,1,iprot),len_frag(j,1,1,iprot),
74 & " ll1",ll1," ll2",ll2," len_cut",len_cut
76 if ((istruct(i,1,iprot).eq.1 .or. istruct(j,1,iprot).eq.1)
77 & .and.nsccont_frag_ref(ind,1,iprot).ge.len_cut) then
78 if(istruct(i,1,iprot).eq.1 .and. istruct(j,1,iprot).eq.1)
80 write (iout,*) "Adding pair of helices",i,j,
81 & " based on SC contacts"
83 write (iout,*) "Adding helix+strand/sheet pair",i,j,
84 & " based on SC contacts"
86 nfrag(2,iprot)=nfrag(2,iprot)+1
87 do ib=1,nclass(iprot)-1
89 write (iout,*) "Batch",ib
91 if (icont_pair(ib).gt.0 .and. icontp_pair(ib).eq.0) then
93 write (iout,*) "# SC contacts will be used",
96 isccont(nfrag(2,iprot),2,ib,iprot)=1
97 ielecont(nfrag(2,iprot),2,ib,iprot)=0
98 else if (icontp_pair(ib).gt.0) then
100 write (iout,*) "# pp contacts will be used",
103 ielecont(nfrag(2,iprot),2,ib,iprot)=1
104 isccont(nfrag(2,iprot),2,ib,iprot)=0
106 ielecont(nfrag(2,iprot),2,ib,iprot)=0
107 isccont(nfrag(2,iprot),2,ib,iprot)=0
109 if (irms_pair(ib).gt.0) then
111 write (iout,*) "Fragment RMSD will be used",
114 irms(nfrag(2,iprot),2,ib,iprot)=1
116 if (iqwol_pair(ib).gt.0) then
118 write (iout,*) "Fragment Q will be used",
121 iqwol(nfrag(2,iprot),2,ib,iprot)=1
122 qcutfrag(nfrag(2,iprot),2,ib,iprot)=qcut_pair(ib)
124 npiece(nfrag(2,iprot),2,ib,iprot)=2
125 ipiece(1,nfrag(2,iprot),2,ib,iprot)=i
126 ipiece(2,nfrag(2,iprot),2,ib,iprot)=j
127 n_shift(1,nfrag(2,iprot),2,ib,iprot)=nshift_pair(ib)
128 n_shift(2,nfrag(2,iprot),2,ib,iprot)=nshift_pair(ib)
129 nc_fragm(nfrag(2,iprot),2,ib,iprot)=ncfrac_pair(ib)
130 nc_req_setf(nfrag(2,iprot),2,ib,iprot)=ncreq_pair(ib)
132 else if ((istruct(i,1,iprot).ge.2
133 & .and. istruct(i,1,iprot).le.4)
134 & .and. (istruct(j,1,iprot).ge.2
135 & .and. istruct(i,1,iprot).le.4)
136 & .and. ncont_frag_ref(ind,1,iprot).ge.len_cut ) then
137 nfrag(2,iprot)=nfrag(2,iprot)+1
138 write (iout,*) "Adding pair strands/sheets",i,j,
139 & " based on pp contacts"
140 do ib=1,nclass(iprot)-1
142 write (iout,*) "Batch",ib
144 if (icont_pair(ib).gt.0 .and. icontsc_pair(ib).eq.0) then
146 write (iout,*) "# pp contacts will be used",
149 ielecont(nfrag(2,iprot),2,ib,iprot)=1
150 isccont(nfrag(2,iprot),2,ib,iprot)=0
151 else if (icontsc_pair(ib).eq.1) then
153 write (iout,*) "# sc contacts will be used",
156 ielecont(nfrag(2,iprot),2,ib,iprot)=0
157 isccont(nfrag(2,iprot),2,ib,iprot)=1
158 write (iout,*) nfrag(2,iprot),2,ib,iprot,
159 & isccont(nfrag(2,iprot),2,ib,iprot)
161 ielecont(nfrag(2,iprot),2,ib,iprot)=0
162 isccont(nfrag(2,iprot),2,ib,iprot)=0
164 if (irms_pair(ib).gt.0) then
166 write (iout,*) "Fragment RMSD will be used",
169 irms(nfrag(2,iprot),2,ib,iprot)=1
171 irms(nfrag(2,iprot),2,ib,iprot)=0
173 if (iqwol_pair(ib).gt.0) then
175 write (iout,*) "Fragment Q will be used",
178 iqwol(nfrag(2,iprot),2,ib,iprot)=1
179 qcutfrag(nfrag(2,iprot),2,ib,iprot)=qcut_pair(ib)
181 npiece(nfrag(2,iprot),2,ib,iprot)=2
182 ipiece(1,nfrag(2,iprot),2,ib,iprot)=i
183 ipiece(2,nfrag(2,iprot),2,ib,iprot)=j
184 n_shift(1,nfrag(2,iprot),2,ib,iprot)=nshift_pair(ib)
185 n_shift(2,nfrag(2,iprot),2,ib,iprot)=nshift_pair(ib)
186 nc_fragm(nfrag(2,iprot),2,ib,iprot)=ncfrac_bet(ib)
187 nc_req_setf(nfrag(2,iprot),2,ib,iprot)=ncreq_bet(ib)
193 write (iout,*) "Pairs found"
194 do i=1,nfrag(2,iprot)
195 write (iout,*) ipiece(1,i,2,1,iprot),ipiece(2,i,2,1,iprot)
197 write (iout,*) "ielecont"
198 do ib=1,nclass(iprot)-1
199 write (iout,*) "structural level",ib
200 do i=1,iabs(nlevel(iprot))
201 write (iout,*) "Level",i
202 write (iout,*) (ielecont(j,i,ib,iprot),j=1,nfrag(i,iprot))
205 write (iout,*) "isccont"
206 do ib=1,nclass(iprot)-1
207 write (iout,*) "structural level",ib
208 do i=1,iabs(nlevel(iprot))
209 write (iout,*) "Level",i
210 write (iout,*) (isccont(j,i,ib,iprot),j=1,nfrag(i,iprot))