Commit f247b004 authored by Akdel's avatar Akdel
Browse files

bug fix (folder creation)

parent 8d5b42f3
......@@ -210,7 +210,7 @@ def parse_pdb_files(input_pdb: str, output_pdb: typing.Union[str, Path] = "./cle
for pdb_file in pdb_files:
pdb = pd.parsePDB(pdb_file).select("protein")
chains = pdb.getChids()
if len(chains):
if len(chains) and len(chains[0].strip()):
pdb ="chain {chains[0]}")
output_pdb_file = str(Path(output_pdb) / f"{helper.get_file_parts(pdb_file)[1]}.pdb")
pd.writePDB(output_pdb_file, pdb)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment