From 05fd3268e7a46ab4764053a6782bae59de8622a5 Mon Sep 17 00:00:00 2001 From: Peter Kroon Date: Fri, 5 Jul 2024 14:04:58 +0200 Subject: [PATCH] Make PTM atoms also apply their 'replace' attribute --- vermouth/processors/do_mapping.py | 1 + 1 file changed, 1 insertion(+) diff --git a/vermouth/processors/do_mapping.py b/vermouth/processors/do_mapping.py index 58f8a7886..bf30479c6 100644 --- a/vermouth/processors/do_mapping.py +++ b/vermouth/processors/do_mapping.py @@ -426,6 +426,7 @@ def apply_mod_mapping(match, molecule, graph_out, mol_to_out, out_to_mol): out_idx = max(graph_out) + 1 mod_to_out[mod_idx] = out_idx graph_out.add_node(out_idx, **modification.nodes[mod_idx]) + graph_out.nodes[out_idx].update(modification.nodes[mod_idx].get('replace', {})) else: # Node should already exist # We need to find the out_index of this node. Since the