1 subroutine contact_cp2(var,var2,iff,ieval,in_pdb)
2 implicit real*8 (a-h,o-z)
7 include 'COMMON.SBRIDGE'
8 include 'COMMON.FFIELD'
9 include 'COMMON.IOUNITS'
10 include 'COMMON.DISTFIT'
12 include 'COMMON.CHAIN'
13 include 'COMMON.MINIM'
17 double precision var(maxvar),var2(maxvar)
18 double precision time0,time1
19 integer iff(maxres),ieval
20 double precision theta1(maxres),phi1(maxres),alph1(maxres),
24 call var_to_geom(nvar,var)
31 if ( iff(i).eq.1.and.iff(j).eq.1 ) then
53 call var_to_geom(nvar,var2)
56 if ( iff(i).eq.1 ) then
65 cd call write_pdb(3,'combined structure',0d0)
69 NY=((NRES-4)*(NRES-5))/2
70 call distfit(.true.,200)
73 cd write (iout,'(a,f6.2,a)') ' Time for distfit ',time1-time0,' sec'
83 call geom_to_var(nvar,var)
85 call minimize(etot,var,iretcode,nfun)
86 write(iout,*)'SUMSL return code is',iretcode,' eval SOFT',nfun
89 cd write (iout,'(a,f6.2,f8.2,a)')' Time for soft min.',time1-time0,
90 cd & nfun/(time1-time0),' SOFT eval/s'
91 call var_to_geom(nvar,var)
103 if ( iwsk.eq.0.and.iff(i-1).eq.0.and.iff(i).eq.1 ) then
108 if ( iwsk.eq.1.and.iff(i-1).eq.1.and.iff(i).eq.0 ) then
114 if (iff(nres).eq.1) then
120 cd write(linia,'(a6,i3,a1,i3,a1,i3,a1,i3)')
121 cd & "select",ij(1),"-",ij(2),
122 cd & ",",ij(3),"-",ij(4)
123 cd call write_pdb(in_pdb,linia,etot)
130 call minimize(etot,var,iretcode,nfun)
131 cd write(iout,*)'SUMSL DIST return code is',iretcode,' eval ',nfun
135 cd write (iout,'(a,f6.2,f8.2,a)')' Time for DIST min.',time1-time0,
136 cd & nfun/(time1-time0),' eval/s'
137 cd call var_to_geom(nvar,var)
139 cd call write_pdb(6,'dist structure',etot)