RDKit
Open-source cheminformatics and machine learning.
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 #ifndef __RD_CHIRAL_SET_H__
11 #define __RD_CHIRAL_SET_H__
12 
13 #include <RDGeneral/Invariant.h>
14 #include <boost/smart_ptr.hpp>
15 #include <vector>
16 
17 namespace DistGeom {
18 
19 /*! \brief Class used to store a quartet of points and chiral volume bounds on
20  *them
21  *
22  */
23 class ChiralSet {
24  public:
25  unsigned int d_idx0; // the centroid
26  unsigned int d_idx1;
27  unsigned int d_idx2;
28  unsigned int d_idx3;
29  unsigned int d_idx4;
32 
33  ChiralSet(unsigned int pid0, unsigned int pid1, unsigned int pid2,
34  unsigned int pid3, unsigned int pid4, double lowerVolBound,
35  double upperVolBound)
36  : d_idx0(pid0),
37  d_idx1(pid1),
38  d_idx2(pid2),
39  d_idx3(pid3),
40  d_idx4(pid4),
41  d_volumeLowerBound(lowerVolBound),
42  d_volumeUpperBound(upperVolBound) {
43  CHECK_INVARIANT(lowerVolBound <= upperVolBound, "Inconsistent bounds\n");
44  d_volumeLowerBound = lowerVolBound;
45  d_volumeUpperBound = upperVolBound;
46  }
47 
48  inline double getUpperVolumeBound() const { return d_volumeUpperBound; }
49 
50  inline double getLowerVolumeBound() const { return d_volumeLowerBound; }
51 };
52 
53 typedef boost::shared_ptr<ChiralSet> ChiralSetPtr;
54 typedef std::vector<ChiralSetPtr> VECT_CHIRALSET;
55 }
56 
57 #endif
#define CHECK_INVARIANT(expr, mess)
Definition: Invariant.h:99
unsigned int d_idx4
Definition: ChiralSet.h:29
double d_volumeUpperBound
Definition: ChiralSet.h:31
std::vector< ChiralSetPtr > VECT_CHIRALSET
Definition: ChiralSet.h:54
double getUpperVolumeBound() const
Definition: ChiralSet.h:48
unsigned int d_idx2
Definition: ChiralSet.h:27
double getLowerVolumeBound() const
Definition: ChiralSet.h:50
boost::shared_ptr< ChiralSet > ChiralSetPtr
Definition: ChiralSet.h:53
double d_volumeLowerBound
Definition: ChiralSet.h:30
unsigned int d_idx0
Definition: ChiralSet.h:25
unsigned int d_idx3
Definition: ChiralSet.h:28
Class used to store a quartet of points and chiral volume bounds on them.
Definition: ChiralSet.h:23
unsigned int d_idx1
Definition: ChiralSet.h:26
ChiralSet(unsigned int pid0, unsigned int pid1, unsigned int pid2, unsigned int pid3, unsigned int pid4, double lowerVolBound, double upperVolBound)
Definition: ChiralSet.h:33