Merge branch 'lipid' of mmka.chem.univ.gda.pl:unres into lipid
[unres.git] / source / wham / src-M / cxread.F
index 7bb2f6a..c4cc7bb 100644 (file)
@@ -63,8 +63,15 @@ c      write (iout,*) "rpotE",rpotE," iret",iret
       call xdrffloat_(ixdrf, rt_bath, iret)
       call xdrfint_(ixdrf, nss, iret)
       do j=1,nss
-        call xdrfint_(ixdrf, ihpb(j), iret)
-        call xdrfint_(ixdrf, jhpb(j), iret)
+           if (dyn_ss) then
+            call xdrfint(ixdrf, idssb(j), iret)
+            call xdrfint(ixdrf, jdssb(j), iret)
+        idssb(j)=idssb(j)-nres
+        jdssb(j)=jdssb(j)-nres
+           else
+            call xdrfint_(ixdrf, ihpb(j), iret)
+            call xdrfint_(ixdrf, jhpb(j), iret)
+           endif
       enddo
       call xdrfint_(ixdrf, nprop, iret)
       if (umbrella(iparm) .or. read_iset(iparm) .or. hamil_rep) 
@@ -81,8 +88,13 @@ c      write (iout,*) "rpotE",rpotE," iret",iret
       call xdrffloat(ixdrf, rt_bath, iret)
       call xdrfint(ixdrf, nss, iret)
       do j=1,nss
-        call xdrfint(ixdrf, ihpb(j), iret)
-        call xdrfint(ixdrf, jhpb(j), iret)
+           if (dyn_ss) then
+            call xdrfint(ixdrf, idssb(j), iret)
+            call xdrfint(ixdrf, jdssb(j), iret)
+           else
+            call xdrfint(ixdrf, ihpb(j), iret)
+            call xdrfint(ixdrf, jhpb(j), iret)
+           endif
       enddo
       call xdrfint(ixdrf, nprop, iret)
 c      write (iout,*) "nprop",nprop