From 8658083f95580ede16c398c1f7bce4235db32872 Mon Sep 17 00:00:00 2001 From: richard gowers Date: Thu, 10 Aug 2023 12:08:55 +0100 Subject: [PATCH] fixup to_openmm_positions --- gufe/components/proteincomponent.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gufe/components/proteincomponent.py b/gufe/components/proteincomponent.py index 85d12992..143ac1a0 100644 --- a/gufe/components/proteincomponent.py +++ b/gufe/components/proteincomponent.py @@ -231,12 +231,9 @@ def to_openmm_positions(self) -> "openmm.app.unit.Quantity": """ from openmm import unit as omm_unit - np_pos = deserialize_numpy(self.to_dict()["conformers"][0]) - openmm_pos = ( - list(map(lambda x: np.array(x), np_pos)) * omm_unit.angstrom - ) + np_pos = self._rdkit.GetConformer().GetPositions() - return openmm_pos + return np_pos * omm_unit.angstrom def to_pdb_file(self, out_path: Union[str, bytes, PathLike[str], PathLike[bytes], io.TextIOBase]) -> str: """Write protein to pdb file.