small changes in cation cation interactions and wham correction
authorAdam Sieradzan <adasko@piasek4.chem.univ.gda.pl>
Thu, 17 Sep 2020 09:29:53 +0000 (11:29 +0200)
committerAdam Sieradzan <adasko@piasek4.chem.univ.gda.pl>
Thu, 17 Sep 2020 09:29:53 +0000 (11:29 +0200)
.gitignore
PARAM/cation_param.parm
source/unres/energy.F90
source/unres/io_config.F90
source/wham/enecalc.F90
source/xdrfpdb/Makefile_ifort

index 99fb1e8..35af1a2 100644 (file)
@@ -11,7 +11,7 @@
 
 # ignore exe in bin
 bin/*exe
-
+bin/
 # ignore build dir
 build/
 build2/
index c6bf926..bc91684 100644 (file)
@@ -1,8 +1,8 @@
- 23.0  1.868 
- 24.0  0.793
- 39.0  2.650
- 40.0  1.713
- 35.5  2.470
+ 23.0  1.868 1 
+ 24.0  0.793 2
+ 39.0  2.650 1
+ 40.0  1.713 2
+ 35.5  2.470 -1
 7
 -1381.06 282.2  -203.7  3.0   0.1      3.5   0.12
 -1426.87 -98.92 -2454.0 3.0   0.1      3.5   0.02
index da1b2f6..3b026b7 100644 (file)
 !grad            enddo
 !grad          enddo
 ! 9/28/08 AL Gradient compotents will be summed only at the end
-          ggg(1)=facvdw*xj &
+          ggg(1)=facvdw*xj+sss_ele_grad*rmij*evdwij*xj &
            *((sslipi+sslipj)/2.0d0*lipscale**2+1.0d0)
-          ggg(2)=facvdw*yj &
+          ggg(2)=facvdw*yj+sss_ele_grad*rmij*evdwij*yj &
            *((sslipi+sslipj)/2.0d0*lipscale**2+1.0d0)
-          ggg(3)=facvdw*zj &
+          ggg(3)=facvdw*zj+sss_ele_grad*rmij*evdwij*zj &
            *((sslipi+sslipj)/2.0d0*lipscale**2+1.0d0)
 
           do k=1,3
 !     &   dscp1,dscp2,sumene
 !        sumene = enesc(x,xx,yy,zz,cost2tab(i+1),sint2tab(i+1))
         escloc = escloc + sumene
+       if (energy_dec) write (2,*) "i",i," itype",itype(i,1)," it",it, &
+        " escloc",sumene,escloc,it,itype(i,1)
 !        write (2,*) "i",i," escloc",sumene,escloc,it,itype(i,1)
 !     & ,zz,xx,yy
 !#define DEBUG
 !        r06 = rcat0**6
 !        r012 = r06**2
 !        k0 = 332*(2*2)/80
-        Evan1cat=epscalc*(r012/rcal**6)
-        Evan2cat=epscalc*2*(r06/rcal**3)
+        Evan1cat=epscalc*(r012/(rcal**6))
+        Evan2cat=epscalc*2*(r06/(rcal**3))
         Eeleccat=k0/ract
         r7 = rcal**7
         r4 = rcal**4
           gradcatcat(k,i)=gradcatcat(k,i)-gg(k)
           gradcatcat(k,j)=gradcatcat(k,j)+gg(k)
         enddo
-
+        if (energy_dec) write (iout,*) i,j,Evan1cat,Evan2cat,Eeleccat,&
+         r012,rcal**6,ichargecat(itypi)*ichargecat(itypj)
 !        write(iout,*) "ecatcat",i,j, ecationcation,xj,yj,zj
         ecationcation=ecationcation+Evan1cat+Evan2cat+Eeleccat
        enddo
             Qj=Qj*2
             Qij=Qij*2
            endif
+           write(iout,*) "KURWA0",d1
+
            CALL edq_cat(ecl, elj, epol)
           eheadtail = ECL + elj + epol
 !           eheadtail = 0.0d0
 
 !c!-------------------------------------------------------------------
 !c! ecl
+       write(iout,*) "KURWA2",Rhead
        sparrow  = w1 * Qj * om1
        hawk     = w2 * Qj * Qj * (1.0d0 - sqom2)
        ECL = sparrow / Rhead**2.0d0 &
index eed8a11..dce2e69 100644 (file)
           enddo
         enddo
       endif
+      if (.not.allocated(ichargecat)) allocate (ichargecat(ntyp_molec(5)))
        if (oldion.eq.1) then
             do i=1,ntyp_molec(5)
-             read(iion,*) msc(i,5),restok(i,5)
+             read(iion,*) msc(i,5),restok(i,5),ichargecat(i)
              print *,msc(i,5),restok(i,5)
             enddo
             ip(5)=0.2
       if (.not.allocated(chi2cat)) allocate(chi2cat(ntyp1,ntyp1)) !(ntyp,ntyp)
 
 
-      allocate (ichargecat(ntyp_molec(5)))
+            if (.not.allocated(ichargecat)) allocate (ichargecat(ntyp_molec(5)))
 ! i to SC, j to jon, isideocat - nazwa pliku z ktorego czytam parametry
        if (oldion.eq.0) then
             if (.not.allocated(icharge)) then ! this mean you are oprating in old sc-sc mode
index c698883..f1546ad 100644 (file)
@@ -1484,6 +1484,11 @@ write(iout,*)"end of store_parm"
           enddo
           write(iout,*) "before gather Fdimless"
           write(iout,*) scount(me),scount_(0),idispl(0)
+          write (iout,*) "added update of scount_"
+         call MPI_AllGather( scount(me), 1, MPI_INTEGER, scount_(0), 1, &
+        MPI_INTEGER, WHAM_COMM, IERROR)
+
+
           call MPI_Gatherv(Fdimless_(1),scount(me),&
            MPI_REAL,Fdimless(1),&
            scount_(0),idispl(0),MPI_REAL,Master,&
index d190a1d..72bbe83 100644 (file)
@@ -66,23 +66,23 @@ clean:
        rm -f *.o *.mod
 
 
-names.o: ${DATA_FILE}/names.f90
-       ${FC} ${FFLAGS} ${CPPFLAGS} ${DATA_FILE}/names.f90
+names.o: ${DATA_FILE}/names.F90
+       ${FC} ${FFLAGS} ${CPPFLAGS} ${DATA_FILE}/names.F90
 
-io_units.o: ${DATA_FILE}/io_units.f90
-       ${FC} ${FFLAGS} ${CPPFLAGS} ${DATA_FILE}/io_units.f90
+io_units.o: ${DATA_FILE}/io_units.F90
+       ${FC} ${FFLAGS} ${CPPFLAGS} ${DATA_FILE}/io_units.F90
 
-compare_data.o: ${DATA_FILE}/compare_data.f90
-       ${FC} ${FFLAGS} ${CPPFLAGS} ${DATA_FILE}/compare_data.f90
+compare_data.o: ${DATA_FILE}/compare_data.F90
+       ${FC} ${FFLAGS} ${CPPFLAGS} ${DATA_FILE}/compare_data.F90
 
-energy_data.o: ${DATA_FILE}/energy_data.f90
-       ${FC} ${FFLAGS} ${CPPFLAGS} ${DATA_FILE}/energy_data.f90
+energy_data.o: ${DATA_FILE}/energy_data.F90
+       ${FC} ${FFLAGS} ${CPPFLAGS} ${DATA_FILE}/energy_data.F90
 
-geometry_data.o: ${DATA_FILE}/geometry_data.f90
-       ${FC} ${FFLAGS} ${CPPFLAGS} ${DATA_FILE}/geometry_data.f90
+geometry_data.o: ${DATA_FILE}/geometry_data.F90
+       ${FC} ${FFLAGS} ${CPPFLAGS} ${DATA_FILE}/geometry_data.F90
 
-MD_data.o: ${DATA_FILE}/MD_data.f90
-       ${FC} ${FFLAGS} ${CPPFLAGS} ${DATA_FILE}/MD_data.f90
+MD_data.o: ${DATA_FILE}/MD_data.F90
+       ${FC} ${FFLAGS} ${CPPFLAGS} ${DATA_FILE}/MD_data.F90
 
-io_base.o: ../unres/io_base.f90
-       ${FC} ${FFLAGS} ${CPPFLAGS} ../unres/io_base.f90
+io_base.o: ../unres/io_base.F90
+       ${FC} ${FFLAGS} ${CPPFLAGS} ../unres/io_base.F90