Closed frederik-sandfort1 closed 3 months ago
Hi Frederik,
Thanks for reporting this. Such reaction SMILES should now work with the new version of rxn-chemutils
(see change in https://github.com/rxn4chemistry/rxn-chemutils/pull/30). In #53, I added a test to confirm.
Note that although it technically works, the current model was not trained on a single reaction containing such dative bonds :)
@avaucher thank you so much for implementing. I will check on our examples as well.
Also thanks for the note - I am aware of this and likely will keep the current workflow for removing the dative bonds :)
RDKit changed it's behavior to display coordination of metal ions (e.g. carboxylate cations). As this includes a "->", it is incompatible with rxnmappers splitting of the reaction at ">" (see here).
Example for Reaction sanitization:
Example for molecule sanitization:
While likely the "->" is not in the vocab (and thus not compatible with the current model version), you could just check for the sign and replace it with an empty string, to stay compatible with the sanitization. Additionally, it could make sense to use rdkits
rxn.GetReactants()
,rxn.GetAgents()
andrxn.GetProducts()
function instead of the string splitting.Just wanted to make you aware of this issue. Best Frederik
@avaucher