Closed feiranl closed 2 years ago
RDChiral is mostly meant for retrosynthetic reactions starting from a single product (based on the way it handled ambiguity). If you want to repurpose it for a template with multiple inputs, you should just use a concatenated SMILES O=C([O-])CCC(=O)C(=O)[O-].[NH4+]
Hi, Thanks for the reply!
If I use the concatenated SMILES as the input, there would reports an error
ValueError: ChemicalParserException: Number of reactants provided does not match number of reactant templates.
The code I am using is:
rule = '[C:1]-[C;H0;D3;+0:2](-[O-;H0;D1:5])=[O;D1;H0:4].[NH4+;D0:3]>>[C:1]-[C;H0;D3;+0:2](-[NH2;D1;+0:3])=[O;D1;H0:4].[OH2;D0;+0:5]'
product_smiles = rdchiralRunText(rule, 'O=C([O-])CCC(=O)C(=O)[O-].[NH4+]')
Your rule should be written as a pseudo-unimolecular reaction by grouping the two SMARTS fragments. See if this works:
rule = '([C:1]-[C;H0;D3;+0:2](-[O-;H0;D1:5])=[O;D1;H0:4].[NH4+;D0:3])>>[C:1]-[C;H0;D3;+0:2](-[NH2;D1;+0:3])=[O;D1;H0:4].[OH2;D0;+0:5]'
Thanks!
Hi,
My template rule has two reactants. May I know how can I input two reactants in the
product_smiles = rdchiralRunText(rule, reactant_smiles)
. For example, the smiles for my reactants areO=C([O-])CCC(=O)C(=O)[O-]
and[NH4+]
.