Fixed the addition of dummy chain ends to structures read from UNRES PDB files
[unres.git] / source / wham / src / molread_zs.F
index 87a3495..431680d 100644 (file)
@@ -96,6 +96,7 @@ C Convert sequence to numeric code
       write(iout,*) 'NNT=',NNT,' NCT=',NCT
 c Read distance restraints
       if (constr_dist.gt.0) then
+        if (refstr) call read_ref_structure(*11)
         call read_dist_constr
         call hpb_partition
       endif
@@ -119,6 +120,7 @@ c Read distance restraints
       endif
       write (iout,'(a)')
       return
+   11 stop "Error reading reference structure"
       end
 c-----------------------------------------------------------------------------
       logical function seq_comp(itypea,itypeb,length)