Replies: 1 comment
-
We do have a way of doing this but it's a bit tricky. It uses the PreProcessReaction to look for atom labels that can be used to attach more specific functional group smarts patterns.
It may be a tad tricky to set up but, here is an example making Bromine match only aromatic bromines:
The full list of functional groups can be found:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
Is there a way to use the atom types and features specified in the BaseFeatures.fdef file when defining SMARTS reaction templates?
As a simple example, if I were to define a deprotonation reaction with
AllChem.ReactionFromSmarts()
, I would like to be able to use the AcidicGroup feature that is defined in the fdef file as:I have tried a number of different ways to write out the SMARTS string, but always get the same error related to parsing the string
rxn = AllChem.ReactionFromSmarts('[AcidicGroup:1]>>[*-:1]')
ValueError: ChemicalReactionParserException: Problems constructing reactant from SMARTS: [AcidicGroup:1]
I'm quite new to using RDKit, so I'm sure there are multiple things I may be doing incorrectly.
My project will involve defining a lot of reaction templates, so being able to define and use custom features would be exceptionally helpful.
Thank you all in advance!
Beta Was this translation helpful? Give feedback.
All reactions