I'm interested in what the "right" way to encode hydrogen changes for a given atom across a reaction is with RDKit's reaction SMARTS. Specifically, is there some sort of syntax that can be used to say a given atom loses a hydrogen across a reaction, or that a given atom gains a hydrogen?
Here is an example of what I mean (this is just a made up example to illustrate my issue):
Reaction SMARTS:
[C;H3,H2,H1:1][Cl:2].[O;H1,H2:3]>>[C:1][O:3].[Cl:2]
In this SMARTS, I am trying to say that a carbon bonded to a chlorine and 1, 2, or 3 hydrogens breaks it's Cl bond and bonds itself to an oxygen with 1 or 2 attached hydrogens.
My issue here is that there doesn't seem to be a way to say that oxygen 3 loses a hydrogen across the reaction and that chlorine 2 gains one. Am I missing something?
I have come up with a solution to this issue, which involves writing hydrogens that change explicitly in the SMARTS, then removing them from the SMARTS when I parse the SMARTS and storing the fact that they existed in a separate data structure so I can track changes for a given atom number. This works, but seems like a hack. It also doesn't answer the question for other atom properties, like charge.
Thanks!
I'm interested in what the "right" way to encode hydrogen changes for a given atom across a reaction is with RDKit's reaction SMARTS. Specifically, is there some sort of syntax that can be used to say a given atom loses a hydrogen across a reaction, or that a given atom gains a hydrogen?
Here is an example of what I mean (this is just a made up example to illustrate my issue):
In this SMARTS, I am trying to say that a carbon bonded to a chlorine and 1, 2, or 3 hydrogens breaks it's Cl bond and bonds itself to an oxygen with 1 or 2 attached hydrogens.
My issue here is that there doesn't seem to be a way to say that oxygen 3 loses a hydrogen across the reaction and that chlorine 2 gains one. Am I missing something?
I have come up with a solution to this issue, which involves writing hydrogens that change explicitly in the SMARTS, then removing them from the SMARTS when I parse the SMARTS and storing the fact that they existed in a separate data structure so I can track changes for a given atom number. This works, but seems like a hack. It also doesn't answer the question for other atom properties, like charge.
Thanks!