corrections
[unres.git] / source / wham / src-HCD / molread_zs.F
index 878e4dd..e1a64f3 100644 (file)
@@ -79,7 +79,7 @@ C Convert sequence to numeric code
         chain_border1(1,i)=chain_border(1,i)-1
         chain_border1(2,i)=chain_border(2,i)+1
       enddo
-      chain_border1(1,nchain)=chain_border(1,nchain)-1
+      if (nchain.gt.1) chain_border1(1,nchain)=chain_border(1,nchain)-1
       chain_border1(2,nchain)=nres
       write(iout,*) "nres",nres," nchain",nchain
       do i=1,nchain
@@ -260,6 +260,7 @@ c       call flush(iout)
       endif
 
       call setup_var
+      write (iout,*) "Calling init_int_table"
       call init_int_table
       if (ns.gt.0) then
         write (iout,'(/a,i3,a)') 'The chain contains',ns,
@@ -332,6 +333,12 @@ C Read bridging residues.
       read (inp,*) ns,(iss(i),i=1,ns)
       print *,'ns=',ns
       write (iout,*) 'ns=',ns,' iss:',(iss(i),i=1,ns)
+c 5/24/2020 Adam: Added a table to translate residue numbers to cysteine
+c     numbers
+      icys=0
+      do i=1,ns
+        icys(iss(i))=i
+      enddo
 C Check whether the specified bridging residues are cystines.
       do i=1,ns
        if (itype(iss(i)).ne.1) then