RDKit: MultiMolDraw2D.h Source File

| RDKit Open-source cheminformatics and machine learning.

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

MultiMolDraw2D.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2016 Greg Landrum
3 // @@ All Rights Reserved @@
4 // This file is part of the RDKit.
5 // The contents are covered by the terms of the BSD license
6 // which is included in the file license.txt, found at the root
7 // of the RDKit source tree.
8 //
9
10 #ifndef RDKITMULTIMOLDRAW2D_H
11 #define RDKITMULTIMOLDRAW2D_H
12
13 #include <vector>
14 #include <boost/shared_ptr.hpp>
15 #include <GraphMol/MolDraw2D/MolDraw2D.h>
16
17 namespace RDKit {
18
19 template <typename T>
20 class MultiMolDraw2D {
21 public:
22 //!
23 MultiMolDraw2D(unsigned int nRows, unsigned int nCols, int width, int height,
24 bool globalScaling = true);
25 virtual ~MultiMolDraw2D() {}
26 virtual void drawMolecules(
27 const std::vector<ROMOL_SPTR> &mols,
28 const std::vector<std::string> *legends = NULL,
29 const std::vector<std::vector<int> > *highlight_atoms = NULL,
30 const std::vector<std::vector<int> > *highlight_bonds = NULL,
31 const std::vector<std::map<int, DrawColour> > *highlight_atom_maps = NULL,
32 const std::vector<std::map<int, DrawColour> > *highlight_bond_maps = NULL,
33 const std::vector<std::map<int, double> > *highlight_radii = NULL,
34 const std::vector<int> *confIds = NULL);
35
36 virtual int width() const { return width_; }
37 virtual int height() const { return height_; }
38 virtual int nRows() const { return nRows_; }
39 virtual int nCols() const { return nCols_; }
40
41 MolDrawOptions &drawOptions() { return options_; }
42 const MolDrawOptions &drawOptions() const { return options_; }
43
44 private:
45 unsigned int nRows_, nCols_;
46 int width_, height_;
47 bool globalScaling_;
48 MolDrawOptions options_;
49
50 std::vector<std::shared_ptr<T> > drawers_;
51 };
52 }
53
54 #endif // RDKITMOLDRAW2D_H
RDKit::MultiMolDraw2D::MultiMolDraw2D
MultiMolDraw2D(unsigned int nRows, unsigned int nCols, int width, int height, bool globalScaling=true)
RDKit::MultiMolDraw2D::drawOptions
const MolDrawOptions & drawOptions() const
Definition: MultiMolDraw2D.h:42
RDKit::MultiMolDraw2D::nRows
virtual int nRows() const
Definition: MultiMolDraw2D.h:38
MolDraw2D.h
RDKit::MultiMolDraw2D
Definition: MultiMolDraw2D.h:20
RDKit::MolDrawOptions
Definition: MolDraw2D.h:62
RDKit::MultiMolDraw2D::nCols
virtual int nCols() const
Definition: MultiMolDraw2D.h:39
RDKit
Std stuff.
Definition: Atom.h:29
RDKit::MultiMolDraw2D::width
virtual int width() const
Definition: MultiMolDraw2D.h:36
RDKit::MultiMolDraw2D::drawMolecules
virtual void drawMolecules(const std::vector< ROMOL_SPTR > &mols, const std::vector< std::string > *legends=NULL, const std::vector< std::vector< int > > *highlight_atoms=NULL, const std::vector< std::vector< int > > *highlight_bonds=NULL, const std::vector< std::map< int, DrawColour > > *highlight_atom_maps=NULL, const std::vector< std::map< int, DrawColour > > *highlight_bond_maps=NULL, const std::vector< std::map< int, double > > *highlight_radii=NULL, const std::vector< int > *confIds=NULL)
RDKit::MultiMolDraw2D::drawOptions
MolDrawOptions & drawOptions()
Definition: MultiMolDraw2D.h:41
RDKit::MultiMolDraw2D::height
virtual int height() const
Definition: MultiMolDraw2D.h:37
RDKit::MultiMolDraw2D::~MultiMolDraw2D
virtual ~MultiMolDraw2D()
Definition: MultiMolDraw2D.h:25