distance constraint energy calculation in wham
[unres4.git] / source / wham / io_wham.F90
index 2e12a82..187502e 100644 (file)
@@ -461,6 +461,7 @@ allocate(ww(max_eneW))
       wscloc=ww(12)
       wtor=ww(13)
       wtor_d=ww(14)
+      wstrain=ww(15)
       wvdwpp=ww(16)
       wbond=ww(18)
       wsccor=ww(19)
@@ -478,7 +479,7 @@ allocate(ww(max_eneW))
       welpsb=ww(29)
       wvdwpsb=ww(28)
       welpp=ww(27)
-      wvdwpp=ww(26)
+      wvdwpp_nucl=ww(26)
       wscbase=ww(46)
       wpepbase=ww(47)
       wscpho=ww(48)
@@ -512,8 +513,8 @@ allocate(ww(max_eneW))
       weights(12)=wscloc
       weights(13)=wtor
       weights(14)=wtor_d
-      weights(15)=0 !wstrain !
-      weights(16)=0 !wvdwpp !
+      weights(15)=wstrain !0
+      weights(16)=wvdwpp !
       weights(17)=wbond
       weights(18)=0 !scal14 !
       weights(21)=wsccor
@@ -3727,8 +3728,9 @@ allocate(ww(max_eneW))
 !      include 'COMMON.HEADER'
 !      include 'COMMON.SBRIDGE'
       character(len=50) :: tytul
-      character(len=1),dimension(10) :: chainid=reshape((/'A','B','C',&
-                      'D','E','F','G','H','I','J'/),shape(chainid))
+      character(len=1),dimension(24) :: chainid=reshape((/'A','B','C',&
+                      'D','E','F','G','H','I','J','K','L','M','N','O',&
+                      'P','Q','R','S','V','W','X','Y','Z'/),shape(chainid))
       integer,dimension(nres) :: ica !(maxres)
       real(kind=8) :: temp,efree,etot,entropy,rmsdev
       integer :: ii,i,j,iti,ires,iatom,ichain,mnum
@@ -3745,9 +3747,11 @@ allocate(ww(max_eneW))
         mnum=molnum(i)
         iti=itype(i,mnum)
         if (iti.eq.ntyp1) then
+          if (itype(i-1,molnum(i-1)).eq.ntyp1) then
           ichain=ichain+1
           ires=0
           write (ipdb,'(a)') 'TER'
+          endif
         else
         ires=ires+1
         iatom=iatom+1