From b66f8d6e4ecfaccb390d546de237ab7a876210d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bouysset?= Date: Wed, 26 Jun 2024 22:12:43 +0100 Subject: [PATCH] address breaking change --- prolif/plotting/complex3d.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/prolif/plotting/complex3d.py b/prolif/plotting/complex3d.py index 9fb0ea9..b3ee9f4 100644 --- a/prolif/plotting/complex3d.py +++ b/prolif/plotting/complex3d.py @@ -310,13 +310,15 @@ def compare( def _populate_view( # noqa: PLR0912 self, - v: py3Dmol.view, + v: Union[py3Dmol.view, Complex3D], position: Tuple[int, int] = (0, 0), display_all: bool = False, colormap: Optional[Dict[ResidueId, str]] = None, only_interacting: bool = True, remove_hydrogens: Union[bool, Literal["ligand", "protein"]] = True, ) -> None: + if isinstance(v, Complex3D) and v._view: + v = v._view self._colormap = {} if colormap is None else colormap self._models = {} self._mid = -1