Looking at the documentation section (prepareMolsBeforeDrawing
) concerning the molecule preparation, it seems to suggest that if a 2D conformation already exists it will not generate a new one.
Does some cleanup operations on the molecule to prepare it to draw nicely. The operations include: kekulization, addition of chiral Hs (so that we can draw wedges to them), wedging of bonds at chiral centers, and generation of a 2D conformation if the molecule does not already have a conformation
If your molecules are coming from something like an SDF then perhaps removing the conformations already present will fix this problem, although I am not entirely sure as I don't have an SDF to test. Try adding the below before drawing the images, assuming you don't have a use for the conformation already present, otherwise, make a copy beforehand.
# Assuming molecules are in a list named mols
for mol in mols:
mol.RemoveAllConformers() # edited in-place
Edit:
Tested this on some compounds with 3D conformations and removing the conformers indeed forced rdkit to generate new 2D coordinates for the depiction.
Alternatively you could also add the 2D coordinates yourself overwriting the existing conformation, then you can remove the preparation argument if you desire, assuming you are not interested in the other cleanup steps it performs:
for mol in mols:
AllChem.Compute2dCoords(mol, clearConfs=True)