Hi Peter,

the change is most likely due to the update to the Drawing code in 2020.09.

I think the issue is that somewhere in the 100 mols you are drawing there
is a very large molecule compared to the others. It seems the new drawing
code then adjusts all molecules to the size of the smallest molecule hence
making all of them look tiny. This works fine when working with similar
sized molecules (series?) but of course becomes an issue when some are
larger than others. Personally I think the better approach is to shrink too
big images rather than making them all same-sized

You can try to just draw the first couple molecules to check if this is
true (looks like that on my side).

One can see the same behavior when using a drawer directly (drawing first
16 mols / first 2 rows)

drawer = rdMolDraw2D.MolDraw2DCairo(1600, 400, 200, 200)
opts = drawer.drawOptions()
opts.prepareMolsBeforeDrawing = True
drawer.DrawMolecules(mols[:16])
drawer.FinishDrawing()
IPython.display.Image(drawer.GetDrawingText())

That generates pretty much the same output as MolsToGridImage.
Here with the drawer the issue for me is that certain size options seem to
be ignored just so that everything is same-sized, most notably
fixedBondLength.

Hope that helps.

Best Regards,

Joos

---------- Forwarded message ----------
> From: "Peter St. John" <peterc.stj...@gmail.com>
> To: RDKit Discuss <rdkit-discuss@lists.sourceforge.net>
> Cc:
> Bcc:
> Date: Thu, 25 Feb 2021 13:42:49 -0700
> Subject: [Rdkit-discuss] molecule sizing in MolsToGridImage
> Hi RDKit users,
>
> With rdkit 2020.03.3, MolsToGridImage had more reasonable molecule sizes:
> [image: Screen Shot 2021-02-25 at 1.39.46 PM.png]
>
> With rdkit 2020.09.4, the default drawing parameters seem to shrink the
> molecules by default in MolsToGridImage:
> [image: Screen Shot 2021-02-25 at 1.37.38 PM.png]
>
> Is there a make the individual molecules larger in MolsToGridImage?
> subImgSize just seems to increase the padding between molecules.
>
> Thanks!
> -- Peter
> _______________________________________________
> 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

Reply via email to