Skip to content

Commit

Permalink
debug file naming, typos and printing statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Jgmedina95 committed Jan 30, 2024
1 parent d2358ac commit 2f0224d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mdagent/tools/base_tools/preprocess_tools/pdb_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,11 @@ def add_molecule(self, molecule):
def generate_input_header(self):
# Generate the header of the input file in .inp format
orig_pdbs_ids = [
f"{molecule.number_of_molecules + molecule.id}"
f"{molecule.number_of_molecules}_{molecule.id}"
for molecule in self.molecules
]

_final_name = f'{"_".join(orig_pdbs_ids)}'
_final_name = f'{"_and_".join(orig_pdbs_ids)}'

self.file_description = (
"Packed Structures of the following molecules:\n"
Expand Down Expand Up @@ -347,14 +347,14 @@ def run_packmol(self, PathRegistry):
)

# validate final pdb
pdb_validation = validate_pdb_format(f"{self.file_name}")
pdb_validation = validate_pdb_format(f"{self.final_name}")
if pdb_validation[0] == 0:
# delete .inp files
os.remove("packmol.inp")
for molecule in self.molecules:
os.remove(molecule.filename)
# name of packed pdb file
time_stamp = PathRegistry.get_timestamp()
time_stamp = PathRegistry.get_timestamp()[-6:]
PathRegistry.map_path(
f"PACKED_{time_stamp}",
f"{self.final_name}",
Expand Down Expand Up @@ -398,7 +398,7 @@ def packmol_wrapper(
box.generate_input_header()
# generate input
# run packmol

print("Packing:", box.file_description, "\nThe file name is:", box.final_name)
return box.run_packmol(PathRegistry)


Expand Down

0 comments on commit 2f0224d

Please sign in to comment.