Re: [Rdkit-discuss] Chirality wedge disappears in PNG depiction

2023-07-27 Thread Jean-Marc Nuzillard
Yes ! Cheers, Jean-Marc Le 27/07/2023 à 12:54, Paolo Tosco a écrit : from rdkit import Chem from rdkit.Chem.Draw import rdDepictor from rdkit.Chem.Draw import rdMolDraw2D from PIL import Image from io import BytesIO smi = "C1CC[C@H]2[C@@H]2C1" filenameOut = "img.png" mol =

Re: [Rdkit-discuss] Chirality wedge disappears in PNG depiction

2023-07-27 Thread Paolo Tosco
Dear Jean-Marc.Then you only need addChiralHs=False:from rdkit import Chemfrom rdkit.Chem.Draw import rdDepictorfrom rdkit.Chem.Draw import rdMolDraw2Dfrom PIL import Imagefrom io import BytesIO smi = "C1CC[C@H]2[C@@H]2C1"filenameOut = "img.png" mol = Chem.MolFromSmiles(smi)

Re: [Rdkit-discuss] Chirality wedge disappears in PNG depiction

2023-07-27 Thread Jean-Marc Nuzillard
Dear Paolo, your code works perfectly well. Running it with the SMILES of trans-decalin, C1CC[C@H]2[C@@H]2C1, I obtained . The code with ReapplyMolBlockWedging() inside (that you proposed me in a previous post) was intended to have no H atom displayed at ring junctions. Sure, the SMILES of

Re: [Rdkit-discuss] Chirality wedge disappears in PNG depiction

2023-07-27 Thread Paolo Tosco
Dear Jean-Marc,You are generating the molecule from SMILES, therefore it does not have molblock wedging information.When you call ReapplyMolBlockWedging(), first existing wedging info will be stripped.Then, the molblock wedging will be applied, but there is none.Hence, you get no wedging.You may

Re: [Rdkit-discuss] Chirality wedge disappears in PNG depiction

2023-07-26 Thread Jean-Marc Nuzillard
Hi David, thank you for your suggestion. Setting wedgeBonds=True does not change anything, probably because wedging is performed later by the call to Chem.ReapplyMolBlockWedging() Best, Jean-Marc Le 26/07/2023 à 22:28, David Cosgrove a écrit : Hi, I’m away from my computer at the moment, so

Re: [Rdkit-discuss] Chirality wedge disappears in PNG depiction

2023-07-26 Thread David Cosgrove
Hi, I’m away from my computer at the moment, so can’t try anything, but I wonder if it’s anything to do with the ‘wedgeBonds=False’ option you gave when preparing the drawing. Dave On Wed, 26 Jul 2023 at 20:45, Jean-Marc Nuzillard < jm.nuzill...@univ-reims.fr> wrote: > Dear all, > > I use the

[Rdkit-discuss] Chirality wedge disappears in PNG depiction

2023-07-26 Thread Jean-Marc Nuzillard
Dear all, I use the following code to produce PNG drawings. I use RDKit version 2023.03.1 . The SMILES chain describes a molecule with a single chiral center of defined configuration. from rdkit import Chem from rdkit.Chem import rdCoordGen from rdkit.Chem.Draw import rdMolDraw2D from PIL