RDKit
Open-source cheminformatics and machine learning.
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
18namespace DistGeom {
19
20enum class ChiralSetStructureFlags : std::uint64_t {
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 */
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;
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
62typedef boost::shared_ptr<ChiralSet> ChiralSetPtr;
63typedef std::vector<ChiralSetPtr> VECT_CHIRALSET;
64} // namespace DistGeom
65
66#endif
#define CHECK_INVARIANT(expr, mess)
Definition Invariant.h:101
Class used to store a quartet of points and chiral volume bounds on them.
Definition ChiralSet.h:29
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
unsigned int d_idx4
Definition ChiralSet.h:35
double d_volumeLowerBound
Definition ChiralSet.h:36
unsigned int d_idx3
Definition ChiralSet.h:34
double getUpperVolumeBound() const
Definition ChiralSet.h:57
unsigned int d_idx1
Definition ChiralSet.h:32
double getLowerVolumeBound() const
Definition ChiralSet.h:59
double d_volumeUpperBound
Definition ChiralSet.h:37
unsigned int d_idx0
Definition ChiralSet.h:31
unsigned int d_idx2
Definition ChiralSet.h:33
#define RDKIT_DISTGEOMETRY_EXPORT
Definition export.h:129
std::vector< ChiralSetPtr > VECT_CHIRALSET
Definition ChiralSet.h:63
boost::shared_ptr< ChiralSet > ChiralSetPtr
Definition ChiralSet.h:62
ChiralSetStructureFlags
Definition ChiralSet.h:20