1 subroutine read_ref_structure(*)
3 C Read the reference structure from the PDB file or from a PDB file or in the form of the dihedral
8 include 'DIMENSIONS.ZSCOPT'
9 include 'DIMENSIONS.COMPAR'
10 include 'COMMON.IOUNITS'
13 include 'COMMON.INTERACT'
14 include 'COMMON.LOCAL'
15 include 'COMMON.NAMES'
16 include 'COMMON.CHAIN'
17 include 'COMMON.FFIELD'
18 include 'COMMON.SBRIDGE'
19 include 'COMMON.HEADER'
20 include 'COMMON.CONTROL'
21 include 'COMMON.CONTACTS1'
22 include 'COMMON.PEPTCONT'
23 include 'COMMON.TIME1'
24 include 'COMMON.COMPAR'
25 character*4 sequence(maxres)
27 double precision x(maxvar)
28 integer itype_pdb(maxres)
30 integer i,j,k,nres_pdb,iaux
31 double precision ddsc,dist
38 write (iout,*) "pdbref",pdbref
40 read(inp,'(a)') pdbfile
41 write (iout,'(2a,1h.)') 'PDB data will be read from file ',
42 & pdbfile(:ilen(pdbfile))
43 open(ipdbin,file=pdbfile,status='old',err=33)
45 33 write (iout,'(a)') 'Error opening PDB file.'
62 if (nsup.le.(nct-nnt+1)) then
64 if (seq_comp(itype(nnt+i),itype_pdb(nstart_sup),
66 do j=nnt+nsup-1,nnt,-1
68 cref(k,nres+j+i,kkk)=cref(k,nres_pdb+j,kkk)
71 do j=nnt+nsup-1,nnt,-1
73 cref(k,j+i,kkk)=cref(k,j,kkk)
75 phi_ref(j+i)=phi_ref(j)
76 theta_ref(j+i)=theta_ref(j)
77 alph_ref(j+i)=alph_ref(j)
78 omeg_ref(j+i)=omeg_ref(j)
82 write (iout,'(i5,3f10.5,5x,3f10.5)')
83 & j,(cref(k,j,kkk),k=1,3),(cref(k,j+nres,kkk),k=1,3)
92 & 'Error - sequences to be superposed do not match.'
95 do i=0,nsup-(nct-nnt+1)
96 if (seq_comp(itype(nnt),itype_pdb(nstart_sup+i),
99 nstart_sup=nstart_sup+i
105 & 'Error - sequences to be superposed do not match.'
109 write (iout,'(a,i5)')
110 & 'Experimental structure begins at residue',nstart_seq
112 call read_angles(inp,*38)
114 38 write (iout,'(a)') 'Error reading reference structure.'
127 nend_sup=nstart_sup+nsup-1
135 dc(j,nres+i)=cref(j,nres+i,kkk)-cref(j,i,kkk)
137 if (itype(i).ne.10) then
138 ddsc = dist(i,nres+i)
140 dc_norm(j,nres+i)=dc(j,nres+i)/ddsc
144 dc_norm(j,nres+i)=0.0d0
147 c write (iout,*) "i",i," dc_norm",(dc_norm(k,nres+i),k=1,3),
148 c " norm",dc_norm(1,nres+i)**2+dc_norm(2,nres+i)**2+
149 c dc_norm(3,nres+i)**2
151 dc(j,i)=c(j,i+1)-c(j,i)
155 dc_norm(j,i)=dc(j,i)/ddsc
158 c print *,"Calling contact"
159 call contact(.true.,ncont_ref,icont_ref(1,1),
160 & nstart_sup,nend_sup)
161 c print *,"Calling elecont"
162 call elecont(.true.,ncont_pept_ref,
163 & icont_pept_ref(1,1),
164 & nstart_sup,nend_sup)
165 write (iout,'(a,i3,a,i3,a,i3,a)')
166 & 'Number of residues to be superposed:',nsup,
167 & ' (from residue',nstart_sup,' to residue',