2 implicit real*8 (a-h,o-z)
8 include 'COMMON.IOUNITS'
10 include 'COMMON.CONTROL'
11 include 'COMMON.TORCNSTR'
12 include 'COMMON.HEADER'
13 double precision energia(0:n_ene)
14 character*5 angid(4) /'PHI','THETA','ALPHA','OMEGA'/
15 double precision ang_list(10)
16 double precision g(maxvar),x(maxvar)
18 write (iout,'(a,i3,a)')'Energy map constructed in the following ',
19 & nmap,' groups of variables:'
21 write (iout,'(2a,i3,a,i3)') angid(kang(i)),' of residues ',
22 & res1(i),' to ',res2(i)
24 write (iout,*) "outpdb",outpdb
27 if (nmax.lt.nstep(i)) nmax=nstep(i)
31 write (istat,'(1h#,a14,29a15)') (" ",k=1,nmap),
32 & (ename(print_order(k)),k=1,nprint_ene),"ETOT","GNORM"
40 if (nn(j).gt.nstep(j)) goto 10
43 Cd write (iout,*) i,iii,(nn(j),j=1,nmap)
45 ang_list(j)=ang_from(j)
46 & +(nn(j)-1)*(ang_to(j)-ang_from(j))/nstep(j)
48 goto (1,2,3,4), kang(j)
49 1 phi(k)=deg2rad*ang_list(j)
50 if (minim) phi0(k-res1(j)+1)=deg2rad*ang_list(j)
52 2 theta(k)=deg2rad*ang_list(j)
54 3 alph(k)=deg2rad*ang_list(j)
56 4 omeg(k)=deg2rad*ang_list(j)
60 call chainbuild_extconf
62 call geom_to_var(nvar,x)
63 call minimize(etot,x,iretcode,nfun)
64 print *,'SUMSL return code is',iretcode,' eval ',nfun
68 call geom_to_var(nvar,x)
70 call etotal(energia(0))
74 call gradient(nvar,x,nf,g,uiparm,urparm,fdum)
82 c write (iout,'(6(1pe15.5))') (ang_list(k),k=1,nmap),etot,gnorm
83 write (istat,'(30e15.5)') (ang_list(k),k=1,nmap),
84 & (energia(print_order(ii)),ii=1,nprint_ene),etot,gnorm
85 if (outpdb) call pdbout(etot,titel(:50),ipdb)
86 c write (iout,*) 'POINT',I,' ANGLES:',(ang_list(k),k=1,nmap)
88 c call enerprint(energia)