 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
16 #ifndef MOLDRAW2DSVG_H
17 #define MOLDRAW2DSVG_H
30 MolDraw2DSVG(
int width,
int height, std::ostream &os,
int panelWidth = -1,
32 :
MolDraw2D(width, height, panelWidth, panelHeight), d_os(os) {
36 MolDraw2DSVG(
int width,
int height,
int panelWidth = -1,
int panelHeight = -1)
37 :
MolDraw2D(width, height, panelWidth, panelHeight), d_os(d_ss) {
53 const std::string &align_char,
int align,
62 unsigned int nSegments = 16,
63 double vertOffset = 0.05)
override;
68 double &label_height)
const override;
78 const std::map<std::string, std::string> &events = {});
84 const std::vector<int> confIds = {})
const;
88 std::stringstream d_ss;
89 std::string d_activeClass;
91 void drawChar(
char c,
const Point2D &cds)
override;
96 const ROMol &mol,
const Bond *bond,
int at1_idx,
int at2_idx,
97 const std::vector<int> *highlight_atoms =
nullptr,
98 const std::map<int, DrawColour> *highlight_atom_map =
nullptr,
99 const std::vector<int> *highlight_bonds =
nullptr,
100 const std::map<int, DrawColour> *highlight_bond_map =
nullptr,
101 const std::vector<std::pair<DrawColour, DrawColour> > *bond_colours =
nullptr)
override;
104 #endif // MOLDRAW2DSVG_H
#define RDKIT_MOLDRAW2D_EXPORT
MolDraw2DSVG(int width, int height, int panelWidth=-1, int panelHeight=-1)
void addMoleculeMetadata(const ROMol &mol, int confId=-1) const
class for representing a bond
void drawBond(const ROMol &mol, const Bond *bond, int at1_idx, int at2_idx, const std::vector< int > *highlight_atoms=nullptr, const std::map< int, DrawColour > *highlight_atom_map=nullptr, const std::vector< int > *highlight_bonds=nullptr, const std::map< int, DrawColour > *highlight_bond_map=nullptr, const std::vector< std::pair< DrawColour, DrawColour > > *bond_colours=nullptr) override
virtual void tagAtoms(const ROMol &mol)
std::string getDrawingText() const
void drawPolygon(const std::vector< Point2D > &cds) override
void tagAtoms(const ROMol &mol) override
void clearDrawing() override
clears the contents of the drawing
void addMoleculeMetadata(const std::vector< ROMol * > &mols, const std::vector< int > confIds={}) const
MolDraw2DSVG(int width, int height, std::ostream &os, int panelWidth=-1, int panelHeight=-1)
void drawEllipse(const Point2D &cds1, const Point2D &cds2) override
draw an ellipse
MolDraw2D is the base class for doing 2D renderings of molecules.
void drawString(const std::string &str, const Point2D &cds, AlignType align) override
void drawWavyLine(const Point2D &cds1, const Point2D &cds2, const DrawColour &col1, const DrawColour &col2, unsigned int nSegments=16, double vertOffset=0.05) override
draw a wavy line like that used to indicate unknown stereochemistry
void getStringSize(const std::string &label, double &label_width, double &label_height) const override
void setColour(const DrawColour &col) override
sets the current draw color
void alignString(const std::string &str, const std::string &align_char, int align, const Point2D &in_cds, Point2D &out_cds) const override
void tagAtoms(const ROMol &mol, double radius, const std::map< std::string, std::string > &events={})
void drawLine(const Point2D &cds1, const Point2D &cds2) override
draws a line from cds1 to cds2 using the current drawing style
void drawString(const std::string &str, const Point2D &cds) override
drawString centres the string on cds.