open-reaction-database / ord-schema

Schema for the Open Reaction Database
https://open-reaction-database.org
Apache License 2.0
92 stars 26 forks source link

Update ReactionRole use in get_reaction_smiles #722

Closed skearnes closed 1 month ago

skearnes commented 1 month ago
qai222 commented 1 month ago

Updates get_reaction_smiles to accept ReactionRole.UNSPECIFIED as a marker for reactants and/or products. The test dataset does not have product reaction roles set, and this was causing reaction SMARTS queries to fail since reaction SMILES were not being generated as part of the dataset creation (and thus the rdkit.reactions table was empty).

Does this only affect the test dataset?

skearnes commented 1 month ago

Updates get_reaction_smiles to accept ReactionRole.UNSPECIFIED as a marker for reactants and/or products. The test dataset does not have product reaction roles set, and this was causing reaction SMARTS queries to fail since reaction SMILES were not being generated as part of the dataset creation (and thus the rdkit.reactions table was empty).

Does this only affect the test dataset?

No, there are about 1k inputs and 250k outcomes in the database that have an UNSPECIFIED reaction role. In cases where there was no explicit REACTANT or PRODUCT, these reactions will now be able to generate reaction SMILES.

skearnes commented 1 month ago

@qai222 could you please approve?