Hello,
I’m trying to get a 2D drawing with explicit hydrogens at chiral centers, but
not elsewhere. My approach is below. This is a POPC lipid molecule with a
single chiral center. The drawing is good, and the “[C@H]” stereochemistry is
shown in that one of the bonds is out of plane, but there is no explicit H at
the chiral center. I was under the impression from the rdkit documentation that
hydrogens in [] were explicit by default, and this image makes me think I’m on
the right track:
https://www.rdkit.org/docs/Cookbook.html#black-and-white-molecules , but I
clearly misunderstand the situation.
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import Draw
smiles="CCCCCCCCCCCCCCCC(=O)OC[C@H](COP(=O)([O-])OCC[N+](C)(C)C)OC(=O)CCCCCCC\C=C/CCCCCCCC"
m = Chem.MolFromSmiles(smiles)
AllChem.Compute2DCoords(m)
draw_Ref = Draw.rdMolDraw2D.MolDraw2DCairo(1250, 1250)
Chem.Draw.rdMolDraw2D.PrepareAndDrawMolecule(draw_Ref, m)
with open('tmp.png', 'wb') as f: f.write(draw_Ref.GetDrawingText())
Version info:
>>> from rdkit import rdBase
>>> print(rdBase.rdkitVersion)
2020.03.3
Thank you for your help,
Chris.
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss