Re: [Rdkit-discuss] How to center atom labels vertically?

2020-10-21 Thread theozh
Hi Greg, in the meantime, I updated to RDKit2020.03 via Anaconda and also tried Draw.MolToImage(), but I'm running into new problems. I believe that I need a QPixmap for a PyQt5 QTableWideget, hence, I need to convert the PIL image into a QPixmap. The lines: from PyQt5.QtGui import

Re: [Rdkit-discuss] How to center atom labels vertically?

2020-10-21 Thread Norwid Behrnd via Rdkit-discuss
Dear theoz, thanks for reminding about release 2020.09.1.0, less than a day old.[1] Assuming you refer currently using release 2019.03.6 I added to conda by the instruction of conda install -c conda-forge rdkit I would wait a little for an update because a) the relevant repository for

Re: [Rdkit-discuss] How to center atom labels vertically?

2020-10-21 Thread theozh
Dear Greg and David, thank you for your responses. Sorry, for not being incomplete with information. I'm using RDKit2019.03 under Windows using Anaconda3. I haven't found out yet how to update to the latest RDKit (2020.09?) version. In a PyQt Application I want to list structures as images in a

Re: [Rdkit-discuss] How to center atom labels vertically?

2020-10-20 Thread Greg Landrum
Hi Theo, The atom label placement in drawings turns out to be very tricky to do in a cross platform way. You're using the RDKit's old drawing code which we haven't been maintaining for a while now, I'd recommend either switching to using one of the convenience functions likes Draw.MolToImage() or

[Rdkit-discuss] How to center atom labels vertically?

2020-10-20 Thread theozh
Dear RDKit-ers, this sounds like a simple problem, however, I haven't found a link to the corresponding documentation. When I draw a structure with: from.rdkit.Chem import Draw Draw.MolToQPixmap(mol) The non-Carbon atom labels are not centered to the bonds, but typically shifted downwards.