RDKit
Open-source cheminformatics and machine learning.
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>
16 
17 namespace RDKit {
18 
19 template <typename T>
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
MultiMolDraw2D(unsigned int nRows, unsigned int nCols, int width, int height, bool globalScaling=true)
const MolDrawOptions & drawOptions() const
virtual int nRows() const
virtual int nCols() const
Includes a bunch of functionality for handling Atom and Bond queries.
Definition: Atom.h:29
virtual int width() const
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)
MolDrawOptions & drawOptions()
virtual int height() const