12 #ifndef MOLDRAW2DUTILS_H
13 #define MOLDRAW2DUTILS_H
16 #include <boost/tuple/tuple.hpp>
23 namespace MolDraw2DUtils {
45 RWMol &mol,
bool kekulize =
true,
bool addChiralHs =
true,
46 bool wedgeBonds =
true,
bool forceCoords =
false,
bool wavyBonds =
false);
67 MolDraw2D &drawer,
const ROMol &mol,
const std::string &legend =
"",
68 const std::vector<int> *highlight_atoms =
nullptr,
69 const std::vector<int> *highlight_bonds =
nullptr,
70 const std::map<int, DrawColour> *highlight_atom_map =
nullptr,
71 const std::map<int, DrawColour> *highlight_bond_map =
nullptr,
72 const std::map<int, double> *highlight_radii =
nullptr,
int confId = -1,
73 bool kekulize =
true);
78 const std::string &json);
94 {0.557, 0.004, 0.322, 0.5},
96 {0.153, 0.392, 0.098, 0.5}};
122 MolDraw2D &drawer,
const double *grid,
const std::vector<double> &xcoords,
123 const std::vector<double> &ycoords,
size_t nContours,
125 const ROMol *mol =
nullptr);
128 MolDraw2D &drawer,
const double *grid,
const std::vector<double> &xcoords,
129 const std::vector<double> &ycoords,
size_t nContours = 10,
131 std::vector<double> levels;
165 MolDraw2D &drawer,
const std::vector<Point2D> &locs,
166 const std::vector<double> &heights,
const std::vector<double> &widths,
167 size_t nContours, std::vector<double> &levels,
171 MolDraw2D &drawer,
const std::vector<Point2D> &locs,
172 const std::vector<double> &heights,
const std::vector<double> &widths,
174 const ROMol *mol =
nullptr) {
175 std::vector<double> levels;
192 const std::vector<int> *highlight_atoms,
193 const std::vector<int> *highlight_bonds,
194 const std::map<int, DrawColour> *highlight_atom_map =
nullptr,
195 const std::map<int, DrawColour> *highlight_bond_map =
nullptr,
196 const std::map<int, double> *highlight_radii =
nullptr,
int confId = -1);
224 double meanBondLen = 1.0);
Defines the editable molecule class RWMol.
MolDraw2D is the base class for doing 2D renderings of molecules.
RWMol is a molecule class that is intended to be edited.
#define RDKIT_MOLDRAW2D_EXPORT
RDKIT_MOLDRAW2D_EXPORT void updateMolDrawOptionsFromJSON(MolDrawOptions &opts, const char *json)
RDKIT_MOLDRAW2D_EXPORT void contourAndDrawGrid(MolDraw2D &drawer, const double *grid, const std::vector< double > &xcoords, const std::vector< double > &ycoords, size_t nContours, std::vector< double > &levels, const ContourParams &ps=ContourParams(), const ROMol *mol=nullptr)
Generates and draws contours for data on a grid.
RDKIT_MOLDRAW2D_EXPORT void prepareMolForDrawing(RWMol &mol, bool kekulize=true, bool addChiralHs=true, bool wedgeBonds=true, bool forceCoords=false, bool wavyBonds=false)
Does some cleanup operations on the molecule to prepare it to draw nicely.
RDKIT_MOLDRAW2D_EXPORT void setACS1996Options(MolDrawOptions &opts, double meanBondLen=1.0)
RDKIT_MOLDRAW2D_EXPORT void updateDrawerParamsFromJSON(MolDraw2D &drawer, const char *json)
RDKIT_MOLDRAW2D_EXPORT double meanBondLength(const ROMol &mol, int confId=-1)
RDKIT_MOLDRAW2D_EXPORT void drawMolACS1996(MolDraw2D &drawer, const ROMol &mol, const std::string &legend, const std::vector< int > *highlight_atoms, const std::vector< int > *highlight_bonds, const std::map< int, DrawColour > *highlight_atom_map=nullptr, const std::map< int, DrawColour > *highlight_bond_map=nullptr, const std::map< int, double > *highlight_radii=nullptr, int confId=-1)
Draw a molecule to a MolDraw2D object according to ACS 1996 guidelines.
RDKIT_MOLDRAW2D_EXPORT void contourAndDrawGaussians(MolDraw2D &drawer, const std::vector< Point2D > &locs, const std::vector< double > &heights, const std::vector< double > &widths, size_t nContours, std::vector< double > &levels, const ContourParams &ps=ContourParams(), const ROMol *mol=nullptr)
Generates and draws contours for a set of gaussians.
RDKIT_MOLDRAW2D_EXPORT void prepareAndDrawMolecule(MolDraw2D &drawer, const ROMol &mol, const std::string &legend="", const std::vector< int > *highlight_atoms=nullptr, const std::vector< int > *highlight_bonds=nullptr, const std::map< int, DrawColour > *highlight_atom_map=nullptr, const std::map< int, DrawColour > *highlight_bond_map=nullptr, const std::map< int, double > *highlight_radii=nullptr, int confId=-1, bool kekulize=true)
prepare a molecule for drawing and draw it
std::vector< DrawColour > colourMap