#ifdef MPI
include "mpif.h"
double precision weights_(n_ene)
- double precision time00,time_Bcast,time_BcastW
+ double precision time00
integer ierror,ierr
#endif
include 'COMMON.SETUP'
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,
& 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.)
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)
+ 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)
call MPI_Bcast(itime_mat,1,MPI_INT,king,FG_COMM,IERROR)
endif
if (mod(itime_mat,imatupdate).eq.0) then
- call make_SCp_inter_list
- call make_SCSC_inter_list
+#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
+ 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)
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
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)
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
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
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,
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)
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
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.