Skip to content

Commit

Permalink
Close files properly
Browse files Browse the repository at this point in the history
Signed-off-by: Igor S. Gerasimov <i.s.ger@ya.ru>
  • Loading branch information
foxtran committed Feb 10, 2025
1 parent e9af142 commit 599174c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/docking/search_nci.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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)
Expand Down

0 comments on commit 599174c

Please sign in to comment.