Hi Greg,

To complete the issue:
(i) The bug / behavior is also present using the KNIME's RDKit One Component 
Reaction node: the rsmarts1 leads to chirality inversion, but not the rsmarts2.
(ii) Swapping the right side between the two the reaction SMARTS still leads to 
different results, and seems to depend of the left hand side of the reaction 
SMARTS. Below are details.

# Reaction sides: L-lactate at left hand side, D-lactate at right
l1 = '[#8:6]-[#6@:2](-[#1:8])(-[#6:3](-[#8-:5])=[#8:4])-[#6:1]'
l2 = '[#1:8]-[#6@@:2](-[#6:1])(-[#8:6])-[#6:3](-[#8-:5])=[#8:4]'
r1 = '[#1:8]-[#6@:2](-[#6:1])(-[#8:6])-[#6:3](-[#8-:5])=[#8:4]'
r2 = '[#8:6]-[#6@@:2](-[#1:8])(-[#6:3](-[#8-:5])=[#8:4])-[#6:1]'

rsmarts11 = l1 + '>>' + r1
rsmarts22 = l2 + '>>' + r2
rsmarts12 = l1 + '>>' + r2
rsmarts21 = l2 + '>>' + r1

rxn11 = AllChem.ReactionFromSmarts(rsmarts11)
rxn22 = AllChem.ReactionFromSmarts(rsmarts22)
rxn12 = AllChem.ReactionFromSmarts(rsmarts12)
rxn21 = AllChem.ReactionFromSmarts(rsmarts21)
rxn11.Initialize()
rxn22.Initialize()
rxn12.Initialize()
rxn21.Initialize()

# Reactant: L-lactate
llac = Chem.MolFromSmiles('C[C@H](O)C([O-])=O')
llac = Chem.AddHs(llac)

# Apply
ps = rxn11.RunReactants((llac,))
print('l1 >> r1')
print('Sub ', Chem.MolToSmiles(llac))
print('Prod', Chem.MolToSmiles(ps[0][0]))
# l1 >> r1
# Sub  [H]O[C@]([H])(C(=O)[O-])C([H])([H])[H]
# Prod [H]O[C@@]([H])(C(=O)[O-])C([H])([H])[H]

ps = rxn22.RunReactants((llac,))
print('l2 >> r2')
print('Sub ', Chem.MolToSmiles(llac))
print('Prod', Chem.MolToSmiles(ps[0][0]))
# l2 >> r2
# Sub  [H]O[C@]([H])(C(=O)[O-])C([H])([H])[H]
# Prod [H]O[C@]([H])(C(=O)[O-])C([H])([H])[H]

ps = rxn12.RunReactants((llac,))
print('l1 >> r2')
print('Sub ', Chem.MolToSmiles(llac))
print('Prod', Chem.MolToSmiles(ps[0][0]))
# l1 >> r2
# Sub  [H]O[C@]([H])(C(=O)[O-])C([H])([H])[H]
# Prod [H]O[C@@]([H])(C(=O)[O-])C([H])([H])[H]

ps = rxn21.RunReactants((llac,))
print('l2 >> r2')
print('Sub ', Chem.MolToSmiles(llac))
print('Prod', Chem.MolToSmiles(ps[0][0]))
# l2 >> r2
# Sub  [H]O[C@]([H])(C(=O)[O-])C([H])([H])[H]
# Prod [H]O[C@]([H])(C(=O)[O-])C([H])([H])[H]


Best wishes,
Thomas
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to