Skip to content

Commit 306d13c

Browse files
committed
fix logging issue (if session was not restart between runs, log.txt was not recreated)
1 parent f59147d commit 306d13c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

AlphaFold2.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,10 @@
341341
" plt.close()\n",
342342
"\n",
343343
"result_dir = jobname\n",
344-
"if 'logging_setup' not in globals():\n",
345-
" setup_logging(Path(os.path.join(jobname,\"log.txt\")))\n",
346-
" logging_setup = True\n",
344+
"log_filename = os.path.join(jobname,\"log.txt\")\n",
345+
"if not os.path.isfile(log_filename) or 'logging_setup' not in globals():\n",
346+
" setup_logging(Path(log_filename))\n",
347+
" logging_setup = True\n",
347348
"\n",
348349
"queries, is_complex = get_queries(queries_path)\n",
349350
"model_type = set_model_type(is_complex, model_type)\n",

0 commit comments

Comments
 (0)