Skip to content

problem with reactions involving radicals #69

@i-lengyel

Description

@i-lengyel

Using a simple bond-breaking reaction smiles should generate two radicals; however, the code adds two extra implicit hydrogens (one for each radicals). Example:
[Cv4:1]-[Cv4:2]>>[Cv3:1].[Cv3:2]

a) Feeding the reaction with 'CCCCC' generates methane ethane, propane and butane rather than methyl, ethyl, ... radicals. It means that there is no atom conservation from left to right, which is certainly incorrect in chemistry.
b) Adding explicit hydrogens to the reactant creates molecules that "looks good" with the explicit hydrogens; however, the molecules are still bad as the code adds an implicit hydrogen to each radicals on the right side. Removing explicit hydrogens certainly does not help, as it will result in a). AssignRadicals function does not do anything as the explicit+implicit hydrogens+C neighbors sum up to the normal valence of C.

Is there a way for a simple fix (like not adding implicit hydrogens in a reaction)?

from rdkit.Chem import AllChem as Chem
from rdkit.Chem import rdmolops as mo
m=Chem.MolFromSmiles('CCCCC')
m=Chem.AddHs(m)
rxn=Chem.ReactionFromSmarts('[Cv4:1]-[Cv4:2]>>[Cv3:1].[Cv3:2]')
ps=rxn.RunReactants((m,)) # produces 8 product pairs, which is 2x that should be
mm=ps[0][0] # pick one product, any
mo.AssignRadicals(mm) # does not do anything, same as without
Chem.SanitizeMol(mm) #have to be used, valence requests does not work without
for a in mm.GetAtoms():
print a.GetSymbol(),a.GetImplicitValence(),a.GetExplicitValence()

results in

C 1 3

H 0 1

H 0 1

H 0 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions