Hi Devendra, Your starting molecule is aromatic, as is your product; by default RDKit writes aromatic SMILES. If you wish to write your molecule as kekulized SMILES, do the following:
In [1]: from rdkit import Chem In [2]: smi = "CN1C(NC2=NC=CC=C2)=CC=C1" In [3]: mol = Chem.MolFromSmiles(smi) In [4]: Chem.MolToSmiles(mol) Out[4]: 'Cn1cccc1Nc1ccccn1' In [6]: Chem.Kekulize(mol) In [7]: Chem.MolToSmiles(mol, kekuleSmiles=True) Out[7]: 'CN1C=CC=C1NC1=NC=CC=C1' Cheers, p. > On 3 Jan 2020, at 23:26, Devendra Dhaked <devendra....@gmail.com> wrote: > > > Hi, > > I have written SMIRKS for reaction transformation of reagent > "CN1C(NC2=NC=CC=C2)=CC=C1" into product "CN1CC=CC1=NC2=NC=CC=C2". > > but after transformation in forward direction it showed lost bond order in > product molecule Cn1cC=C[c]1=Nc1ccccn1. > code for forward direction > reactant1 = Chem.MolFromSmiles('CN1C(NC2=NC=CC=C2)=CC=C1') > rxn = > AllChem.ReactionFromSmarts('[O,NX3;H1:2][cX3z2;r5:3]:[c;r5:4][c;r5:5]:[cr5R{1-2}:6]>>[O,S,NX2:2]=[CX3;z2;r5:3][C;r5:4]=[C;r5:5][CX4;r5;!H0:6]') > ps=rxn.RunReactants((reactant1,)) > print(len(ps)) > print(Chem.MolToSmiles(ps[0][0],True)) > > Similarly in backward direction produced product(reactant) also lost its bond > order > CN1cccc1Nc1ccccn1. > code for backward direction > reactant1 = Chem.MolFromSmiles('CN1CC=CC1=NC2=NC=CC=C2') > rxn = > AllChem.ReactionFromSmarts('[O,S,NX2:2]=[CX3;z2;r5:3][C;r5:4]=[C;r5:5][CX4;r5;!H0:6]>>[O,NX3;H1:2][cX3z2;r5:3]:[c;r5:4][c;r5:5]:[cr5R{1-2}:6]') > ps=rxn.RunReactants((reactant1,)) > print(len(ps)) > print(Chem.MolToSmiles(ps[0][0],True)) > > Thanks. > > -- > Regards > > Devendra K Dhaked (Ph.D.) > Center for Cancer Research > Chemical Biology Laboratory > National Cancer Institute (NIH) > Boyles Street, Frederick, MD > USA > _______________________________________________ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss