bugfix for pdbchain and for vdwpp weigth reading
[unres4.git] / source / wham / io_wham.F90
index 10364a4..0fb9954 100644 (file)
@@ -466,6 +466,33 @@ allocate(ww(max_eneW))
       wsccor=ww(19)
       wcatcat=ww(42)
       wcatprot=ww(41)
+      wcorr3_nucl=ww(38)
+      wcorr_nucl=ww(37)
+      wtor_d_nucl=ww(36)
+      wtor_nucl=ww(35)
+      wsbloc=ww(34)
+      wang_nucl=ww(33)
+      wbond_nucl=ww(32)
+      welsb=ww(31)
+      wvdwsb=ww(30)
+      welpsb=ww(29)
+      wvdwpsb=ww(28)
+      welpp=ww(27)
+      wvdwpp_nucl=ww(26)
+      wscbase=ww(46)
+      wpepbase=ww(47)
+      wscpho=ww(48)
+      wpeppho=ww(49)
+!      print *,"KURWA",ww(48)
+!        "WSCBASE   ","WPEPBASE  ","WSCPHO    ","WPEPPHO   "
+!        "WVDWPP    ","WELPP     ","WVDWPSB   ","WELPSB    ","WVDWSB    ",&
+!        "WELSB     ","WBOND     ","WANG      ","WSBLOC    ","WTOR      ",&
+!        "WTORD     ","WCORR     ","WCORR3    ","WNULL     ","WNULL     ",&
+!        "WCATPROT  ","WCATCAT  
+!       +wbond_nucl*estr_nucl+wang_nucl*ebe_nucl&
+!       +wvdwpp_nucl*evdwpp+welpp*eespp+wvdwpsb*evdwpsb+welpsb*eelpsb&
+!       +wvdwsb*evdwsb+welsb*eelsb+wsbloc*esbloc+wtor_nucl*etors_nucl&
+!       +wtor_d_nucl*etors_d_nucl+wcorr_nucl*ecorr_nucl+wcorr3_nucl*ecorr3_nucl&
 
       endif
 !
@@ -486,13 +513,31 @@ allocate(ww(max_eneW))
       weights(13)=wtor
       weights(14)=wtor_d
       weights(15)=0 !wstrain !
-      weights(16)=0 !wvdwpp !
+      weights(16)=wvdwpp !
       weights(17)=wbond
       weights(18)=0 !scal14 !
       weights(21)=wsccor
       weights(42)=wcatprot
       weights(41)=wcatcat
-
+      weights(26)=    wvdwpp_nucl 
+
+      weights(27) =welpp  
+      weights(28) =wvdwpsb
+      weights(29) =welpsb 
+      weights(30) =wvdwsb 
+      weights(31) =welsb  
+      weights(32) =wbond_nucl  
+      weights(33) =wang_nucl   
+      weights(34) =wsbloc 
+      weights(35) =wtor_nucl   
+      weights(36) =wtor_d_nucl 
+      weights(37) =wcorr_nucl  
+      weights(38) =wcorr3_nucl 
+      weights(41) =wcatcat
+      weights(42) =wcatprot
+      weights(46) =wscbase
+      weights(47) =wscpho
+      weights(48) =wpeppho
 ! el--------
       call card_concat(controlcard,.false.)
 
@@ -3700,9 +3745,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