What Is rdkit.Chem.rdDepictor Module

This section provides a quick introduction of the molecule file module of the RDKit library, rdkit.Chem.rdDepictor, which provides functionalities to depict a molecule in a 2 dimensional space.

What Is rdkit.Chem.rdDepictor Module? - rdkit.Chem.rdDepictor module provides functionalities to depict a molecule in a 2 dimensional space.

rdkit.Chem.rdDepictor contains the following main methods:

rdkit.Chem.rdDepictor.Compute2DCoords(m) - Computes 2 dimensional coordinates of atoms and bonds of a given molecule to depict it as a 2-D structure. This method is identical to the rdkit.Chem.rdchem.Mol.Compute2DCoords() method.

rdkit.Chem.rdDepictor.GenerateDepictionMatching2DStructure(m, ref) - Same as Compute2DCoords(m), except that orientation the 2-D structure should match the given reference molecule's structure.

rdkit.Chem.rdDepictor.GenerateDepictionMatching3DStructure(m, ref) - Same as GenerateDepictionMatching2DStructure(m, ref), except that the reference molecule is given with a 3-D structure.

To simplify access names, rdkit.Chem.rdchem module members are also imported at the rdkit.AllChem package level. So you can access module members at both levels: the rdkit.AllChem package level and the rdkit.Chem.rdDepictor module level, as shown below:

herong$ python
>>> import rdkit.Chem
>>> m = rdkit..Chem.rdmolfiles.MolFromSmiles('Cc1ccccc1')

>>> import rdkit.Chem.rdDepictor
>>> rdkit.Chem.rdDepictor.Compute2DCoords(m)
0

>>> print(rdkit.Chem.rdmolfiles.MolToMolBlock(m))

     RDKit          2D

  7  7  0  0  0  0  0  0  0  0999 V2000
    2.5714    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.0714   -0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.3214   -1.2990    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.1786   -1.2990    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.9286    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.1786    1.2990    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.3214    1.2990    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0
  2  3  2  0
  3  4  1  0
  4  5  2  0
  5  6  1  0
  6  7  2  0
  7  2  1  0
M  END

>>> from rdkit.Chem import AllChem
>>> AllChem.Compute2DCoords(m)
0

Table of Contents

 About This Book

 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

What Is rdkit.Chem.rdDepictor Module

 rdkit.Chem.Draw - Handle Molecule Images

 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

 Resources and Tools

 Cheminformatics Related Terminologies

 References

 Full Version in PDF/EPUB