RDKit
Open-source cheminformatics and machine learning.
Toggle main menu visibility
Loading...
Searching...
No Matches
MolDraw2DSGroupData.h
Go to the documentation of this file.
1
//
2
// Copyright (C) 2026 Greg Landrum and other RDKit contributors
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
#include <
RDGeneral/export.h
>
12
#ifndef RDKITMOLDRAW2DSGROUPDATA_H
13
#define RDKITMOLDRAW2DSGROUPDATA_H
14
15
#include <string>
16
#include <vector>
17
18
#include <
Geometry/point.h
>
19
20
namespace
RDKit
{
21
22
class
ROMol
;
23
24
namespace
MolDraw2D_detail
{
25
26
//! Holds the text and position of a DAT SGroup label.
27
struct
SGroupDataLabel
{
28
std::string
text
;
///< label text
29
RDGeom::Point2D
pos
;
///< position in molecule coordinates
30
bool
positioned
;
///< true if pos came from FIELDDISP; false if pos is
31
///< the associated atom's conformer position (fallback)
32
int
atomIdx
;
///< index of the associated atom (-1 if none)
33
};
34
35
//! Returns the text and positions of DAT SGroup labels for a molecule,
36
//! using the same placement logic as the drawing code.
37
/*!
38
\param mol the molecule
39
\param rotate optional rotation angle in degrees (default 0.0)
40
\return a vector of SGroupDataLabel objects, one per rendered DAT SGroup
41
*/
42
RDKIT_MOLDRAW2D_EXPORT
std::vector<SGroupDataLabel>
getSGroupDataLabels
(
43
const
ROMol
&mol,
double
rotate = 0.0);
44
45
}
// namespace MolDraw2D_detail
46
}
// namespace RDKit
47
48
#endif
RDGeom::Point2D
Definition
point.h:284
RDKit::ROMol
Definition
ROMol.h:344
export.h
RDKIT_MOLDRAW2D_EXPORT
#define RDKIT_MOLDRAW2D_EXPORT
Definition
export.h:401
RDKit::MolDraw2D_detail
Definition
AtomSymbol.h:30
RDKit::MolDraw2D_detail::getSGroupDataLabels
RDKIT_MOLDRAW2D_EXPORT std::vector< SGroupDataLabel > getSGroupDataLabels(const ROMol &mol, double rotate=0.0)
RDKit
Std stuff.
Definition
Abbreviations.h:19
point.h
RDKit::MolDraw2D_detail::SGroupDataLabel
Holds the text and position of a DAT SGroup label.
Definition
MolDraw2DSGroupData.h:27
RDKit::MolDraw2D_detail::SGroupDataLabel::text
std::string text
label text
Definition
MolDraw2DSGroupData.h:28
RDKit::MolDraw2D_detail::SGroupDataLabel::atomIdx
int atomIdx
index of the associated atom (-1 if none)
Definition
MolDraw2DSGroupData.h:32
RDKit::MolDraw2D_detail::SGroupDataLabel::positioned
bool positioned
Definition
MolDraw2DSGroupData.h:30
RDKit::MolDraw2D_detail::SGroupDataLabel::pos
RDGeom::Point2D pos
position in molecule coordinates
Definition
MolDraw2DSGroupData.h:29
GraphMol
MolDraw2D
MolDraw2DSGroupData.h
Generated on
for RDKit by
1.17.0