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
20/*! \brief Class used to store a quartet of points and chiral volume bounds on
21 *them
22 *
23 */
25 public:
26 unsigned int d_idx0; // the centroid
27 unsigned int d_idx1;
28 unsigned int d_idx2;
29 unsigned int d_idx3;
30 unsigned int d_idx4;
33
34 ChiralSet(unsigned int pid0, unsigned int pid1, unsigned int pid2,
35 unsigned int pid3, unsigned int pid4, double lowerVolBound,
36 double upperVolBound)
37 : d_idx0(pid0),
38 d_idx1(pid1),
39 d_idx2(pid2),
40 d_idx3(pid3),
41 d_idx4(pid4),
42 d_volumeLowerBound(lowerVolBound),
43 d_volumeUpperBound(upperVolBound) {
44 CHECK_INVARIANT(lowerVolBound <= upperVolBound, "Inconsistent bounds\n");
45 d_volumeLowerBound = lowerVolBound;
46 d_volumeUpperBound = upperVolBound;
47 }
48
49 inline double getUpperVolumeBound() const { return d_volumeUpperBound; }
50
51 inline double getLowerVolumeBound() const { return d_volumeLowerBound; }
52};
53
54typedef boost::shared_ptr<ChiralSet> ChiralSetPtr;
55typedef std::vector<ChiralSetPtr> VECT_CHIRALSET;
56} // namespace DistGeom
57
58#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:24
unsigned int d_idx4
Definition ChiralSet.h:30
double d_volumeLowerBound
Definition ChiralSet.h:31
unsigned int d_idx3
Definition ChiralSet.h:29
ChiralSet(unsigned int pid0, unsigned int pid1, unsigned int pid2, unsigned int pid3, unsigned int pid4, double lowerVolBound, double upperVolBound)
Definition ChiralSet.h:34
double getUpperVolumeBound() const
Definition ChiralSet.h:49
unsigned int d_idx1
Definition ChiralSet.h:27
double getLowerVolumeBound() const
Definition ChiralSet.h:51
double d_volumeUpperBound
Definition ChiralSet.h:32
unsigned int d_idx0
Definition ChiralSet.h:26
unsigned int d_idx2
Definition ChiralSet.h:28
#define RDKIT_DISTGEOMETRY_EXPORT
Definition export.h:129
std::vector< ChiralSetPtr > VECT_CHIRALSET
Definition ChiralSet.h:55
boost::shared_ptr< ChiralSet > ChiralSetPtr
Definition ChiralSet.h:54