minor corrections in energy
authorAdam Sieradzan <adasko@piasek4.chem.univ.gda.pl>
Thu, 12 Nov 2020 16:49:09 +0000 (17:49 +0100)
committerAdam Sieradzan <adasko@piasek4.chem.univ.gda.pl>
Thu, 12 Nov 2020 16:49:09 +0000 (17:49 +0100)
source/unres/energy.F90

index 63a76fb..58f1714 100644 (file)
         if (nfgtasks.gt.1) then 
         call MPI_Bcast(itime_mat,1,MPI_INT,king,FG_COMM,IERROR)
         endif
+       if (nres_molec(1).gt.0) then
        if (mod(itime_mat,imatupdate).eq.0) call make_SCp_inter_list
 !       write (iout,*) "after make_SCp_inter_list"
        if (mod(itime_mat,imatupdate).eq.0) call make_SCSC_inter_list
 !       write (iout,*) "after make_SCSC_inter_list"
 
        if (mod(itime_mat,imatupdate).eq.0) call make_pp_inter_list
+       endif
 !       write (iout,*) "after make_pp_inter_list"
 
 !      print *,'Processor',myrank,' calling etotal ipot=',ipot
       dGCLdOM1=0.0d0 
       dPOLdOM1=0.0d0
 !             write (iout,*) "RWA", g_listscsc_start,g_listscsc_end,i,j
-
+      if (nres_molec(1).eq.0) return
       do icont=g_listscsc_start,g_listscsc_end
       i=newcontlisti(icont)
       j=newcontlistj(icont)
       eel_loc=0.0d0 
       eello_turn3=0.0d0
       eello_turn4=0.0d0
+      if (nres_molec(1).eq.0) return
 !
 
       if (icheckgrad.eq.1) then
 !d    print '(a)','Enter ESCP'
 !d    write (iout,*) 'iatscp_s=',iatscp_s,' iatscp_e=',iatscp_e
 !      do i=iatscp_s,iatscp_e
+      if (nres_molec(1).eq.0) return
        do icont=g_listscp_start,g_listscp_end
         i=newcontlistscpi(icont)
         j=newcontlistscpj(icont)
@@ -20551,10 +20555,10 @@ chip1=chip(itypi)
 !(3,3,2,maxres)
 ! allocateion of lists JPRDLA
       allocate(newcontlistppi(300*nres))
-      allocate(newcontlistscpi(300*nres))
+      allocate(newcontlistscpi(350*nres))
       allocate(newcontlisti(300*nres))
       allocate(newcontlistppj(300*nres))
-      allocate(newcontlistscpj(300*nres))
+      allocate(newcontlistscpj(350*nres))
       allocate(newcontlistj(300*nres))
 
       return
@@ -22402,7 +22406,7 @@ chip1=chip(itypi)
       enddo
       call to_box(chead(1,1),chead(2,1),chead(3,1))
       call to_box(chead(1,2),chead(2,2),chead(3,2))
-
+      write(iout,*) "TEST",chead(1,1),chead(2,1),chead(3,1),dc_norm(k, i+nres),d1 
 ! distance 
 !        Rsc_distance(k) = dabs(c(k, i+nres) - c(k, j+nres))
 !         Rsc(k) = Rsc_distance(k) * Rsc_distance(k)
@@ -27672,7 +27676,7 @@ chip1=chip(itypi)
       include 'mpif.h'
       real*8 :: xi,yi,zi,xj,yj,zj,xj_safe,yj_safe,zj_safe,xj_temp,yj_temp,zj_temp
       real*8 :: dist_init, dist_temp,r_buff_list
-      integer:: contlistscpi(250*nres),contlistscpj(250*nres)
+      integer:: contlistscpi(350*nres),contlistscpj(350*nres)
 !      integer :: newcontlistscpi(200*nres),newcontlistscpj(200*nres)
       integer i,j,itypi,itypj,subchap,xshift,yshift,zshift,iint,ilist_scp,g_ilist_scp
       integer displ(0:nprocs),i_ilist_scp(0:nprocs),ierr