Cheminformatics Tutorials - Herong's Tutorial Examples - v2.01, by Herong Yang
rdkit.Chem.Draw.rdMolDraw2D.MolDrawOptions - Drawing Options
This section provides a quick introduction on the rdkit.Chem.Draw.rdMolDraw2D.MolDrawOptions class, which represents a set of 2D molecule drawing options.
What Is rdkit.Chem.Draw.rdMolDraw2D.MolDrawOptions? - rdkit.Chem.Draw.rdMolDraw2D.MolDrawOptions is a special class representing a set of 2D molecule drawing options.
MolDrawOptions can be used to control drawing behaviors of MolDraw2DImage and MolDraw2DSVG class as shown below in a Jupyter Notebook session:
from rdkit.Chem.Draw import rdMolDraw2D from rdkit import Chem mol = Chem.MolFromSmiles('Cc1ccccc1') d = rdMolDraw2D.MolDraw2DCairo(300, 300) s = d.drawOptions() s.addAtomIndices = True s.bondLineWidth = 6 d.DrawMolecule(mol) d.FinishDrawing() p = d.GetDrawingText() import IPython.display i = IPython.display.Image(p) display(i)
Here is another example of changing molecule drawing options with the rdkit.Chem.Draw.rdMolDraw2D.MolDraw2DSVG class.
from rdkit.Chem.Draw import rdMolDraw2D from rdkit import Chem mol = Chem.MolFromSmiles('Cc1ccccc1') d = rdMolDraw2D.MolDraw2DSVG(200, 200) s = d.drawOptions() s.addAtomIndices = True s.bondLineWidth = 6 d.DrawMolecule(mol) d.FinishDrawing() p = d.GetDrawingText() import IPython.display i = IPython.display.SVG(p) display(i)
Table of Contents
SMILES (Simplified Molecular-Input Line-Entry System)
Open Babel: The Open Source Chemistry Toolbox
Using Open Babel Command: "obabel"
Generating SVG Pictures with Open Babel
Substructure Search with Open Babel
Similarity Search with Open Babel
Fingerprint Index for Fastsearch with Open Babel
Stereochemistry with Open Babel
Command Line Tools Provided by Open Babel
RDKit: Open-Source Cheminformatics Software
rdkit.Chem.rdchem - The Core Module
rdkit.Chem.rdmolfiles - Molecular File Module
rdkit.Chem.rdDepictor - Compute 2D Coordinates
►rdkit.Chem.Draw - Handle Molecule Images
What Is rdkit.Chem.Draw Module
MolToImage/MolToFile - Molecule PNG Image
rdkit.Chem.Draw.MolDrawing.DrawingOptions Class
rdkirdkit.Chem.Draw.rdMolDraw2D.MolDraw2DCairo - 2D Molecule Drawing
rdkit.Chem.Draw.rdMolDraw2D.MolDraw2DCairo - Molecule PNG Image
rdkit.Chem.Draw.rdMolDraw2D.MolDraw2DSVG - Molecule SVG Image
►rdkit.Chem.Draw.rdMolDraw2D.MolDrawOptions - Drawing Options
Drawing Diagrams with MolDraw2DCairo and MolDraw2DSVG
Molecule Substructure Search with RDKit
rdkit.Chem.rdmolops - Molecule Operations
Daylight Fingerprint Generator in RDKit
Morgan Fingerprint Generator in RDKit
RDKit Performance on Substructure Search
Introduction to Molecular Fingerprints
OCSR (Optical Chemical Structure Recognition)
AlphaFold - Protein Structure Prediction