5 implicit real*8 (a-h,o-z)
7 include 'DIMENSIONS.ZSCOPT'
8 include 'COMMON.IOUNITS'
11 include 'COMMON.INTERACT'
12 include 'COMMON.LOCAL'
13 include 'COMMON.NAMES'
14 include 'COMMON.CHAIN'
15 include 'COMMON.FFIELD'
16 include 'COMMON.SBRIDGE'
17 include 'COMMON.TORCNSTR'
18 include 'COMMON.CONTROL'
19 character*4 sequence(maxres)
21 double precision x(maxvar)
22 character*320 controlcard,ucase
23 dimension itype_pdb(maxres)
25 call card_concat(controlcard,.true.)
26 call reada(controlcard,'SCAL14',scal14,0.4d0)
27 call reada(controlcard,'SCALSCP',scalscp,1.0d0)
28 call reada(controlcard,'CUTOFF',cutoff_corr,7.0d0)
29 call reada(controlcard,'DELT_CORR',delt_corr,0.5d0)
30 r0_corr=cutoff_corr-delt_corr
31 call readi(controlcard,"NRES",nres,0)
32 iscode=index(controlcard,"ONE_LETTER")
34 write (iout,*) "Error: no residues in molecule"
37 if (nres.gt.maxres) then
38 write (iout,*) "Error: too many residues",nres,maxres
40 write(iout,*) 'nres=',nres
41 C Read sequence of the protein
43 read (inp,'(80a1)') (sequence(i)(1:1),i=1,nres)
45 read (inp,'(20(1x,a3))') (sequence(i),i=1,nres)
47 C Convert sequence to numeric code
49 itype(i)=rescode(i,sequence(i),iscode)
51 write (iout,*) "Numeric code:"
52 write (iout,'(20i4)') (itype(i),i=1,nres)
55 if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) then
57 if (itype(i).eq.ntyp1) then
61 else if (iabs(itype(i+1)).ne.20) then
63 else if (iabs(itype(i)).ne.20) then
72 write (iout,*) i,itype(i),itel(i)
76 if (with_dihed_constr) then
78 read (inp,*) ndih_constr
79 if (ndih_constr.gt.0) then
81 C write (iout,*) 'FTORS',ftors
82 read (inp,*) (idih_constr(i),phi0(i),drange(i),ftors(i),
85 & 'There are',ndih_constr,' constraints on phi angles.'
87 write (iout,'(i5,3f8.3)') idih_constr(i),phi0(i),drange(i),
91 phi0(i)=deg2rad*phi0(i)
92 drange(i)=deg2rad*drange(i)
100 if (itype(1).eq.ntyp1) nnt=2
101 if (itype(nres).eq.ntyp1) nct=nct-1
102 write(iout,*) 'NNT=',NNT,' NCT=',NCT
106 write (iout,'(/a,i3,a)') 'The chain contains',ns,
107 & ' disulfide-bridging cysteines.'
108 write (iout,'(20i4)') (iss(i),i=1,ns)
110 write(iout,*)"Running with dynamic disulfide-bond formation"
112 write (iout,'(/a/)') 'Pre-formed links are:'
118 write (iout,'(2a,i3,3a,i3,a,3f10.3)')
119 & restyp(it1),'(',i1,') -- ',restyp(it2),'(',i2,')',
120 & dhpb(i),ebr,forcon(i)
125 if (ns.gt.0.and.dyn_ss) then
129 forcon(i-nss)=forcon(i)
136 dyn_ss_mask(iss(i))=.true.
141 c-----------------------------------------------------------------------------
142 logical function seq_comp(itypea,itypeb,length)
144 integer length,itypea(length),itypeb(length)
147 if (itypea(i).ne.itypeb(i)) then
155 c-----------------------------------------------------------------------------
156 subroutine read_bridge
157 C Read information about disulfide bridges.
158 implicit real*8 (a-h,o-z)
160 include 'DIMENSIONS.ZSCOPT'
161 include 'COMMON.IOUNITS'
164 include 'COMMON.INTERACT'
165 include 'COMMON.NAMES'
166 include 'COMMON.CHAIN'
167 include 'COMMON.FFIELD'
168 include 'COMMON.SBRIDGE'
169 C Read bridging residues.
170 read (inp,*) ns,(iss(i),i=1,ns)
172 write (iout,*) 'ns=',ns,' iss:',(iss(i),i=1,ns)
173 C Check whether the specified bridging residues are cystines.
175 if (itype(iss(i)).ne.1) then
176 write (iout,'(2a,i3,a)')
177 & 'Do you REALLY think that the residue ',
178 & restyp(itype(iss(i))),i,
179 & ' can form a disulfide bridge?!!!'
180 write (*,'(2a,i3,a)')
181 & 'Do you REALLY think that the residue ',
182 & restyp(itype(iss(i))),i,
183 & ' can form a disulfide bridge?!!!'
187 C Read preformed bridges.
189 read (inp,*) nss,(ihpb(i),jhpb(i),i=1,nss)
190 write (iout,*) 'nss=',nss,' ihpb,jhpb: ',(ihpb(i),jhpb(i),i=1,nss)
193 C Check if the residues involved in bridges are in the specified list of
197 if (ihpb(i).eq.ihpb(j).or.ihpb(i).eq.jhpb(j)
198 & .or.jhpb(i).eq.ihpb(j).or.jhpb(i).eq.jhpb(j)) then
199 write (iout,'(a,i3,a)') 'Disulfide pair',i,
200 & ' contains residues present in other pairs.'
201 write (*,'(a,i3,a)') 'Disulfide pair',i,
202 & ' contains residues present in other pairs.'
207 if (ihpb(i).eq.iss(j)) goto 10
209 write (iout,'(a,i3,a)') 'Pair',i,' contains unknown cystine.'
212 if (jhpb(i).eq.iss(j)) goto 20
214 write (iout,'(a,i3,a)') 'Pair',i,' contains unknown cystine.'
227 c------------------------------------------------------------------------------
228 subroutine read_angles(kanal,iscor,energ,iprot,*)
229 implicit real*8 (a-h,o-z)
231 include 'DIMENSIONS.ZSCOPT'
232 include 'COMMON.INTERACT'
233 include 'COMMON.SBRIDGE'
236 include 'COMMON.CHAIN'
237 include 'COMMON.IOUNITS'
239 read(kanal,'(a80)',end=10,err=10) lineh
240 read(lineh(:5),*,err=8) ic
241 read(lineh(6:),*,err=8) energ
244 print *,'error, assuming e=1d10',lineh
248 read(lineh(18:),*,end=10,err=10) nss
250 read (lineh(20:),*,end=10,err=10)
251 & (IHPB(I),JHPB(I),I=1,NSS),iscor
253 read (lineh(20:),*,end=10,err=10) (IHPB(I),JHPB(I),I=1,8)
254 read (kanal,*,end=10,err=10) (IHPB(I),JHPB(I),
257 c print *,"energy",energ," iscor",iscor
258 read (kanal,*,err=10,end=10) (theta(i),i=3,nres)
259 read (kanal,*,err=10,end=10) (phi(i),i=4,nres)
260 read (kanal,*,err=10,end=10) (alph(i),i=2,nres-1)
261 read (kanal,*,err=10,end=10) (omeg(i),i=2,nres-1)
263 theta(i)=deg2rad*theta(i)
264 phi(i)=deg2rad*phi(i)
265 alph(i)=deg2rad*alph(i)
266 omeg(i)=deg2rad*omeg(i)