small changes in cation cation interactions and wham correction
[unres4.git] / source / unres / io_config.F90
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