Skip to content

Commit

Permalink
add an option to not plot polar contacts (hydrogen bonds)
Browse files Browse the repository at this point in the history
  • Loading branch information
DomFijan committed Oct 6, 2023
1 parent dd3f5a6 commit 44a0ba4
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions ConservedWaterSearch/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def visualise_pymol(
ligand_resname: str | None = None,
dist: float = 10.0,
density_map: str | None = None,
polar_contacts: bool = False,
lunch_pymol: bool = True,
reinitialize: bool = True,
) -> None:
Expand Down Expand Up @@ -170,6 +171,9 @@ def visualise_pymol(
crystal waters shall be selected. Defaults to 10.0.
density_map (str | None, optional): Water density map to add to
visualisation session (usually .dx file). Defaults to None.
polar_contacts (bool, optional): If `True` polar contacts
between waters and protein will be visualised. Defaults to
False.
lunch_pymol (bool, optional): If `True` pymol will be lunched
in interactive mode. If `False` pymol will be imported
without lunching. Defaults to True.
Expand Down Expand Up @@ -328,13 +332,14 @@ def visualise_pymol(
sele = aminokis_u_am + " or " + waters + " or organic"
else:
sele = waters + " or organic"
cmd.distance(
"polar_contacts",
sele,
"sol",
mode=2,
)
cmd.hide("labels")
if polar_contacts:
cmd.distance(
"polar_contacts",
sele,
"sol",
mode=2,
)
cmd.hide("labels")
# Add crystal waters
if crystal_waters and aligned_protein is not None:
cmd.fetch(crystal_waters)
Expand Down

0 comments on commit 44a0ba4

Please sign in to comment.