itakigawa / mpl_rdkit_utils

DrawMolToMPL: RDKit mol drawing with matplotlib
4 stars 1 forks source link

drawing molecules at the same scale? #1

Open tboen1 opened 3 weeks ago

tboen1 commented 3 weeks ago

Hi @itakigawa, thanks for making this amazing tool. I'm trying to compare a set of molecules of different sizes, and I was wondering what would be the best way to modify the code so that it produces images at a fixed scale across all the subplots.

itakigawa commented 3 days ago

Thanks. I'm interested in the point you mentioned since I have noticed that in MolsToGridImage, multiple molecules are drawn at the same scale. As I understand it, this process is implemented by calling DrawMolecules with drawMolsSameScale=true, and within MolDraw2D.cpp, all molecules are rescaled to match the smallest scale (minScaleMol) and the smallest font size (minFontScaleMol) among them. I'm still unsure whether it's possible to retrieve this information from Python and achieve the same result.