Skip to content

Commit

Permalink
Merge branch 'main' into fix/visualise_pymol_waters
Browse files Browse the repository at this point in the history
  • Loading branch information
DomFijan authored Feb 17, 2023
2 parents a3edc5d + a7c36a0 commit 0ef016b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions ConservedWaterSearch/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ def visualise_pymol(
"""Visualises results via `pymol <https://pymol.org/>`__.
Visualises results using pymol in a pymol session or saves to a file.
On mac OS the interactive pymol session will fail to lunch. If `output_file`
is `None`, a visalisation state will be saved to
`pymol_water_visualization.pse` in this case on mac OS.
Args:
water_type (list): List containing water type results from
Expand Down Expand Up @@ -182,6 +185,11 @@ def visualise_pymol(
if output_file is None and platform.system() != "Darwin":
pymol.finish_launching(["pymol", "-q"])
cmd.reinitialize()
if platform.system() == "Darwin":
import warnings
warnings.warn("mac OS detected interactive pymol session cannot be lunched. Visualisation state will be saved to pymol_water_visualization.pse",RuntimeWarning)
if output_file is None:
output_file='pymol_water_visualization.pse'
cmd.hide("everything")
if aligned_protein is not None:
cmd.load(aligned_protein)
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
author = "Jelena Tosovic, Domagoj Fijan, Marko Jukic, Urban Bren"

# The full version, including alpha/beta/rc tags
version = "0.1.0"
version = "0.1.1"
release = "0.1.1"


Expand Down

0 comments on commit 0ef016b

Please sign in to comment.