Skip to content

Commit fa28247

Browse files
author
Xiao Wang
committed
fix dir creating bug
1 parent 92cb8a5 commit fa28247

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,17 @@ def construct_single_chain_candidate(params,save_path):
7272
#first build a dict from the input text configure file
7373
single_chain_pdb_input = os.path.abspath(params['P'])
7474
single_chain_pdb_dir = os.path.join(save_path,"single_chain_pdb")
75-
os.makedirs(single_chain_pdb_dir,exist_ok=True)
75+
7676
#if os.path.exists(single_chain_pdb_dir):
7777
#shutil.rmtree(single_chain_pdb_dir)
7878
#delete_dir(single_chain_pdb_dir)
7979
if not os.path.isdir(single_chain_pdb_input):
80+
os.makedirs(single_chain_pdb_dir,exist_ok=True)
8081
from ops.os_operation import extract_compressed_file
8182
single_chain_pdb_dir=extract_compressed_file(single_chain_pdb_input,single_chain_pdb_dir)
8283
else:
84+
if os.path.exists(single_chain_pdb_dir):
85+
shutil.rmtree(single_chain_pdb_dir)
8386
from ops.os_operation import copy_directory
8487
single_chain_pdb_dir = copy_directory(single_chain_pdb_input,single_chain_pdb_dir)
8588
from ops.io_utils import read_structure_txt

0 commit comments

Comments
 (0)