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 #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 /*! \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 
54 typedef boost::shared_ptr<ChiralSet> ChiralSetPtr;
55 typedef std::vector<ChiralSetPtr> VECT_CHIRALSET;
56 }
57 
58 #endif
double getLowerVolumeBound() const
Definition: ChiralSet.h:51
#define RDKIT_DISTGEOMETRY_EXPORT
Definition: export.h:164
#define CHECK_INVARIANT(expr, mess)
Definition: Invariant.h:100
unsigned int d_idx4
Definition: ChiralSet.h:30
double d_volumeUpperBound
Definition: ChiralSet.h:32
std::vector< ChiralSetPtr > VECT_CHIRALSET
Definition: ChiralSet.h:55
unsigned int d_idx2
Definition: ChiralSet.h:28
double getUpperVolumeBound() const
Definition: ChiralSet.h:49
boost::shared_ptr< ChiralSet > ChiralSetPtr
Definition: ChiralSet.h:54
double d_volumeLowerBound
Definition: ChiralSet.h:31
unsigned int d_idx0
Definition: ChiralSet.h:26
unsigned int d_idx3
Definition: ChiralSet.h:29
Class used to store a quartet of points and chiral volume bounds on them.
Definition: ChiralSet.h:24
unsigned int d_idx1
Definition: ChiralSet.h:27
ChiralSet(unsigned int pid0, unsigned int pid1, unsigned int pid2, unsigned int pid3, unsigned int pid4, double lowerVolBound, double upperVolBound)
Definition: ChiralSet.h:34