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 #include <RDGeneral/export.h>
11 #ifndef RDKITMULTIMOLDRAW2D_H
12 #define RDKITMULTIMOLDRAW2D_H
13 
14 #include <vector>
15 #include <boost/shared_ptr.hpp>
17 
18 namespace RDKit {
19 
20 template <typename T>
22  public:
23  //!
24  MultiMolDraw2D(unsigned int nRows, unsigned int nCols, int width, int height,
25  bool globalScaling = true);
26  virtual ~MultiMolDraw2D() {}
27  virtual void drawMolecules(
28  const std::vector<ROMOL_SPTR> &mols,
29  const std::vector<std::string> *legends = nullptr,
30  const std::vector<std::vector<int>> *highlight_atoms = nullptr,
31  const std::vector<std::vector<int>> *highlight_bonds = nullptr,
32  const std::vector<std::map<int, DrawColour>> *highlight_atom_maps =
33  nullptr,
34  const std::vector<std::map<int, DrawColour>> *highlight_bond_maps =
35  nullptr,
36  const std::vector<std::map<int, double>> *highlight_radii = nullptr,
37  const std::vector<int> *confIds = nullptr);
38 
39  virtual int width() const { return width_; }
40  virtual int height() const { return height_; }
41  virtual int nRows() const { return nRows_; }
42  virtual int nCols() const { return nCols_; }
43 
44  MolDrawOptions &drawOptions() { return options_; }
45  const MolDrawOptions &drawOptions() const { return options_; }
46 
47  private:
48  unsigned int nRows_, nCols_;
49  int width_, height_;
50  bool globalScaling_;
51  MolDrawOptions options_;
52 
53  std::vector<std::shared_ptr<T>> drawers_;
54 };
55 } // namespace RDKit
56 
57 #endif // RDKITMOLDRAW2D_H
virtual int nRows() const
virtual int nCols() const
virtual int height() const
virtual void drawMolecules(const std::vector< ROMOL_SPTR > &mols, const std::vector< std::string > *legends=nullptr, const std::vector< std::vector< int >> *highlight_atoms=nullptr, const std::vector< std::vector< int >> *highlight_bonds=nullptr, const std::vector< std::map< int, DrawColour >> *highlight_atom_maps=nullptr, const std::vector< std::map< int, DrawColour >> *highlight_bond_maps=nullptr, const std::vector< std::map< int, double >> *highlight_radii=nullptr, const std::vector< int > *confIds=nullptr)
const MolDrawOptions & drawOptions() const
virtual int width() const
MultiMolDraw2D(unsigned int nRows, unsigned int nCols, int width, int height, bool globalScaling=true)
MolDrawOptions & drawOptions()
#define RDKIT_MOLDRAW2D_EXPORT
Definition: export.h:437
Std stuff.
Definition: Abbreviations.h:17