From 8513fb4d35155b7c49c082f4275d05b081e5ae59 Mon Sep 17 00:00:00 2001
From: Xavier Robin <xavalias-github@xavier.robin.name>
Date: Thu, 16 Mar 2023 16:05:37 +0100
Subject: [PATCH] fix: SCHWED-5481 actually remove hydrogens

---
 actions/ost-compare-ligand-structures | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/actions/ost-compare-ligand-structures b/actions/ost-compare-ligand-structures
index fc197d71a..ee7575218 100644
--- a/actions/ost-compare-ligand-structures
+++ b/actions/ost-compare-ligand-structures
@@ -284,8 +284,8 @@ def _LoadLigand(file):
     Load a single ligand from file names. Return an entity.
     """
     ligand_ent = ost.io.LoadEntity(file, format="sdf")
-    ligand_ent.Select("ele != H")
-    return ligand_ent.Copy()
+    ligand_view = ligand_ent.Select("ele != H")
+    return ost.mol.CreateEntityFromView(ligand_view, False)
 
 
 def _Validate(structure, ligands, legend, fault_tolerant=False):
-- 
GitLab