From 4e7d0746f952ffdc880cb1a0cced6372bdf3300b Mon Sep 17 00:00:00 2001 From: juhimgupta Date: Thu, 5 Feb 2026 11:30:04 -0500 Subject: [PATCH 1/3] fixed bug in to_xace_mol --- omtra/data/plinder/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/omtra/data/plinder/__init__.py b/omtra/data/plinder/__init__.py index 5025f86c..81d5003c 100644 --- a/omtra/data/plinder/__init__.py +++ b/omtra/data/plinder/__init__.py @@ -112,7 +112,10 @@ def to_xace_mol(self, dense=False) -> MolXACE: if k == 'x': xace_dict[k] = xace_dict[k].float() else: - xace_dict[k] = xace_dict[k].long() + try: + xace_dict[k] = xace_dict[k].long() + except: + print(f"Error converting key {k} to long tensor.") xace_ligand = MolXACE(**xace_dict) if dense: From 14c63e1300d724714d72a81dced3e9e2c37df54c Mon Sep 17 00:00:00 2001 From: juhimgupta Date: Wed, 11 Feb 2026 20:20:41 -0500 Subject: [PATCH 2/3] Updated bug fix for fixed_atom_mask and fixed_edge_mask --- omtra/data/plinder/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/omtra/data/plinder/__init__.py b/omtra/data/plinder/__init__.py index 81d5003c..83014219 100644 --- a/omtra/data/plinder/__init__.py +++ b/omtra/data/plinder/__init__.py @@ -112,10 +112,10 @@ def to_xace_mol(self, dense=False) -> MolXACE: if k == 'x': xace_dict[k] = xace_dict[k].float() else: - try: - xace_dict[k] = xace_dict[k].long() - except: - print(f"Error converting key {k} to long tensor.") + if xace_dict[k] is None: + assert k in ['fixed_atom_mask', 'fixed_edge_mask'], f"{k} is None but not in ['fixed_atom_mask', 'fixed_edge_mask']" + continue + xace_dict[k] = xace_dict[k].long() xace_ligand = MolXACE(**xace_dict) if dense: From 588179c72e9ab1ae944b11c64df7243bf8f866d7 Mon Sep 17 00:00:00 2001 From: juhimgupta Date: Thu, 12 Feb 2026 15:28:57 -0500 Subject: [PATCH 3/3] Updated bug fix in to_xace_mol --- omtra/data/plinder/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/omtra/data/plinder/__init__.py b/omtra/data/plinder/__init__.py index 864d7405..a2069350 100644 --- a/omtra/data/plinder/__init__.py +++ b/omtra/data/plinder/__init__.py @@ -118,13 +118,13 @@ def to_xace_mol(self, dense=False) -> MolXACE: # very hacky bug fix here if xace_dict[k] is None and k in ['fixed_atom_mask', 'fixed_edge_mask']: continue + elif xace_dict[k] is None and k not in ['fixed_atom_mask', 'fixed_edge_mask']: + raise ValueError(f"{k} is None but not in ['fixed_atom_mask', 'fixed_edge_mask']") + if k == 'x': xace_dict[k] = xace_dict[k].float() else: - if xace_dict[k] is None: - assert k in ['fixed_atom_mask', 'fixed_edge_mask'], f"{k} is None but not in ['fixed_atom_mask', 'fixed_edge_mask']" - continue xace_dict[k] = xace_dict[k].long() xace_ligand = MolXACE(**xace_dict)