RDKit
Open-source cheminformatics and machine learning.
MolDraw2DDetails.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2015 Greg Landrum
3 //
4 // @@ All Rights Reserved @@
5 // This file is part of the RDKit.
6 // The contents are covered by the terms of the BSD license
7 // which is included in the file license.txt, found at the root
8 // of the RDKit source tree.
9 //
10 
11 #ifndef RDKITMOLDRAW2DDETAILS_H
12 #define RDKITMOLDRAW2DDETAILS_H
13 
14 #include <vector>
15 
16 #include <Geometry/point.h>
17 #include <GraphMol/RDKitBase.h>
18 
19 #include <boost/tuple/tuple.hpp>
20 
21 // ****************************************************************************
22 using RDGeom::Point2D;
23 
24 namespace RDKit {
25 namespace MolDraw2D_detail {
26 // data taken from the helvetica font info in
27 // $RDBASE/rdkit/sping/PDF/pdfmetrics.py
28 const int char_widths[] = {
29  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
30  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
31  0, 0, 0, 0, 278, 278, 355, 556, 556, 889, 667, 222, 333, 333,
32  389, 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556,
33  556, 556, 278, 278, 584, 584, 584, 556, 1015, 667, 667, 722, 722, 667,
34  611, 778, 722, 278, 500, 667, 556, 833, 722, 778, 667, 778, 722, 667,
35  611, 722, 667, 944, 667, 667, 611, 278, 278, 278, 469, 556, 222, 556,
36  556, 500, 556, 556, 278, 556, 556, 222, 222, 500, 222, 833, 556, 556,
37  556, 556, 333, 500, 278, 556, 500, 722, 500, 500, 500, 334, 260, 334,
38  584, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
39  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
40  0, 0, 0, 0, 0, 0, 0, 333, 556, 556, 167, 556, 556, 556,
41  556, 191, 333, 556, 333, 333, 500, 500, 0, 556, 556, 556, 278, 0,
42  537, 350, 222, 333, 333, 556, 1000, 1000, 0, 611, 0, 333, 333, 333,
43  333, 333, 333, 333, 333, 0, 333, 333, 0, 333, 333, 333, 1000, 0,
44  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
45  0, 1000, 0, 370, 0, 0, 0, 0, 556, 778, 1000, 365, 0, 0,
46  0, 0, 0, 889, 0, 0, 0, 278, 0, 0, 222, 611, 944, 611,
47  0, 0, 834};
48 
49 void arcPoints(const Point2D &cds1, const Point2D &cds2,
50  std::vector<Point2D> &res, float startAng = 0,
51  float extent = 360);
52 }
53 }
54 
55 #endif
void arcPoints(const Point2D &cds1, const Point2D &cds2, std::vector< Point2D > &res, float startAng=0, float extent=360)
pulls in the core RDKit functionality
Includes a bunch of functionality for handling Atom and Bond queries.
Definition: Atom.h:29