2 implicit real*8 (a-h,o-z)
8 include 'COMMON.IOUNITS'
10 include 'COMMON.CONTROL'
11 include 'COMMON.TORCNSTR'
12 double precision energia(0:n_ene)
13 character*5 angid(4) /'PHI','THETA','ALPHA','OMEGA'/
14 double precision ang_list(10)
15 double precision g(maxvar),x(maxvar)
17 write (iout,'(a,i3,a)')'Energy map constructed in the following ',
18 & nmap,' groups of variables:'
20 write (iout,'(2a,i3,a,i3)') angid(kang(i)),' of residues ',
21 & res1(i),' to ',res2(i)
25 if (nmax.lt.nstep(i)) nmax=nstep(i)
29 write (istat,'(1h#,a14,29a15)') (" ",k=1,nmap),
30 & (ename(print_order(k)),k=1,nprint_ene),"ETOT","GNORM"
38 if (nn(j).gt.nstep(j)) goto 10
41 Cd write (iout,*) i,iii,(nn(j),j=1,nmap)
43 ang_list(j)=ang_from(j)
44 & +(nn(j)-1)*(ang_to(j)-ang_from(j))/nstep(j)
46 goto (1,2,3,4), kang(j)
47 1 phi(k)=deg2rad*ang_list(j)
48 if (minim) phi0(k-res1(j)+1)=deg2rad*ang_list(j)
50 2 theta(k)=deg2rad*ang_list(j)
52 3 alph(k)=deg2rad*ang_list(j)
54 4 omeg(k)=deg2rad*ang_list(j)
59 call int_from_cart1(.false.)
61 call geom_to_var(nvar,x)
62 call minimize(etot,x,iretcode,nfun)
63 print *,'SUMSL return code is',iretcode,' eval ',nfun
67 call geom_to_var(nvar,x)
69 call etotal(energia(0))
73 call gradient(nvar,x,nf,g,uiparm,urparm,fdum)
81 c write (iout,'(6(1pe15.5))') (ang_list(k),k=1,nmap),etot,gnorm
82 write (istat,'(30e15.5)') (ang_list(k),k=1,nmap),
83 & (energia(print_order(ii)),ii=1,nprint_ene),etot,gnorm
84 c write (iout,*) 'POINT',I,' ANGLES:',(ang_list(k),k=1,nmap)
86 c call enerprint(energia)