Closed dhristozov closed 1 month ago
Hi again,
the code is, for historical reasons, still a rather convoluted mess and it is a bit difficult to see what is going on. Error messages are not helping either. The relevant data structure is Parameters in said file which asks for a list of lists. In practice you may have several attachments points in a scaffold and so have to provide a reaction SMARTS for each. You may also want to provide several desired reaction patterns per attachment points and so need another entry in the list.
Many thanks, Hannes.
Hi Hannes,
Thanks for the quick reply!
Just to clarify, is specifying the reaction patterns as a list of list (with one list per attachment point, not sure how those will be mapped?) in toml the way to go?
Thanks, Dimitar
Ah, yes. It is definitely a list of list where each inner list maps each RDKit reaction SMILES to the dummy atoms in the input scaffold from left to right as they appear in the SMILES string. It is strictly in that order. We do not make use of the atom map numbers!
I am getting a ValueError when using the ReactionFilter component with reinvent 4.4.22 under Linux.
Stepping through the code, I see that the
ReactionFilter
component passes aReactionFilterParams
object to the actual filter class (line 75 incomp_reaction_filter.py
). However,SelectiveFilter
expects aReactionFilterConfiguration
object. From here there's a call to_configure_reactions
which expects aDict[str, List[str]]
but neitherReactionFilterParams
norReactionFilterConfiguration
have such Dict. The issue seems to be thatReactionFilterParams
provides a single list and not a list of lists, hence ultimatelycreate_reactions_from_smarts
receives a string and tries to parse each character as a reaction.If I change the toml to
runs complete as expected.
Is that the expected way to specify these? Thanks.
Minimal config file to reproduce the problem (please adjust paths to priors and make sure "some.scaffold.smi" exists)