From 599174cbcfa6284b49c837a02884e443ad7913ac Mon Sep 17 00:00:00 2001 From: "Igor S. Gerasimov" Date: Sat, 1 Feb 2025 14:46:50 +0100 Subject: [PATCH] Close files properly Signed-off-by: Igor S. Gerasimov --- src/docking/search_nci.f90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/docking/search_nci.f90 b/src/docking/search_nci.f90 index 4772a134b..bdfc30f89 100644 --- a/src/docking/search_nci.f90 +++ b/src/docking/search_nci.f90 @@ -966,6 +966,7 @@ END SUBROUTINE Quicksort call generateFileName(fin_name, 'best', '', comb%ftype) call open_file(ifinal, fin_name, 'w') call writeMolecule(comb, ifinal, energy=final_e(1)) + call close_file(ifinal) !If not xyz then best.xyz is written to not have api break if(comb%ftype /= 1)then call open_file(ifinal, 'best.xyz', 'w') @@ -975,8 +976,8 @@ END SUBROUTINE Quicksort write (ifinal, '(a4,2x,3f20.14)') comb%sym(j), xyz_opt(1, j, 1)*autoang, & & xyz_opt(2, j, 1)*autoang, xyz_opt(3, j, 1)*autoang end do + call close_file(ifinal) end if - call close_file(ifinal) call delete_file(set%opt_logfile)