wham & cluster PBC
[unres.git] / source / wham / src-HCD / read_constr_homology.F
index ab9901d..dece50f 100644 (file)
@@ -145,8 +145,10 @@ c
         unres_pdb=.false.
         if (read2sigma) then
           call readpdb_template(k)
+          close(ipdbin)
         else
           call readpdb
+          close(ipdbin)
         endif
 
 c        call readpdb
@@ -163,7 +165,6 @@ c        call readpdb
         write (iout,*) "read_constr_homology: after reading pdb file"
         call flush(iout)
 #endif
-
 c
 c     Distance restraints
 c