RDKit::Drawing Namespace Reference

## Namespaces

| detail

## Typedefs

typedef int | ElementType

## Enumerations

enum | PrimType { LINE =1, WEDGE, ATOM, BOUNDS, RESOLUTION }
enum | OrientType { C =0, N, E, S, W }

## Functions

void | DrawingToCairo (const std::vector< int > &drawing, cairo_t *cr, int width, int height, int fontSize=12, int maxDotsPerAngstrom=60)
std::string | DrawingToSVG (const std::vector< int > &drawing, unsigned int lineWidthMult=2, unsigned int fontSize=50, bool includeAtomCircles=false)
std::vector< ElementType > | DrawMol (const ROMol &mol, int confId=-1, const std::vector< int > *highlightAtoms=0, bool includeAtomCircles=false, unsigned int dotsPerAngstrom=100, double dblBondOffset=0.3, double dblBondLengthFrac=0.8, double angstromsPerChar=0.20)
std::vector< int > | MolToDrawing (const RDKit::ROMol &mol, const std::vector< int > *highlightAtoms=0, bool kekulize=true, bool includeAtomCircles=false)

## Typedef Documentation

typedef int RDKit::Drawing::ElementType

Definition at line 38 of file MolDrawing.h.

## Enumeration Type Documentation

enum RDKit::Drawing::OrientType

Enumerator
C |
N |
E |
S |
W |

Definition at line 47 of file MolDrawing.h.

enum RDKit::Drawing::PrimType

Enumerator
LINE |
WEDGE |
ATOM |
BOUNDS |
RESOLUTION |

Definition at line 40 of file MolDrawing.h.

## Function Documentation

void RDKit::Drawing::DrawingToCairo | ( | const std::vector< int > & | drawing,
|  | cairo_t * | cr,
|  | int | width,
|  | int | height,
|  | int | fontSize = `12`,
|  | int | maxDotsPerAngstrom = `60`
| ) |  |

Definition at line 157 of file DrawingToCairo.h.

References ATOM, BOUNDS, LINE, PRECONDITION, and RESOLUTION.

std::string RDKit::Drawing::DrawingToSVG | ( | const std::vector< int > & | drawing,
|  | unsigned int | lineWidthMult = `2`,
|  | unsigned int | fontSize = `50`,
|  | bool | includeAtomCircles = `false`
| ) |  |

Definition at line 138 of file DrawingToSVG.h.

References ATOM, BOUNDS, RDKit::Drawing::detail::drawLine(), and LINE.

std::vector<ElementType> RDKit::Drawing::DrawMol | ( | const ROMol & | mol,
|  | int | confId = `-1`,
|  | const std::vector< int > * | highlightAtoms = `0`,
|  | bool | includeAtomCircles = `false`,
|  | unsigned int | dotsPerAngstrom = `100`,
|  | double | dblBondOffset = `0.3`,
|  | double | dblBondLengthFrac = `0.8`,
|  | double | angstromsPerChar = `0.20`
| ) |  |

Definition at line 145 of file MolDrawing.h.

References RDKit::Bond::AROMATIC, ATOM, RDKit::RingInfo::bondRings(), BOUNDS, C, RDGeom::Point2D::dotProduct(), RDKit::Bond::DOUBLE, RDKit::Drawing::detail::drawLine(), E, RDKit::MolOps::findSSSR(), RDKit::ROMol::getAtomBonds(), RDKit::Atom::getAtomicNum(), RDKit::Drawing::detail::getAtomSymbolAndOrientation(), RDKit::ROMol::getAtomWithIdx(), RDKit::ROMol::getConformer(), RDKit::ROMol::getNumAtoms(), RDKit::Conformer::getPositions(), RDKit::ROMol::getRingInfo(), RDKit::ROMol::getVertices(), RDKit::RingInfo::isInitialized(), N, RDGeom::Point2D::normalize(), RDKit::RingInfo::numBondRings(), RESOLUTION, RDGeom::Point2D::rotate90(), S, RDKit::Bond::SINGLE, RDKit::Bond::TRIPLE, W, RDGeom::Point3D::x, RDGeom::Point2D::x, RDGeom::Point3D::y, and RDGeom::Point2D::y.

Referenced by MolToDrawing().

std::vector<int> RDKit::Drawing::MolToDrawing | ( | const RDKit::ROMol & | mol,
|  | const std::vector< int > * | highlightAtoms = `0`,
|  | bool | kekulize = `true`,
|  | bool | includeAtomCircles = `false`
| ) |  |

Definition at line 408 of file MolDrawing.h.

References RDDepict::compute2DCoords(), DrawMol(), RDKit::ROMol::getNumConformers(), and RDKit::MolOps::Kekulize().