1 subroutine read_dist_constr
2 implicit real*8 (a-h,o-z)
7 include 'COMMON.CONTROL'
9 include 'COMMON.IOUNITS'
10 include 'COMMON.SBRIDGE'
11 integer ifrag_(2,100),ipair_(2,100)
12 double precision wfrag_(100),wpair_(100)
13 character*500 controlcard
15 write (iout,*) "Calling read_dist_constr"
16 write (iout,*) "nres",nres," nstart_sup",nstart_sup," nsup",nsup
18 call card_concat(controlcard)
19 call readi(controlcard,"NFRAG",nfrag_,0)
20 call readi(controlcard,"NPAIR",npair_,0)
21 call readi(controlcard,"NDIST",ndist_,0)
22 call reada(controlcard,'DIST_CUT',dist_cut,5.0d0)
23 call multreadi(controlcard,"IFRAG",ifrag_(1,1),2*nfrag_,0)
24 call multreadi(controlcard,"IPAIR",ipair_(1,1),2*npair_,0)
25 call multreada(controlcard,"WFRAG",wfrag_(1),nfrag_,0.0d0)
26 call multreada(controlcard,"WPAIR",wpair_(1),npair_,0.0d0)
27 write (iout,*) "NFRAG",nfrag_," NPAIR",npair_," NDIST",ndist_
28 write (iout,*) "IFRAG"
30 write (iout,*) i,ifrag_(1,i),ifrag_(2,i),wfrag_(i)
32 write (iout,*) "IPAIR"
34 write (iout,*) i,ipair_(1,i),ipair_(2,i),wpair_(i)
38 if (ifrag_(1,i).lt.nstart_sup) ifrag_(1,i)=nstart_sup
39 if (ifrag_(2,i).gt.nstart_sup+nsup-1)
40 & ifrag_(2,i)=nstart_sup+nsup-1
41 c write (iout,*) i,ifrag_(1,i),ifrag_(2,i),wfrag_(i)
43 if (wfrag_(i).gt.0.0d0) then
44 do j=ifrag_(1,i),ifrag_(2,i)-1
46 write (iout,*) "j",j," k",k
48 if (constr_dist.eq.1) then
53 forcon(nhpb)=wfrag_(i)
54 else if (constr_dist.eq.2) then
55 if (ddjk.le.dist_cut) then
60 forcon(nhpb)=wfrag_(i)
67 forcon(nhpb)=wfrag_(i)*dexp(-0.5d0*(ddjk/dist_cut)**2)
70 & write (iout,'(a,3i5,f8.2,1pe12.2)') "+dist.constr ",
71 & nhpb,ihpb(nhpb),jhpb(nhpb),dhpb(nhpb),forcon(nhpb)
77 if (wpair_(i).gt.0.0d0) then
85 do j=ifrag_(1,ii),ifrag_(2,ii)
86 do k=ifrag_(1,jj),ifrag_(2,jj)
90 forcon(nhpb)=wpair_(i)
92 write (iout,'(a,3i5,f8.2,f10.1)') "+dist.constr ",
93 & nhpb,ihpb(nhpb),jhpb(nhpb),dhpb(nhpb),forcon(nhpb)
99 read (inp,*) ihpb(nhpb+1),jhpb(nhpb+1),forcon(nhpb+1)
100 if (forcon(nhpb+1).gt.0.0d0) then
102 dhpb(nhpb)=dist(ihpb(nhpb),jhpb(nhpb))
103 write (iout,'(a,3i5,f8.2,f10.1)') "+dist.constr ",
104 & nhpb,ihpb(nhpb),jhpb(nhpb),dhpb(nhpb),forcon(nhpb)