Merge branch 'AFM' into multichain
[unres.git] / source / unres / src_MD-M / parmread.F
index 43ceeac..0620acb 100644 (file)
@@ -97,6 +97,12 @@ c
           enddo
         enddo
       endif
+C reading lipid parameters
+       read(iliptranpar,*) pepliptran
+       do i=1,ntyp
+       read(iliptranpar,*) liptranene(i)
+       enddo
+       close(iliptranpar)
 #ifdef CRYST_THETA
 C
 C Read the parameters of the probability distribution/energy expression 
@@ -1000,6 +1006,7 @@ c        Dtilde(2,2,i)=0.0d0
         EEold(2,1,-i)=-b(12,i)+b(13,i)
         EEold(1,2,-i)=-b(12,i)-b(13,i)
         write(iout,*) "TU DOCHODZE"
+        print *,"JESTEM"
 c        ee(1,1,i)=1.0d0
 c        ee(2,2,i)=1.0d0
 c        ee(2,1,i)=0.0d0
@@ -1107,6 +1114,14 @@ C---------------------- GB or BP potential -----------------------------
       read (isidep,*,end=116,err=116)(sigii(i),i=1,ntyp)
       read (isidep,*,end=116,err=116)(chip(i),i=1,ntyp)
       read (isidep,*,end=116,err=116)(alp(i),i=1,ntyp)
+C now we start reading lipid
+      do i=1,ntyp
+       read (isidep,*,end=1161,err=1161)(epslip(i,j),j=i,ntyp)
+       print *,"WARNING!!"
+       do j=1,ntyp
+       epslip(i,j)=epslip(i,j)+0.05d0
+       enddo
+      enddo
 C For the GB potential convert sigma'**2 into chi'
       if (ipot.eq.4) then
        do i=1,ntyp
@@ -1145,6 +1160,7 @@ C Calculate the "working" parameters of SC interactions.
       do i=2,ntyp
         do j=1,i-1
          eps(i,j)=eps(j,i)
+          epslip(i,j)=epslip(j,i)
         enddo
       enddo
       do i=1,ntyp
@@ -1173,10 +1189,17 @@ C Calculate the "working" parameters of SC interactions.
          epsij=eps(i,j)
          sigeps=dsign(1.0D0,epsij)
          epsij=dabs(epsij)
-         aa(i,j)=epsij*rrij*rrij
-         bb(i,j)=-sigeps*epsij*rrij
-         aa(j,i)=aa(i,j)
-         bb(j,i)=bb(i,j)
+          aa_aq(i,j)=epsij*rrij*rrij
+          bb_aq(i,j)=-sigeps*epsij*rrij
+          aa_aq(j,i)=aa_aq(i,j)
+          bb_aq(j,i)=bb_aq(i,j)
+          epsijlip=epslip(i,j)
+          sigeps=dsign(1.0D0,epsijlip)
+          epsijlip=dabs(epsijlip)
+          aa_lip(i,j)=epsijlip*rrij*rrij
+          bb_lip(i,j)=-sigeps*epsijlip*rrij
+          aa_lip(j,i)=aa_lip(i,j)
+          bb_lip(j,i)=bb_lip(i,j)
          if (ipot.gt.2) then
            sigt1sq=sigma0(i)**2
            sigt2sq=sigma0(j)**2
@@ -1209,7 +1232,7 @@ c           augm(i,j)=0.5D0**(2*expon)*aa(i,j)
           endif
          if (lprint) then
             write (iout,'(2(a3,2x),3(1pe10.3),5(0pf8.3))') 
-     &      restyp(i),restyp(j),aa(i,j),bb(i,j),augm(i,j),
+     &      restyp(i),restyp(j),aa_aq(i,j),bb_aq(i,j),augm(i,j),
      &      sigma(i,j),r0(i,j),chi(i,j),chi(j,i)
          endif
         enddo
@@ -1313,6 +1336,8 @@ c      v3ss=0.0d0
       goto 999
   116 write (iout,*) "Error reading electrostatic energy parameters."
       goto 999
+ 1161 write (iout,*) "Error reading electrostatic energy parameters.Lip"
+      goto 999
   117 write (iout,*) "Error reading side chain interaction parameters."
       goto 999
   118 write (iout,*) "Error reading SCp interaction parameters."