Skip to content

Commit

Permalink
fix dir creating bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wang3702 committed Jun 14, 2024
1 parent 92cb8a5 commit fa28247
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,17 @@ def construct_single_chain_candidate(params,save_path):
#first build a dict from the input text configure file
single_chain_pdb_input = os.path.abspath(params['P'])
single_chain_pdb_dir = os.path.join(save_path,"single_chain_pdb")
os.makedirs(single_chain_pdb_dir,exist_ok=True)

#if os.path.exists(single_chain_pdb_dir):
#shutil.rmtree(single_chain_pdb_dir)
#delete_dir(single_chain_pdb_dir)
if not os.path.isdir(single_chain_pdb_input):
os.makedirs(single_chain_pdb_dir,exist_ok=True)
from ops.os_operation import extract_compressed_file
single_chain_pdb_dir=extract_compressed_file(single_chain_pdb_input,single_chain_pdb_dir)
else:
if os.path.exists(single_chain_pdb_dir):
shutil.rmtree(single_chain_pdb_dir)
from ops.os_operation import copy_directory
single_chain_pdb_dir = copy_directory(single_chain_pdb_input,single_chain_pdb_dir)
from ops.io_utils import read_structure_txt
Expand Down

0 comments on commit fa28247

Please sign in to comment.