X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Funres.f90;h=12368afea108b761ce882aac5adb8c153de38910;hb=a5189f6bb38b0708d043a694919b39f8f4a820a6;hp=f75675ab432b8b7e497f76c5b30d88d6a2ec3364;hpb=35f220f409bd5d21be33a402d79da2c23d3e0c3a;p=unres4.git diff --git a/source/unres/unres.f90 b/source/unres/unres.f90 index f75675a..12368af 100644 --- a/source/unres/unres.f90 +++ b/source/unres/unres.f90 @@ -68,7 +68,6 @@ text_mode_calc(13) = 'Not used 13' text_mode_calc(14) = 'Replica exchange molecular dynamics (REMD)' ! external ilen -!el run_wham=.false. ! call memmon_print_usage() call init_task @@ -106,11 +105,7 @@ else #endif if (modecalc.eq.0) then -!write(iout,*)"!!!!!!!!!!!!!!!!! in unres" - call exec_eeval_or_minim -!write(iout,*)"!!!!!!!!!!!!!!!!! in unres" - else if (modecalc.eq.1) then call exec_regularize else if (modecalc.eq.2) then @@ -121,8 +116,6 @@ call exec_mult_eeval_or_minim else if (modecalc.eq.5) then call exec_checkgrad -!write(iout,*) "check grad dwa razy" -!el call exec_checkgrad else if (ModeCalc.eq.7) then call exec_map else if (ModeCalc.eq.8) then @@ -137,7 +130,6 @@ write (iout,'(a)') 'This calculation type is not supported',& ModeCalc endif -!elwrite(iout,*)"!!!!!!!!!!!!!!!!!" #ifdef MPI endif @@ -164,12 +156,15 @@ use geometry, only:chainbuild use MDyn use io_units !include 'COMMON.IOUNITS' +! use io_common implicit none ! include 'DIMENSIONS' #ifdef MPI include "mpif.h" #endif + print *,'Start MD' call alloc_MD_arrays + print *,'After MD alloc' if (me.eq.king .or. .not. out1file) & write (iout,*) "Calling chainbuild" call chainbuild @@ -196,11 +191,11 @@ call alloc_MD_arrays call alloc_MREMD_arrays +! if (me.eq.king .or. .not. out1file) & +! write (iout,*) "Calling chainbuild" +! call chainbuild if (me.eq.king .or. .not. out1file) & - write (iout,*) "Calling chainbuild" - call chainbuild - if (me.eq.king .or. .not. out1file) & - write (iout,*) "Calling REMD" + write (iout,*) "Calling REMD",remd_mlist,nrep if (remd_mlist) then call MREMD else @@ -217,11 +212,13 @@ use control_data !include 'COMMON.CONTROL''COMMON.TIME1''COMMON.NAMES''COMMON.HEADER' use io_units !include 'COMMON.IOUNITS' use names -! use io_common ! use energy !include 'COMMON.INTERACT''COMMON.CONTACTS''COMMON.VAR''COMMON.FFIELD' 'COMMON.SBRIDGE' use geometry_data !include 'COMMON.GEO''COMMON.CHAIN' ! use REMD !include 'COMMON.REMD' ! use MD !include 'COMMON.MD' + + use energy_data + use io_base use geometry, only:chainbuild use energy @@ -245,14 +242,24 @@ integer,dimension(4,nres/3) :: iharp !(4,nres/3)(4,maxres/3) logical :: fail real(kind=8) :: rms,frac,frac_nn,co + + integer :: j,k call alloc_compare_arrays - if (indpdb.eq.0) call chainbuild + if ((indpdb.eq.0).and.(.not.read_cart)) then + call chainbuild + write(iout,*) 'Warning: Calling chainbuild' + endif #ifdef MPI time00=MPI_Wtime() #endif call chainbuild_cart - +! write(iout,*)"in exec_eeval or minimim",split_ene +! do j=1,2*nres+2 +! write(iout,*)"cccccc",j,(c(i,j),i=1,3) +! write(iout,*)"dcccccc",j,(dc(i,j),i=1,3) +! enddo if (split_ene) then +! write(iout,*)"in exec_eeval or minimim" print *,"Processor",myrank," after chainbuild" icall=1 @@ -301,10 +308,13 @@ #ifdef MPI time1=MPI_WTIME() #endif +! call check_ecartint !el call minim_dc(etot,iretcode,nfun) +! call check_ecartint !el else if (indpdb.ne.0) then call bond_regular + write(iout,*) 'Warning: Calling chainbuild' call chainbuild endif call geom_to_var(nvar,varia) @@ -312,7 +322,11 @@ #ifdef MPI time1=MPI_WTIME() #endif +! call check_eint +! call exec_checkgrad !el call minimize(etot,varia,iretcode,nfun) +! call check_eint +! call exec_checkgrad !el endif print *,'SUMSL return code is',iretcode,' eval ',nfun #ifdef MPI @@ -333,12 +347,14 @@ write (iout,'(a,i20)') '# of energy evaluations:',nfun+1 write (iout,'(a,f16.3)')'# of energy evaluations/sec:',evals else - print *,'refstr=',refstr + print *,'refstr=',refstr,frac,frac_nn,co if (refstr) call rms_nac_nnc(rms,frac,frac_nn,co,.true.) + print *,"after rms_nac_ncc" call briefout(0,etot) endif if (outpdb) call pdbout(etot,titel(:32),ipdb) if (outmol2) call mol2out(etot,titel(:32)) + write(iout,*) "after exec_eeval_or_minim" return end subroutine exec_eeval_or_minim !----------------------------------------------------------------------------- @@ -502,6 +518,7 @@ read (intin,'(i5)',end=1100,err=1100) iconf call read_angles(intin,*11) call geom_to_var(nvar,varia) + write(iout,*) 'Warning: Calling chainbuild1' call chainbuild endif write (iout,'(a,i7)') 'Conformation #',iconf @@ -547,6 +564,7 @@ read (intin,'(i5)',end=11,err=11) iconf call read_angles(intin,*11) call geom_to_var(nvar,varia) + write(iout,*) 'Warning: Calling chainbuild2' call chainbuild endif write (iout,'(a,i7)') 'Conformation #',iconf @@ -582,6 +600,7 @@ ! print *,'result received from worker ',man,' sending now' call var_to_geom(nvar,varia) + write(iout,*) 'Warning: Calling chainbuild3' call chainbuild call etotal(energy_) iconf=ind(2) @@ -617,6 +636,7 @@ read (intin,'(i5)',end=1101,err=1101) iconf call read_angles(intin,*11) call geom_to_var(nvar,varia) + write(iout,*) 'Warning: Calling chainbuild4' call chainbuild endif n=n+1 @@ -652,6 +672,7 @@ CG_COMM,muster,ierr) call var_to_geom(nvar,varia) + write(iout,*) 'Warning: Calling chainbuild5' call chainbuild call etotal(energy_) iconf=ind(2) @@ -713,6 +734,7 @@ read (intin,'(i5)',end=11,err=11) iconf call read_angles(intin,*11) call geom_to_var(nvar,varia) + write(iout,*) 'Warning: Calling chainbuild5' call chainbuild endif write (iout,'(a,i7)') 'Conformation #',iconf @@ -767,7 +789,10 @@ ! if (itype(i).ne.10) ! & vbld(i+nres)=vbld(i+nres)+ran_number(-0.001d0,0.001d0) ! enddo - if (indpdb.eq.0) call chainbuild + if (indpdb.eq.0) then + write(iout,*) 'Warning: Calling chainbuild' + call chainbuild + endif ! do i=0,nres ! do j=1,3 ! dc(j,i)=dc(j,i)+ran_number(-0.2d0,0.2d0) @@ -806,6 +831,7 @@ end subroutine exec_checkgrad !----------------------------------------------------------------------------- subroutine exec_map +! use map_data use map_ use io_config, only:map_read implicit none @@ -852,6 +878,7 @@ logical :: debug call alloc_compare_arrays + write(iout,*) 'Warning: Calling chainbuild' call chainbuild call etotal(energy_) call enerprint(energy_) @@ -906,17 +933,19 @@ real(kind=8) :: time00 integer :: iorder,i,j,nres2,ierr,ierror nres2=2*nres +#ifndef FIVEDIAG if(.not.allocated(Gcopy)) allocate(Gcopy(nres2,nres2)) ! common.MD if(.not.allocated(Ginv)) allocate(Ginv(nres2,nres2)) !(maxres2,maxres2) +#endif ! common /mdpmpi/ if(.not.allocated(ng_start)) allocate(ng_start(0:nfgtasks-1)) if(.not.allocated(ng_counts)) allocate(ng_counts(0:nfgtasks-1)) if(.not.allocated(nginv_counts)) allocate(nginv_counts(0:nfgtasks-1)) !(0:MaxProcs-1) if(.not.allocated(nginv_start)) allocate(nginv_start(0:nfgtasks)) !(0:MaxProcs) - +#ifndef FIVEDIAG if(.not.allocated(fricmat)) allocate(fricmat(nres2,nres2)) !maxres2=2*maxres - +#endif ! Workers wait for variables and NF, and NFL from the boss iorder=0 do while (iorder.ge.0) @@ -1007,13 +1036,9 @@ else if (iorder.eq.8) then call intcartderiv else if (iorder.eq.9) then -write(iout,*) "przed fricmat_mult" call fricmat_mult(z,d_a_tmp) -write(iout,*) "po fricmat_mult" else if (iorder.eq.10) then -write(iout,*) "przed setup_fricmat" call setup_fricmat -write(iout,*) "o setup_fricmat" endif enddo write (*,*) 'Processor',fg_rank,' CG group',kolor,&