Introduction of dyn_ss and triss to cluster
[unres.git] / source / cluster / wham / src-M / read_coords.F
index c34aca4..5c6ca65 100644 (file)
@@ -218,10 +218,17 @@ c          call flush(iout)
             call xdrfint_(ixdrf, nss, iret)
             if (iret.eq.0) goto 101
             do j=1,nss
+           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)
               if (iret.eq.0) goto 101
               call xdrfint_(ixdrf, jhpb(j), iret)
               if (iret.eq.0) goto 101
+           endif
             enddo
             call xdrffloat_(ixdrf,reini,iret)
             if (iret.eq.0) goto 101
@@ -243,10 +250,15 @@ c            write (iout,*) "nss",nss
             call flush(iout)
             if (iret.eq.0) goto 101
             do k=1,nss
+           if (dyn_ss) then
+            call xdrfint(ixdrf, idssb(k), iret)
+            call xdrfint(ixdrf, jdssb(k), iret)
+            else
               call xdrfint(ixdrf, ihpb(k), iret)
               if (iret.eq.0) goto 101
               call xdrfint(ixdrf, jhpb(k), iret)
               if (iret.eq.0) goto 101
+            endif
             enddo
             call xdrffloat(ixdrf,reini,iret)
             if (iret.eq.0) goto 101
@@ -404,7 +416,8 @@ c------------------------------------------------------------------------------
       enddo
       do j=nnt,nct
         itj=itype(j)
-        if (itype(j).ne.10 .and. (vbld(nres+j)-dsc(itj)).gt.2.0d0) then
+        if (itype(j).ne.10 .and. (vbld(nres+j)-dsc(iabs(itj))).gt.2.0d0)
+     &  then
           write (iout,*) "Conformation",jjj,jj+1
           write (iout,*) "Bad CA-SC bond length",j," ",vbld(nres+j)
           write (iout,*) "The Cartesian geometry is:"