X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc-HCD-5D%2Fenergy_split-sep.F;h=51d5b2d77d5c8c4dc4e8d3285efae357c8e832a7;hb=4627052ad84994541a6f518b197289553d91edc0;hp=9abad39e9cfcee982699ea9c28b13f95fc231331;hpb=820f293760806cf45f8368b0e23dfcdc3e7b992e;p=unres.git diff --git a/source/unres/src-HCD-5D/energy_split-sep.F b/source/unres/src-HCD-5D/energy_split-sep.F index 9abad39..51d5b2d 100644 --- a/source/unres/src-HCD-5D/energy_split-sep.F +++ b/source/unres/src-HCD-5D/energy_split-sep.F @@ -1,5 +1,5 @@ subroutine etotal_long(energia) - implicit real*8 (a-h,o-z) + implicit none include 'DIMENSIONS' c c Compute the long-range slow-varying contributions to the energy @@ -13,6 +13,8 @@ cMS$ATTRIBUTES C :: proc_proc #ifdef MPI include "mpif.h" double precision weights_(n_ene) + double precision time00 + integer ierror,ierr #endif include 'COMMON.SETUP' include 'COMMON.IOUNITS' @@ -24,9 +26,20 @@ cMS$ATTRIBUTES C :: proc_proc include 'COMMON.CHAIN' include 'COMMON.VAR' include 'COMMON.LOCAL' + include 'COMMON.QRESTR' include 'COMMON.MD' include 'COMMON.CONTROL' + include 'COMMON.TIME1' + double precision evdw,evdw1,evdw2,evdw2_14,ees,eel_loc, + & eello_turn3,eello_turn4,edfadis,estr,ehpb,ebe,ethetacnstr, + & escloc,etors,edihcnstr,etors_d,esccor,ecorr,ecorr5,ecorr6,eturn6, + & eliptran,Eafmforce,Etube, + & esaxs_constr,ehomology_constr,edfator,edfanei,edfabet + integer i,n_corr,n_corr1 c write(iout,'(a,i2)')'Calling etotal_long ipot=',ipot +#ifdef TIMING_ENE + double precision time01 +#endif if (modecalc.eq.12.or.modecalc.eq.14) then #ifdef MPI c if (fg_rank.eq.0) call int_from_cart1(.false.) @@ -35,6 +48,13 @@ c if (fg_rank.eq.0) call int_from_cart1(.false.) #endif endif #ifdef MPI + edfadis=0.0d0 + edfator=0.0d0 + edfanei=0.0d0 + edfabet=0.0d0 + ehomology_constr=0.0d0 + Uconst=0.0d0 + Uconst_back=0.0d0 c write(iout,*) "ETOTAL_LONG Processor",fg_rank, c & " absolute rank",myrank," nfgtasks",nfgtasks c call flush(iout) @@ -66,7 +86,13 @@ C FG slaves as WEIGHTS array. weights_(17)=wbond weights_(18)=scal14 weights_(21)=wsccor + weights_(22)=wliptran + weights_(25)=wtube weights_(26)=wsaxs + weights_(28)=wdfa_dist + weights_(29)=wdfa_tor + weights_(30)=wdfa_nei + weights_(31)=wdfa_beta C FG Master broadcasts the WEIGHTS_ array call MPI_Bcast(weights_(1),n_ene, & MPI_DOUBLE_PRECISION,king,FG_COMM,IERROR) @@ -93,7 +119,13 @@ C FG slaves receive the WEIGHTS array wbond=weights(17) scal14=weights(18) wsccor=weights(21) + wliptran=weights(22) + wtube=weights(25) wsaxs=weights(26) + wdfa_dist=weights(28) + wdfa_tor=weights(29) + wdfa_nei=weights(30) + wdfa_beta=weights(31) endif call MPI_Bcast(dc(1,1),6*nres,MPI_DOUBLE_PRECISION, & king,FG_COMM,IERR) @@ -106,11 +138,29 @@ c write (iout,*) 'Processor',myrank, c & ' calling etotal_short ipot=',ipot c call flush(iout) c print *,'Processor',myrank,' nnt=',nnt,' nct=',nct + if (nfgtasks.gt.1) then + call MPI_Bcast(itime_mat,1,MPI_INT,king,FG_COMM,IERROR) + endif + if (mod(itime_mat,imatupdate).eq.0) then +#ifdef TIMING_ENE + time01=MPI_Wtime() +#endif + call make_SCp_inter_list_RESPA + call make_SCSC_inter_list_RESPA + call make_pp_inter_list + call make_pp_vdw_inter_list_RESPA +#ifdef TIMING_ENE + time_list=time_list+MPI_Wtime()-time01 +#endif + endif #endif cd print *,'nnt=',nnt,' nct=',nct C C Compute the side-chain and electrostatic interaction energy C +#ifdef TIMING_ENE + time01=MPI_Wtime() +#endif goto (101,102,103,104,105,106) ipot C Lennard-Jones potential. 101 call elj_long(evdw) @@ -134,8 +184,20 @@ C C Calculate electrostatic (H-bonding) energy of the main chain. C 107 continue +#ifdef TIMING_ENE + time_evdw_long=time_evdw_long+MPI_Wtime()-time01 +#endif +#ifdef TIMING + time01=MPI_Wtime() +#endif call vec_and_deriv +#ifdef TIMING + time_vec=time_vec+MPI_Wtime()-time01 +#endif c write (iout,*) "etotal_long: shield_mode",shield_mode +#ifdef TIMING_ENE + time01=MPI_Wtime() +#endif if (shield_mode.eq.1) then call set_shield_fac else if (shield_mode.eq.2) then @@ -167,10 +229,16 @@ c write (iout,*) "Soft-spheer ELEC potential" call eelec_soft_sphere(ees,evdw1,eel_loc,eello_turn3, & eello_turn4) endif +#ifdef TIMING_ENE + time_eelec_long=time_eelec_long+MPI_Wtime()-time01 +#endif C C Calculate excluded-volume interaction energy between peptide groups C and side chains. C +#ifdef TIMING_ENE + time01=MPI_Wtime() +#endif if (ipot.lt.6) then if(wscp.gt.0d0) then call escp_long(evdw2,evdw2_14) @@ -181,6 +249,10 @@ C else call escp_soft_sphere(evdw2,evdw2_14) endif +#ifdef TIMING_ENE + time_escp_long=time_escp_long+MPI_Wtime()-time01 +#endif +#ifdef FOURBODY C C 12/1/95 Multi-body terms C @@ -199,7 +271,18 @@ c &" ecorr",ecorr," ecorr5",ecorr5," ecorr6",ecorr6," eturn6",eturn6 endif if ((wcorr4.eq.0.0d0 .and. wcorr.gt.0.0d0) .and. ipot.lt.6) then call multibody_hb(ecorr,ecorr5,ecorr6,n_corr,n_corr1) + else + ecorr=0.0d0 + ecorr5=0.0d0 + ecorr6=0.0d0 + eturn6=0.0d0 endif +#else + ecorr=0.0d0 + ecorr5=0.0d0 + ecorr6=0.0d0 + eturn6=0.0d0 +#endif C C If performing constraint dynamics, call the constraint energy C after the equilibration time @@ -269,6 +352,8 @@ cMS$ATTRIBUTES C :: proc_proc #ifdef MPI include "mpif.h" double precision weights_(n_ene) + double precision time00 + integer ierror,ierr #endif include 'COMMON.SETUP' include 'COMMON.IOUNITS' @@ -281,8 +366,18 @@ cMS$ATTRIBUTES C :: proc_proc include 'COMMON.VAR' include 'COMMON.LOCAL' include 'COMMON.CONTROL' + include 'COMMON.SAXS' include 'COMMON.TORCNSTR' - + include 'COMMON.TIME1' + double precision evdw,evdw1,evdw2,evdw2_14,ees,eel_loc, + & eello_turn3,eello_turn4,edfadis,estr,ehpb,ebe,ethetacnstr, + & escloc,etors,edihcnstr,etors_d,esccor,ecorr,ecorr5,ecorr6,eturn6, + & eliptran,Eafmforce,Etube, + & esaxs_constr,ehomology_constr,edfator,edfanei,edfabet + integer i,n_corr,n_corr1 +#ifdef TIMING_ENE + double precision time01 +#endif c write(iout,'(a,i2)')'Calling etotal_short ipot=',ipot c call flush(iout) if (modecalc.eq.12.or.modecalc.eq.14) then @@ -299,6 +394,18 @@ c call flush(iout) edfanei=0.0d0 edfabet=0.0d0 #endif + evdw=0.0d0 + ees=0.0d0 + evdw1=0.0d0 + eel_loc=0.0d0 + eello_turn3=0.0d0 + eello_turn4=0.0d0 + evdw2=0 + evdw2_14=0 + ecorr=0.0d0 + ecorr5=0.0d0 + ecorr6=0.0d0 + eturn6=0.0d0 c write(iout,*) "ETOTAL_SHORT Processor",fg_rank, c & " absolute rank",myrank," nfgtasks",nfgtasks c call flush(iout) @@ -363,13 +470,13 @@ C FG slaves receive the WEIGHTS array wsaxs=weights(26) endif c write (iout,*),"Processor",myrank," BROADCAST weights" - call MPI_Bcast(c(1,1),maxres6,MPI_DOUBLE_PRECISION, + call MPI_Bcast(c(1,1),6*nres,MPI_DOUBLE_PRECISION, & king,FG_COMM,IERR) c write (iout,*) "Processor",myrank," BROADCAST c" - call MPI_Bcast(dc(1,1),maxres6,MPI_DOUBLE_PRECISION, + call MPI_Bcast(dc(1,1),6*nres,MPI_DOUBLE_PRECISION, & king,FG_COMM,IERR) c write (iout,*) "Processor",myrank," BROADCAST dc" - call MPI_Bcast(dc_norm(1,1),maxres6,MPI_DOUBLE_PRECISION, + call MPI_Bcast(dc_norm(1,1),6*nres,MPI_DOUBLE_PRECISION, & king,FG_COMM,IERR) c write (iout,*) "Processor",myrank," BROADCAST dc_norm" call MPI_Bcast(theta(1),nres,MPI_DOUBLE_PRECISION, @@ -401,6 +508,9 @@ c call int_from_cart1(.false.) C C Compute the side-chain and electrostatic interaction energy C +#ifdef TIMING_ENE + time01=MPI_Wtime() +#endif goto (101,102,103,104,105,106) ipot C Lennard-Jones potential. 101 call elj_short(evdw) @@ -425,16 +535,31 @@ C C Calculate electrostatic (H-bonding) energy of the main chain. C 107 continue +#ifdef TIMING_ENE + time_evdw_short=time_evdw_short+MPI_Wtime()-time01 +#endif c c Calculate the short-range part of Evdwpp c +#ifdef TIMING_ENE + time01=MPI_Wtime() +#endif call evdwpp_short(evdw1) +#ifdef TIMING_ENE + time_eelec_short=time_eelec_short+MPI_Wtime()-time01 +#endif c c Calculate the short-range part of ESCp c +#ifdef TIMING_ENE + time01=MPI_Wtime() +#endif if (ipot.lt.6) then call escp_short(evdw2,evdw2_14) endif +#ifdef TIMING_ENE + time_escp_short=time_escp_short+MPI_Wtime()-time01 +#endif c c Calculate the bond-stretching energy c @@ -462,7 +587,13 @@ C energy function C C Calculate the SC local energy. C +#ifdef TIMING + time01=MPI_Wtime() +#endif call vec_and_deriv +#ifdef TIMING + time_vec=time_vec+MPI_Wtime()-time01 +#endif call esc(escloc) C C Calculate the virtual-bond torsional energy. @@ -479,6 +610,28 @@ C energy function etors=0.0d0 endif edihcnstr=0.0d0 +c Lipid transfer + if (wliptran.gt.0) then + call Eliptransfer(eliptran) + else + eliptran=0.0d0 + endif + if (AFMlog.gt.0) then + call AFMforce(Eafmforce) + else if (selfguide.gt.0) then + call AFMvel(Eafmforce) + else + Eafmforce=0.0d0 + endif + if (TUBElog.eq.1) then +C print *,"just before call" + call calctube(Etube) + elseif (TUBElog.eq.2) then + call calctube2(Etube) + else + Etube=0.0d0 + endif + if (ndih_constr.gt.0) call etor_constr(edihcnstr) c print *,"Processor",myrank," computed Utor" C