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