Skip to content

Reactions do not propagate query information to products #6015

@greglandrum

Description

@greglandrum

Describe the bug
Reactions end up stripping all query information from reacting molecules. This includes both atoms directly involved in the reaction (i.e. those in the template) and other atoms. Here's a demo:

In [87]: rxn = rdChemReactions.ReactionFromSmarts("[C:1]>>[C:1]")

In [88]: m = Chem.MolFromSmarts("[C&R&X3][OR]")

In [89]: ps = rxn.RunReactants((m,))

In [90]: len(ps)
Out[90]: 1

In [91]: ps[0][0].GetAtomWithIdx(0).HasQuery()
Out[91]: False

In [92]: ps[0][0].GetAtomWithIdx(1).HasQuery()
Out[92]: False

It would be very helpful if this were not the case.

Configuration (please complete the following information):

  • RDKit version: current release and master
  • OS: all

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions