Dear Rdkit Community,
I’m trying to learn reaction smarts with rdkit and would appreciate some
clarification. I’m doing Boc deprotection on a large set of building blocks and
the way I’ve defined my reaction, the number of hydrogens added after the
deprotection is always wrong. I normally can call UpdatePropertyCache() to fix
this, but when it’s an indole that is being deprotected when I call
UpdatePropertyCache() it raises:
ValueError: Sanitization error: Can't kekulize mol. Unkekulized atoms:
0 1 2 3 4 5 7 8 10
I know how to add hydrogens explicitly in the reaction smarts but not with
reference to the nitrogen’s original bonds. Can I add explicit hydrogens
conditionally? What is the best way to obtain results from the two reactant
cases in my example code?
from rdkit import Chem
from rdkit.Chem import AllChem
reaction = AllChem.ReactionFromSmarts('[#7:1]C(=O)OC(C)(C)C>>[#7:1]')
reactants_1 =
[Chem.MolFromSmiles('CC(C)(C)OC(=O)NC1(C(=O)O)CCN(C(=O)OCC2c3ccccc3-c3ccccc32)CC1')]
display(Draw.MolToImage(reactants_1[0], legend='mol_1'))
products = reaction.RunReactants(reactants_1)
product = products[0][0]
display(Draw.MolToImage(product, legend='mol_1 deprotected'))
product.UpdatePropertyCache()
display(Draw.MolToImage(product, legend='mol_1 deprotected and updated'))
reactants_2 =
[Chem.MolFromSmiles('CC(C)(C)OC(=O)n1cc(C[C@@H](NC(=O)OCC2c3ccccc3-c3ccccc32)C(=O)O)c2ccccc21')]
display(Draw.MolToImage(reactants_2[0], legend='mol_2'))
products = reaction.RunReactants(reactants_2)
product = products[0][0]
display(Draw.MolToImage(product, legend='mol_2 deprotected'))
product.UpdatePropertyCache()
display(Draw.MolToImage(product, legend='mol_2 deprotected and updated'))
Thanks for any clarification you can provide!
Sincerely,
Sean Stromberg
P.S. Does anyone know why I get so many products when I run these reactions?
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss