Hello RDKit Gurus -
I'm new to RDKit but I'm having a great time and am very impressed with the
kit, creator and community. Could someone please help this newbie with a
problem re: reaction transformations?
When a reaction transform includes an atom that is not modified, it still
replaces that atom such that its attributes are lost. Specifically, when
you react a chiral reactant, if an atom in the transform maps to the
stereocenter, the resulting product includes that atom (as it should) but
it has lost (or failed to copy over) the attributes of the reactant's atom
(i.e. chirality).
Here is some code to illustrate the problem:
# Demo of RDKit reaction transform nuking stereocenters
from rdkit import Chem
from rdkit.Chem import AllChem
# Define simple transform that includes possible stereocenter ([C:2])
rxn = AllChem.ReactionFromSmarts('[C:2][C:1]=O>>[C:2][C:1]=S')
# React achiral mol as test
ps = rxn.RunReactants((Chem.MolFromSmiles('CC=O'),))
Chem.MolToSmiles( ps[0][0], isomericSmiles=True )
# Output is 'CC=S'
# React mol with chiral center far removed
ps = rxn.RunReactants((Chem.MolFromSmiles('[Cl][C@H]([Br])CCCC=O'),))
Chem.MolToSmiles( ps[0][0], isomericSmiles=True )
# Output is 'S=CCCC[C@H](Cl)Br'
# React mol with chiral center included in transform component
ps = rxn.RunReactants((Chem.MolFromSmiles('[Cl][C@H](C=O)'),))
Chem.MolToSmiles( ps[0][0], isomericSmiles=True )
# Output is 'S=CCCl' - chriality has been lost.
There is probably a simple way to avoid this. Ideally (in my opinion) RDKit
should handle this by having rxn.RunReactants() use rxn.GetReactingAtoms()
and, if at atom is not reacting (i.e. changing), be sure to copy all its
attributes from the mapped-to reactant atom onto the corresponding product
atom. However, in the simple example above, rxn.GetReactingAtoms()
indicates that atoms 1 and 2 are both reacting even though atom 2 doesn't
change at all.
Thank you for your help and advice -
- Robert
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss