How can I add my own superatoms into AbbreviationsDefinition #3677
-
The function rdkit.Chem.rdAbbreviations.GetDefaultAbbreviations() return a list of 37 predefined superatoms. I am trying to add those superatoms defined in superatom.txt into the default abbreviation definition. How can I do this? Besides, when I print the *.mol for the default abbreviation, I got this error: Traceback (most recent call last): code is: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @mily33, Here's a quick example demonstrating how to reformat that file and use it to create a set of abbreviations: Note that this does not handle the last entries. Since those are defined by a dummy atom (which would match anything) they aren't suitable for use as abbreviations (though they probably could be used to expand superatoms in input data). The problem with -greg |
Beta Was this translation helpful? Give feedback.
Hi @mily33,
Here's a quick example demonstrating how to reformat that file and use it to create a set of abbreviations:
https://gist.github.com/greglandrum/c2df5e0ad91f4eee050848554264eff7
Note that this does not handle the last entries. Since those are defined by a dummy atom (which would match anything) they aren't suitable for use as abbreviations (though they probably could be used to expand superatoms in input data).
The problem with
a.mol
giving an error is a bug. Would you mind reporting that as a separate issue?-greg