Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion qp/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ def run(config):
AA = missing.define_residues()
residues_with_clashes = parse_log(protoss_log_file, protoss_pdb, AA)
if residues_with_clashes:
print(f"> WARNING: Protoss has deleted {len(residues_with_clashes)} residues due to clashes, trying to fix them with Modeller")
print(f"> WARNING: Protoss removed {len(residues_with_clashes)} residues due to clashes")
clash_details = ", ".join([f"{res_name}{res_id} in chain {chain}" for res_id, _, _, chain, res_name in sorted(list(residues_with_clashes))])
print(f"> WARNING: Remodeling {clash_details} with Modeller.")
else:
break # Don't loop again as no clashes were detected

Expand Down
2 changes: 1 addition & 1 deletion qp/protonate/parse_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def parse_log(log_path, pdb_path, AA):
res_id = int(atom_line[22:26].strip())
one_letter_code = AA.get(res_name, 'X') # Use 'X' for unknown residues
chain_index = chain_order.get(chain, -1)
residues_with_clashes.add((res_id, one_letter_code, chain_index, chain))
residues_with_clashes.add((res_id, one_letter_code, chain_index, chain, res_name))

return residues_with_clashes

Expand Down
2 changes: 1 addition & 1 deletion qp/structure/missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def delete_clashes(pdb_path, residues_with_clashes):
lines = file.readlines()

# Create a set for quick lookup of residues to delete
residues_to_delete = {(chain, res_id) for res_id, _, _, chain in residues_with_clashes}
residues_to_delete = {(chain, res_id) for res_id, _, _, chain, _ in residues_with_clashes}

# Write the new PDB file, excluding the residues to delete
with open(pdb_path, "w") as file:
Expand Down
Loading