Open utterances-bot opened 2 years ago
oh that's nice. would this work for other incorrect valencies, say in the following nitro group: CCN1CCN(CC1)c2nc(Nc3cccc(C)c3)nc(N)c2NO
or a quartenary N that turned radical: CCN1\C(=C\C=C\C=C\C2=Nc3ccccc3S2)\Sc4ccccc14 CCCCCCCN(CC)CCCCc1ccc(Cl)cc1
yes, it's incorrect, and who would ever write it like that, but this stems e.g. form a public herg and BBB dataset with plenty of incorrect structures though if you look at them drawn then it becomes obvious what is wrong and usually not ambiguous.
@DocMinus yes, this approach should work for those types of transformations as well. You just need to write a reaction SMARTS which performs the modification you want.
Using single-molecule reactions | RDKit blog
A fast and easy way to apply simple reactions
https://greglandrum.github.io/rdkit-blog/tutorial/reactions/2021/12/15/single-molecule-reactions.html