1 subroutine maxlikopt(nvarr,x)
4 include "DIMENSIONS.ZSCOPT"
10 include "COMMON.WEIGHTS"
11 include "COMMON.VMCPAR"
12 include "COMMON.OPTIM"
13 include "COMMON.CLASSES"
14 include "COMMON.ENERGIES"
15 include "COMMON.IOUNITS"
16 integer i,j,k,iprot,nf,ii,inn,n,nn,indn(max_ene)
17 logical solved,all_satisfied,not_done
18 double precision ran_number,f,f0,x(max_paropt),x0(max_paropt),
20 integer iran_num,nvarr
21 double precision tcpu,t0,t1,t0w,t1w
28 if (me.eq.master) then
29 if (nparmset.gt.0) then
30 write (liczba,'(bz,i4.4)') myparm
31 restartname=prefix(:lenpre)//"_par"//liczba//'.restart'
33 restartname=prefix(:lenpre)//'.restart'
37 restartname=prefix(:lenpre)//'.restart'
39 print *,"Start solving inequalities"
42 c Only evaluate initial energies
47 call minimize_setup(nvarr,x)
50 write (iout,*) "CPU time for setup:",t1-t0," sec."
52 write (iout,*) "Wall clock time for setup:",t1w-t0w," sec."
59 call print_minimize_results(nvarr)
67 call minimize_setup(nvarr,x)
70 write (iout,*) "CPU time for setup:",t1-t0," sec."
72 write (iout,*) "Wall clock time for setup:",t1w-t0w," sec."
76 print *,"Calling minimize"
77 call minimize(nvarr,x,f0)
79 write (iout,*) "CPU time for minimization:",t1-t0," sec."
82 write (iout,*) "Wall clock time for minimization:",t1w-t0w
89 c write (iout,*) "Start MCM procedure"
92 call print_minimize_results(nvarr)
99 print *,"Calling scan"
100 call minimize_setup(nvarr,x)
101 call scan(nvarr,x,f0,.true.)
105 call print_minimize_results(nvarr)
108 60 format(bz,100f10.5)
111 c-----------------------------------------------------------------------------
112 subroutine minimize_setup(nvar,x)
115 include "DIMENSIONS.ZSCOPT"
118 integer IERROR,TAG,STATUS(MPI_STATUS_SIZE)
121 include "COMMON.IOUNITS"
122 include "COMMON.CLASSES"
123 include "COMMON.NAMES"
124 include "COMMON.OPTIM"
125 include "COMMON.WEIGHTS"
126 include "COMMON.WEIGHTDER"
127 include "COMMON.VMCPAR"
128 include "COMMON.ENERGIES"
129 include "COMMON.TIME1"
130 double precision viol
131 integer i,j,k,ii,ib,ibatch,iprot,nvar,nf
132 double precision x(max_paropt)
136 write (iout,*) "Entered MINIMIZE_SETUP"
139 call func1(nvar,3,x_orig)
144 c write (iout,*) "Initial X",(x(i),i=1,nvar)
145 c write (iout,*) "X_orig",(x_orig(i),i=1,nvar)
146 c write (iout,*) "ww_oorig",(ww_oorig(i),i=1,n_ene)
150 write (iout,*) "x",(x(i),i=1,nvar)
153 write(iout,'(10(1x,a6,1x))')(wname(print_order(i))(:6),i=1,n_ene)
154 write(iout,40)(ww(print_order(i)),i=1,n_ene)
155 write(iout,*)'-----------------------------------'
159 40 format(10(f7.4,1x))
161 c------------------------------------------------------------------------------
162 subroutine print_minimize_results(nvarr)
165 include "DIMENSIONS.ZSCOPT"
168 integer ierror,status(MPI_STATUS_SIZE),tag
171 include "COMMON.CONTROL"
172 include "COMMON.WEIGHTS"
173 include "COMMON.WEIGHTDER"
174 include "COMMON.PROTNAME"
175 include "COMMON.ENERGIES"
176 include "COMMON.CLASSES"
177 include "COMMON.IOUNITS"
178 include "COMMON.VMCPAR"
179 include "COMMON.OPTIM"
180 include "COMMON.TIME1"
181 integer nf,nvarr,i,ib,ic,ii,num_nat_tot,iprot,igather
182 double precision x(max_ene)
183 double precision viol
187 c write (iout,*) "print_minimize_results"
189 write(iout,*) '----------------------'
191 call x2w(nvarr,xm(1))
192 c write (iout,*) "Calling func1"
194 call func1(nvarr,2,xm(1))
195 c write (iout,*) "Calling write_params"
197 call write_params(nvarr,nf,xm(1))
198 c write(iout,*) "After write_params"
202 if (nparmset.eq.1) then
203 call write_prot(ii,'NewE_all')
205 write (liczba,'(bz,i4.4)') myparm
206 call write_prot(ii,'NewE_all'//liczba)
209 c call make_distrib(iclass(ic,ii),ii)
217 c------------------------------------------------------------------------------
218 subroutine write_params(nvar,nf,x)
221 include "DIMENSIONS.ZSCOPT"
222 include "COMMON.CONTROL"
223 include "COMMON.WEIGHTS"
224 include "COMMON.NAMES"
225 include "COMMON.INTERACT"
226 include "COMMON.TORSION"
227 include "COMMON.LOCAL"
228 include "COMMON.SCCOR"
229 include "COMMON.CLASSES"
230 include "COMMON.ENERGIES"
231 include "COMMON.IOUNITS"
232 include "COMMON.FFIELD"
233 include "COMMON.OPTIM"
235 double precision x(max_paropt)
238 integer i,ii,j,l,ll,jj,pj,jstart,jend,it1,it2,k,iblock
239 integer itor2typ(-2:2) /-20,9,10,9,20/
240 character*1 aster(0:1) /" ","*"/,ast11,ast12,ast21,ast22
242 character*1 toronelet(-2:2) /"p","a","G","A","P"/
246 write (iout,*) "Weights (asterisk: optimized)"
247 write(iout,'(1x,15(a8,2x))') (wname(print_order(i))(:8),i=1,n_ene)
248 write(iout,50)(ww(print_order(i)),
249 & aster(imask(print_order(i))),i=1,n_ene)
251 C Write weights in UNRES format for the input file
252 if (nparmset.eq.1) then
253 open(88,file="weights_opt."//prefix(:ilen(prefix)),
256 write (liczba,'(bz,i4.4)') myparm
257 open(88,file="weights_opt."//prefix(:ilen(prefix))//"par_"
264 c jend=min0(i+4,n_ene)
269 c write(88,'(bz,2a,f7.5," ",$)')
270 c & wname(pj)(:ilen(wname(pj))),'=',ww(pj)
271 c jj=jj+ilen(wname(pj))+9
272 write(88,'(bz,2a,e11.5," ",$)')
273 & wname(pj)(:ilen(wname(pj))),'=',ww(pj)
274 jj=jj+ilen(wname(pj))+13
276 write (88,'(a,$)') (" ",j=1,79-jj)
279 write (88,'(bz,2(2a,f7.5," "))')
280 & "CUTOFF","=",7.0d0,"WCORR4","=",0.0d0
282 if (mod_side .or. mod_side_other) then
283 if (nparmset.eq.1) then
285 & file="sc_"//POT(:ilen(POT))//"_opt."//prefix(:ilen(prefix)),
289 & file="sc_"//POT(:ilen(POT))//"_opt."//prefix(:ilen(prefix))//
294 write(88,'(2i5)') ipot,expon
295 write(iout,'(/3a,2i3)') 'Potential is ',potname(ipot),
296 & ', exponents are ',expon,2*expon
297 goto (10,20,30,30,40) ipot
298 C----------------------- LJ potential ---------------------------------
299 10 write (88,*)((eps(i,j),j=i,ntyp),i=1,ntyp),(sigma0(i),i=1,ntyp)
301 write (iout,'(/a/)') 'Parameters of the LJ potential:'
302 write (iout,'(a/)') 'The epsilon array:'
303 call printmat(ntyp,ntyp,ntyp,iout,restyp,eps)
304 write (iout,'(/a)') 'One-body parameters:'
305 write (iout,'(a,4x,a)') 'residue','sigma'
306 write (iout,'(a3,6x,f10.5)') (restyp(i),sigma0(i),i=1,ntyp)
309 C----------------------- LJK potential --------------------------------
311 write (88,'(4f20.10)')(eps(i,j),j=i,ntyp)
314 write (88,'(4f20.10)') (sigma0(i),i=1,ntyp)
316 write (88,'(4f20.10)') (rr0(i),i=1,ntyp)
319 write (iout,'(/a/)') 'Parameters of the LJK potential:'
320 write (iout,'(a/)') 'The epsilon array:'
321 call printmat(ntyp,ntyp,ntyp,iout,restyp,eps)
322 write (iout,'(/a)') 'One-body parameters:'
323 write (iout,'(a,4x,2a)') 'residue',' sigma ',' r0 '
324 write (iout,'(a3,6x,2f10.5)') (restyp(i),sigma0(i),rr0(i),
328 C---------------------- GB or BP potential -----------------------------
330 write (88,'(4f20.15)') (eps(i,j),j=i,ntyp)
333 write (88,'(4f20.15)')(sigma0(i),i=1,ntyp)
335 write (88,'(4f20.15)')(sigii(i),i=1,ntyp)
337 write (88,'(4f20.15)')(chip0(i),i=1,ntyp)
339 write (88,'(4f20.15)')(alp(i),i=1,ntyp)
341 C For the GB potential convert sigma'**2 into chi'
344 chip(i)=(chip0(i)-1.0D0)/(chip0(i)+1.0D0)
349 write (iout,'(/a/)') 'Parameters of the BP potential:'
351 write (iout,'(/a/)') 'Parameters of the GB potential:'
353 write (iout,'(a/)') 'The epsilon array:'
354 call printmat(ntyp,ntyp,ntyp,iout,restyp,eps)
355 write (iout,'(/a)') 'One-body parameters (asterisk: optimized):'
356 write (iout,'(a,4x,4a)') 'residue',' sigma ','s||/s_|_^2',
359 write (iout,'(a3,6x,f10.5,1x,a1,3(f8.5,1x,a1))') restyp(i),
360 & sigma0(i),aster(mask_sigma(1,i)),sigii(i),aster(mask_sigma(2,i)),
361 & chip(i),aster(mask_sigma(3,i)),alp(i),aster(mask_sigma(4,i))
365 C--------------------- GBV potential -----------------------------------
366 40 write (88,*)((eps(i,j),j=i,ntyp),i=1,ntyp),
367 & (sigma0(i),i=1,ntyp),(rr0(i),i=1,ntyp),(sigii(i),i=1,ntyp),
368 & (chip(i),i=1,ntyp),(alp(i),i=1,ntyp)
370 write (iout,'(/a/)') 'Parameters of the GBV potential:'
371 write (iout,'(a/)') 'The epsilon array:'
372 call printmat(ntyp,ntyp,ntyp,iout,restyp,eps)
373 write (iout,'(/a)') 'One-body parameters:'
374 write (iout,'(a,4x,5a)') 'residue',' sigma ',' r0 ',
375 & 's||/s_|_^2',' chip ',' alph '
376 write (iout,'(a3,6x,5f10.5)') (restyp(i),sigma0(i),rr0(i),
377 & sigii(i),chip(i),alp(i),i=1,ntyp)
380 C-----------------------------------------------------------------------
384 if (mod_tor .or. tor_mode.eq.2) then
388 write (iout,'(a)') "Optimized weights of the torsional terms."
390 do i=-ntortyp+1,ntortyp-1
391 do j=-ntortyp+1,ntortyp-1
392 if (mask_tor(0,j,i,iblock).gt.0) then
393 write (iout,'(i4,2a4,f10.5)') 0,restyp(iloctyp(i)),
394 & restyp(iloctyp(j)),weitor(0,j,i,iblock)
399 if (nparmset.eq.1) then
401 open(88,file="tor_opt.parm."//prefix(:ilen(prefix)),
403 write (88,'(i1,7h *** ,2a,7h *** )') ntortyp,
404 & "Optimized torsional parameters ",prefix(:ilen(prefix))
405 write (88,'(40i2)') (itortyp(i),i=1,ntyp)
407 if (tor_mode.eq.0) then
409 write (iout,'(/a/)') 'Torsional constants:'
413 write (iout,*) 'ityp',i,' jtyp',j
414 write (iout,*) 'Fourier constants'
415 do k=1,nterm(i,j,iblock)
416 write (iout,'(2(1pe15.5))') v1(k,i,j,iblock),
419 write (iout,*) 'Lorenz constants'
420 do k=1,nlor(i,j,iblock)
421 write (iout,'(3(1pe15.5))')
422 & vlor1(k,i,j),vlor2(k,i,j),vlor3(k,i,j)
430 do j=-ntortyp+1,ntortyp-1
431 write (88,'(2i2,16h ************ ,a1,1h-,a1)')
432 & nterm(i,j,iblock),nlor(i,j,iblock),onelet(iloctyp(i)),
434 do k=1,nterm(i,j,iblock)
435 write (88,'(i6,13x,2(1pe18.5))') k,
436 & v1(k,i,j,iblock)*weitor(0,i,j,iblock),v2(k,i,j,
437 & iblock)*weitor(0,i,j,iblock)
439 do k=1,nlor(i,j,iblock)
440 write (88,'(i6,13x,3(1pe18.5))')
441 & k,vlor1(k,i,j)*weitor(k,i,j,iblock),
442 & vlor2(k,i,j)*weitor(k,i,j,iblock),
443 & vlor3(k,i,j)*weitor(k,i,j,iblock)
450 c Print valence-torsional parameters
452 & "Parameters of the valence-torsional potentials"
453 do i=-ntortyp+1,ntortyp-1
454 do j=-ntortyp+1,ntortyp-1
455 write (iout,'(3a)')"Type ",onelet(iloctyp(i)),onelet(iloctyp(j))
456 write (iout,'(3a5,2a15)') "itor","ival","jval","v_kcc","v2_kcc"
457 do k=1,nterm_kcc(j,i)
458 do l=1,nterm_kcc_Tb(j,i)
459 do ll=1,nterm_kcc_Tb(j,i)
460 write (iout,'(3i5,2f15.4)')
461 & k,l-1,ll-1,v1_kcc(ll,l,k,j,i),v2_kcc(ll,l,k,j,i)
468 do i=-ntortyp+1,ntortyp-1
469 do j=-ntortyp+1,ntortyp-1
470 write (88,'(16h ************ ,a1,1h-,a1)')
471 & onelet(iloctyp(i)),onelet(iloctyp(j))
472 write (88,'(2i5)') nterm_kcc(j,i),nterm_kcc_Tb(j,i)
473 do k=1,nterm_kcc(j,i)
474 do l=1,nterm_kcc_Tb(j,i)
475 do ll=1,nterm_kcc_Tb(j,i)
476 write (88,'(3i5,2(1pe15.5))') k,l-1,ll-1,
477 & v1_kcc(ll,l,k,j,i),v2_kcc(ll,l,k,j,i)
491 write (iout,'(a)') "Optimized weights of the sccor terms."
495 if (mask_tor(l,j,i,iblock).gt.0) then
496 write (iout,'(i4,2a4,f10.5)') l,restyp(isccortyp(j)),
497 & restyp(isccortyp(i)),weitor(l,j,i,1)
503 if (nparmset.eq.1) then
505 open(88,file="sccor_opt.parm."//prefix(:ilen(prefix)),
507 write (88,'(i2,7h *** ,2a,7h *** )') nsccortyp,
508 & "Optimized local correlation parameters ",prefix(:ilen(prefix))
509 write (88,'(20i4)') (isccortyp(i),i=1,ntyp)
513 write (88,'(2i4)') nterm_sccor(i,j),nlor_sccor(i,j)
514 write (88,'(12(1h*),1x,a1,1h-,a1)') onelet(i),onelet(j)
515 do k=1,nterm_sccor(i,j)
516 write (88,'(i6,13x,2(1pe18.5))') k,
517 & v1sccor(k,l,i,j)*weitor(l,i,j,1),
518 & v2sccor(k,l,i,j)*weitor(l,i,j,1)
528 C-----------------------------------------------------------------------
529 c 7/8/17 AL: Optimization of the bending parameters
532 & "Optimized angle potential coefficients (same for D-types)"
534 if (mask_ang(i).eq.0) cycle
535 write (iout,*) "Type: ",onelet(iloctyp(i))
536 do j=1,nbend_kcc_TB(i)
537 write (iout,'(i5,f15.5)') j,v1bend_chyb(j,i)
540 open(88,file="theta_opt.parm."//prefix(:ilen(prefix)),
542 write (88,'(i2)') nthetyp
543 do i=-nthetyp+1,nthetyp-1
544 write (88,'(i2,1x,12(1h*),1x,a1)')
545 & nbend_kcc_TB(i),onelet(iloctyp(i))
546 do j=0,nbend_kcc_TB(i)
547 write (88,'(i5,f20.10)') j,v1bend_chyb(j,i)
552 C-----------------------------------------------------------------------
553 if (mod_fourier(nloctyp).gt.0) then
556 & "Fourier coefficients of new (angle-dependent) cumulants",
557 & " (asterisk: optimized)"
559 write (iout,*) "Type: ",onelet(iloctyp(i))
560 write (iout,*) "Coefficients of the expansion of B1"
562 write (iout,'(3hB1(,i1,1h),3f10.5)') j,(bnew1(k,j,i),k=1,3)
564 write (iout,*) "Coefficients of the expansion of B2"
566 write (iout,'(3hB2(,i1,1h),3f10.5)') j,(bnew2(k,j,i),k=1,3)
568 write (iout,*) "Coefficients of the expansion of C"
569 write (iout,'(3hC11,3f10.5)') (ccnew(j,1,i),j=1,3)
570 write (iout,'(3hC12,3f10.5)') (ccnew(j,2,i),j=1,3)
571 write (iout,*) "Coefficients of the expansion of D"
572 write (iout,'(3hD11,3f10.5)') (ddnew(j,1,i),j=1,3)
573 write (iout,'(3hD12,3f10.5)') (ddnew(j,2,i),j=1,3)
574 write (iout,*) "Coefficients of the expansion of E"
575 write (iout,'(2hE0,3f10.5)') (e0new(j,i),j=1,3)
578 write (iout,'(1hE,2i1,2f10.5)') j,k,(eenew(l,j,k,i),l=1,2)
583 IF (SPLIT_FOURIERTOR) THEN
586 & "Fourier coefficients of new (angle-dependent) cumulants",
587 & " for torsional potentials (asterisk: optimized)"
589 write (iout,*) "Type: ",onelet(iloctyp(i))
590 write (iout,*) "Coefficients of the expansion of B1"
592 write (iout,'(3hB1(,i1,1h),3f10.5)')
593 & j,(bnew1tor(k,j,i),k=1,3)
595 write (iout,*) "Coefficients of the expansion of B2"
597 write (iout,'(3hB2(,i1,1h),3f10.5)')
598 & j,(bnew2tor(k,j,i),k=1,3)
600 write (iout,*) "Coefficients of the expansion of C"
601 write (iout,'(3hC11,3f10.5)') (ccnewtor(j,1,i),j=1,3)
602 write (iout,'(3hC12,3f10.5)') (ccnewtor(j,2,i),j=1,3)
603 write (iout,*) "Coefficients of the expansion of D"
604 write (iout,'(3hD11,3f10.5)') (ddnewtor(j,1,i),j=1,3)
605 write (iout,'(3hD12,3f10.5)') (ddnewtor(j,2,i),j=1,3)
606 write (iout,*) "Coefficients of the expansion of E"
607 write (iout,'(2hE0,3f10.5)') (e0newtor(j,i),j=1,3)
610 write (iout,'(1hE,2i1,2f10.5)')
611 & j,k,(eenewtor(l,j,k,i),l=1,2)
620 & "Fourier coefficients of old angle-independent cumulants",
621 & " (asterisk: optimized)"
623 write (iout,*) 'Type ',restyp(iloctyp(i))
624 write (iout,'(a,i2,a,f10.5,1x,a)')
625 & ('b(',j,')=',b(j,i),aster(mask_fourier(j,i)),j=1,13)
628 c Write a file with parameters for UNRES
629 if (nparmset.eq.1) then
630 open(88,file="fourier_opt.parm."//prefix(:ilen(prefix)),
633 open(88,file="fourier_opt.parm."//prefix(:ilen(prefix))//
638 IF (SPLIT_FOURIERTOR) THEN
639 write (88,'(i5,5x,a)') -nloctyp,
640 & "# Number of local interaction types"
642 write (88,'(i5,5x,a)') nloctyp,
643 & "# Number of local interaction types"
645 write (88,'(40i2)') (itype2loc(i),i=1,ntyp)
646 write (88,'(20i4)') (iloctyp(i),i=0,nloctyp)
648 write (88,'(a)') restyp(iloctyp(i))
651 write (88,'(f20.10,4h b1,i1,1h(,i1,1h))')
657 write (88,'(f20.10,4h b2,i1,1h(,i1,1h))')
663 write (88,'(f20.10,4h c1,i1,1h(,i1,1h))')
664 & 2*ccnew(ii,j,i),j,ii
669 write (88,'(f20.10,4h d1,i1,1h(,i1,1h))')
670 & 2*ddnew(ii,j,i),j,ii
676 write (88,'(f20.10,3h e,2i1,1h(,i1,1h))')
677 & eenew(ii,j,k,i),j,k,ii
682 write (88,'(f20.10,5h e0(,i1,1h))')
687 IF (SPLIT_FOURIERTOR) THEN
690 write (88,'(a)') restyp(iloctyp(i))
693 write (88,'(f20.10,4h b1,i1,1h(,i1,1h))')
694 & bnew1tor(ii,j,i),j,ii
699 write (88,'(f20.10,4h b2,i1,1h(,i1,1h))')
700 & bnew2tor(ii,j,i),j,ii
705 write (88,'(f20.10,4h c1,i1,1h(,i1,1h))')
706 & 2*ccnewtor(ii,j,i),j,ii
711 write (88,'(f20.10,4h d1,i1,1h(,i1,1h))')
712 & 2*ddnewtor(ii,j,i),j,ii
718 write (88,'(f20.10,3h e,2i1,1h(,i1,1h))')
719 & eenewtor(ii,j,k,i),j,k,ii
724 write (88,'(f20.10,5h e0(,i1,1h))')
732 write (88,'(i5,5x,a)') nloctyp,
733 & "# Number of local interaction types"
735 write (88,'(a)') restyp(iloctyp(i))
737 write (88,'(f20.15)') b(j,i)
745 & 'Electrostatic interaction constants (asterisk: optimized):'
746 write (iout,'(1x,a,1x,a,7x,a,15x,a,15x,a,13x,a)')
747 & 'IT','JT','EPP','RPP','ELPP6','ELPP3'
750 write(iout,'(2i3,4(1pe15.4,1x,a1,1x))')i,j,
751 & epp(i,j),aster(mask_elec(i,j,1)),
752 & rpp(i,j),aster(mask_elec(i,j,2)),
753 & elpp6(i,j),aster(mask_elec(i,j,3)),
754 & elpp3(i,j),aster(mask_elec(i,j,4))
758 write (iout,'(1x,a,1x,a,10x,a,11x,a,11x,a,11x,a)')
759 & 'IT','JT','APP','BPP','AEL6','AEL3'
762 write(iout,'(2i3,4(1pe15.4))')i,j,app(i,j),bpp(i,j),
763 & ael6(i,j),ael3(i,j)
766 C Write electrostatic interaction parameters to a file
767 if (nparmset.eq.1) then
768 open(88,file="electr_opt.parm."//prefix(:ilen(prefix)),
771 open(88,file="electr_opt.parm."//prefix(:ilen(prefix))//
775 write(88,'(4f15.10,5x,a)')((epp(i,j),j=1,2),i=1,2),"! EPP"
776 write(88,'(4f15.10,5x,a)')((rpp(i,j),j=1,2),i=1,2),"! RPP"
777 write(88,'(4f15.10,5x,a)')((elpp6(i,j),j=1,2),i=1,2),"! ELPP6"
778 write(88,'(4f15.10,5x,a)')((elpp3(i,j),j=1,2),i=1,2),"! ELPP3"
784 & "Parameters of SC-p interactions (star: optimized):"
785 write (iout,'(t14,a,t34,a)') "TYPE 1","TYPE 2"
786 write (iout,'(8a)') "SC TYPE"," EPS_SCP "," R_SCP ",
787 & " EPS_SCP "," R_SCP "
789 ast11 = aster(mask_scp(i,1,1))
790 ast12 = aster(mask_scp(i,1,2))
791 ast21 = aster(mask_scp(i,2,1))
792 ast22 = aster(mask_scp(i,2,2))
793 if (mask_scp(i,1,1).eq.0) ast11 = aster(mask_scp(0,1,1))
794 if (mask_scp(i,1,2).eq.0) ast12 = aster(mask_scp(0,1,2))
795 if (mask_scp(i,2,1).eq.0) ast21 = aster(mask_scp(0,2,1))
796 if (mask_scp(i,2,2).eq.0) ast22 = aster(mask_scp(0,2,2))
797 write (iout,'(2x,A3,2x,4(f8.3,1x,a1))') restyp(i),
798 & eps_scp(i,1),ast11,rscp(i,1),ast12,eps_scp(i,2),ast21,
801 C Write SCp parameters to a file
802 if (nparmset.eq.1) then
803 open(88,file="scp_opt.parm."//prefix(:ilen(prefix)),
806 open(88,file="scp_opt.parm."//prefix(:ilen(prefix))//
811 write(88,'(4f15.10,5x,a)') eps_scp(i,1),rscp(i,1),
812 & eps_scp(i,2),rscp(i,2),restyp(i)
816 50 format(bz,15(f8.5,1x,a1))
817 60 format(bz,100f10.5)
819 c------------------------------------------------------------------------------
820 subroutine write_zscore
823 include "DIMENSIONS.ZSCOPT"
824 include "COMMON.ENERGIES"
825 include "COMMON.CLASSES"
826 include "COMMON.PROTNAME"
827 include "COMMON.VMCPAR"
828 include "COMMON.IOUNITS"
829 include "COMMON.WEIGHTS"
830 include "COMMON.WEIGHTDER"
831 include "COMMON.COMPAR"
832 include "COMMON.OPTIM"
833 include "COMMON.THERMAL"
834 integer i,j,k,iprot,ib
835 character*6 namnat(5) /"angrms","Q","rmsd","rgy","sign"/
841 write (iout,'(a,2x,a)') "Protein",
842 & protname(iprot)(:ilen(protname(iprot)))
845 write (iout,'(a)')"Maximum likelihood."
847 do ib=1,nbeta(1,iprot)
848 write (iout,'(f8.1,f10.5)')
849 & 1.0d0/(Rgas*betaT(ib,1,iprot)),sumlik(ib,iprot)
854 write (iout,'(a)')"Specific heat."
856 write (iout,'(a,f10.5)') "Baseline",heatbase(iprot)
857 do ib=1,nbeta(2,iprot)
858 write (iout,'(f8.1,3f10.5)')
859 & 1.0d0/(Rgas*betaT(ib,2,iprot)),
860 & zvtot(ib,iprot),target_cv(ib,iprot),weiCv(ib,iprot)
863 if (natlike(iprot).gt.0) write (iout,'(a)')"Nativelikeness."
864 do i=1,natlike(iprot)
865 write (iout,*) "Property",i,numnat(i,iprot)
866 if (natdim(i,iprot).eq.1) then
867 do ib=1,nbeta(i+2,iprot)
868 write (iout,'(f7.2,2f10.5)')
869 & 1.0d0/(Rgas*betaT(ib,i+2,iprot)),nuave(1,ib,i,iprot),
870 & nuexp(1,ib,i,iprot),weinat(1,ib,i,iprot)
873 do ib=1,nbeta(i+2,iprot)
874 write (iout,'("Temperature",f7.2," NATDIM",i5)')
875 & 1.0d0/(Rgas*betaT(ib,i+2,iprot)),natdim(i,iprot)
876 do k=1,natdim(i,iprot)
877 write (iout,'(3f10.5)') nuave(k,ib,i,iprot),
878 & nuexp(k,ib,i,iprot),weinat(k,ib,i,iprot)
888 c------------------------------------------------------------------------------
889 subroutine write_prot(ii,przed)
891 include "DIMENSIONS.ZSCOPT"
892 include "COMMON.ENERGIES"
893 include "COMMON.CLASSES"
894 include "COMMON.PROTNAME"
895 include "COMMON.VMCPAR"
896 include "COMMON.IOUNITS"
897 include "COMMON.COMPAR"
903 nazwa=przed(:ilen(przed))//'.'//prefix(:ilen(prefix))
904 & //'.'//protname(ii)
905 open(unit=istat,file=nazwa)
907 write(istat,'(i10,3f15.3,20e15.5)')
908 & i,e_total(i,ii),eini(i,ii),entfac(i,ii),
909 & (Ptab(i,j,ii),j=1,nbeta(1,ii))