Hi,
Noticed something odd but I'm not confident enough with reaction SMARTS to
say it's a bug. I'm reacting with an OH, leading to the oxygen losing the
hydrogen and gaining a second bond. For example:
> rxn = AllChem.ReactionFromSmarts("[O:1]>>C[O:1]")
> mol = Chem.MolFromSmiles("OC")
> p = rxn.RunReactants((mol,))[0][0]
> Chem.SanitizeMol(p)
rdkit.Chem.rdmolops.SanitizeFlags.SANITIZE_NONE
> Chem.MolToSmiles(p)
'COC'
So far so good. Now to add explicit hydrogens to the oxygen. If mol is
"[OH]C" or "[H]OC" the same behaviour as above happens. However if it is
"[2H]OC" we run into:
ValueError: Sanitization error: Explicit valence for atom # 1 O, 3, is
greater than permitted
because the deuterium is being preserved whereas in the other cases the
hydrogen is discarded. I can't find anything in the SMARTS documentation to
suggest that this is the correct behaviour so I'm going to suggest that if
the [H] was being discarded by the reaction then so should the [2H].
In either case it's not a problem for me as I have no particular interest
in Deuterium containing molecules so I don't need a workaround or quick
fix. I just happened across the behaviour and thought it worth reporting.
Yours,
Toby Wright
--
InhibOx Ltd
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees_APR
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss