Hi there RDkitters, I have a molecule defined in aromatic form ("c1n[nH]nn1") and I am trying to do a replace substructs on it using the equivalent kekule form as a query ("'C1=N[NH1]N=N1"). However the substitution does not happen. As shown by the following code:
from rdkit import Chem from rdkit.Chem import AllChem mol = Chem.MolFromSmiles('c1n[nH]nn1') r = Chem.MolFromSmiles('c1[n-]nnn1', sanitize=False) # some arbitrary tautomer q = Chem.MolFromSmarts('C1=N[NH1]N=N1') replaced = AllChem.ReplaceSubstructs(mol, q, r, replaceAll=True)[0] print Chem.MolToSmiles(replaced) Any ideas why this is the case/what I am doing wrong? Many thanks, - Jean-Paul Ebejer Early Stage Researcher ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_nov _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss