Re: [Rdkit-discuss] Substructure highlightning

2021-01-25 Thread Greg Landrum
Hi Stéphane, I can confirm the change in behavior. I don't think that this was intendentional, so I'll take a look at fixing it. -greg On Mon, Jan 25, 2021 at 3:17 PM BOURG Stephane wrote: > Dear all, > > > > Within rdkit '2020.03.6' the following code in a jupyter notebook goves > the first

Re: [Rdkit-discuss] Substructure highlightning

2021-01-25 Thread Omar H94
Dear Stéphane, I am not sure if there's a direct way to achieve bonds highlighting. You can highlight them manually by: mol = Chem.MolFromSmiles('c1cc(C(=O)O)c(OC(=O)C)cc1') patt = Chem.MolFromSmarts('C(=O)O') hit_ats = list(mol.GetSubstructMatch(patt)) hit_bonds = [] for bond in patt.GetBonds():

[Rdkit-discuss] Substructure highlightning

2021-01-25 Thread BOURG Stephane
Dear all, Within rdkit '2020.03.6' the following code in a jupyter notebook goves the first image below : from rdkit import Chem from rdkit.Chem.Draw import IPythonConsole m = Chem.MolFromSmiles('c1cc(C(=O)O)c(OC(=O)C)cc1') substructure = Chem.MolFromSmarts('C(=O)O') print(m.GetSubstructMatches