RDKit
Open-source cheminformatics and machine learning.
Toggle main menu visibility
Loading...
Searching...
No Matches
ChiralSet.h
Go to the documentation of this file.
1
//
2
// Copyright (C) 2004-2008 Greg Landrum and Rational Discovery LLC
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
#include <
RDGeneral/export.h
>
11
#ifndef __RD_CHIRAL_SET_H__
12
#define __RD_CHIRAL_SET_H__
13
14
#include <
RDGeneral/Invariant.h
>
15
#include <boost/smart_ptr.hpp>
16
#include <vector>
17
18
namespace
DistGeom
{
19
20
enum class
ChiralSetStructureFlags
: std::uint64_t {
21
IN_FUSED_SMALL_RINGS
=
22
1 << 0,
// a chiral center involved in fusing 2 or more small rings
23
};
24
25
/*! \brief Class used to store a quartet of points and chiral volume bounds on
26
*them
27
*
28
*/
29
class
RDKIT_DISTGEOMETRY_EXPORT
ChiralSet
{
30
public
:
31
unsigned
int
d_idx0
;
// the centroid
32
unsigned
int
d_idx1
;
33
unsigned
int
d_idx2
;
34
unsigned
int
d_idx3
;
35
unsigned
int
d_idx4
;
36
double
d_volumeLowerBound
;
37
double
d_volumeUpperBound
;
38
std::uint64_t
d_structureFlags
=
39
0;
// used to track special cases that may make embedding more difficult
40
41
ChiralSet
(
unsigned
int
pid0,
unsigned
int
pid1,
unsigned
int
pid2,
42
unsigned
int
pid3,
unsigned
int
pid4,
double
lowerVolBound,
43
double
upperVolBound, std::uint64_t structureFlags = 0)
44
:
d_idx0
(pid0),
45
d_idx1
(pid1),
46
d_idx2
(pid2),
47
d_idx3
(pid3),
48
d_idx4
(pid4),
49
d_volumeLowerBound
(lowerVolBound),
50
d_volumeUpperBound
(upperVolBound),
51
d_structureFlags
(structureFlags) {
52
CHECK_INVARIANT
(lowerVolBound <= upperVolBound,
"Inconsistent bounds\n"
);
53
d_volumeLowerBound
= lowerVolBound;
54
d_volumeUpperBound
= upperVolBound;
55
}
56
57
inline
double
getUpperVolumeBound
()
const
{
return
d_volumeUpperBound
; }
58
59
inline
double
getLowerVolumeBound
()
const
{
return
d_volumeLowerBound
; }
60
};
61
62
using
ChiralSetPtr
= boost::shared_ptr<ChiralSet>;
63
using
VECT_CHIRALSET
= std::vector<ChiralSetPtr>;
64
}
// namespace DistGeom
65
66
#endif
Invariant.h
CHECK_INVARIANT
#define CHECK_INVARIANT(expr, mess)
Definition
Invariant.h:100
DistGeom::ChiralSet::d_structureFlags
std::uint64_t d_structureFlags
Definition
ChiralSet.h:38
DistGeom::ChiralSet::ChiralSet
ChiralSet(unsigned int pid0, unsigned int pid1, unsigned int pid2, unsigned int pid3, unsigned int pid4, double lowerVolBound, double upperVolBound, std::uint64_t structureFlags=0)
Definition
ChiralSet.h:41
DistGeom::ChiralSet::d_idx4
unsigned int d_idx4
Definition
ChiralSet.h:35
DistGeom::ChiralSet::d_volumeLowerBound
double d_volumeLowerBound
Definition
ChiralSet.h:36
DistGeom::ChiralSet::d_idx3
unsigned int d_idx3
Definition
ChiralSet.h:34
DistGeom::ChiralSet::getUpperVolumeBound
double getUpperVolumeBound() const
Definition
ChiralSet.h:57
DistGeom::ChiralSet::d_idx1
unsigned int d_idx1
Definition
ChiralSet.h:32
DistGeom::ChiralSet::getLowerVolumeBound
double getLowerVolumeBound() const
Definition
ChiralSet.h:59
DistGeom::ChiralSet::d_volumeUpperBound
double d_volumeUpperBound
Definition
ChiralSet.h:37
DistGeom::ChiralSet::d_idx0
unsigned int d_idx0
Definition
ChiralSet.h:31
DistGeom::ChiralSet::d_idx2
unsigned int d_idx2
Definition
ChiralSet.h:33
export.h
RDKIT_DISTGEOMETRY_EXPORT
#define RDKIT_DISTGEOMETRY_EXPORT
Definition
export.h:171
DistGeom
Definition
Embedder.h:24
DistGeom::VECT_CHIRALSET
std::vector< boost::shared_ptr< ChiralSet > > VECT_CHIRALSET
Definition
Embedder.h:27
DistGeom::ChiralSetStructureFlags
ChiralSetStructureFlags
Definition
ChiralSet.h:20
DistGeom::ChiralSetStructureFlags::IN_FUSED_SMALL_RINGS
@ IN_FUSED_SMALL_RINGS
Definition
ChiralSet.h:21
DistGeom::ChiralSetPtr
boost::shared_ptr< ChiralSet > ChiralSetPtr
Definition
ChiralSet.h:62
DistGeom
ChiralSet.h
Generated on
for RDKit by
1.17.0