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 */ 24 class RDKIT_DISTGEOMETRY_EXPORT ChiralSet { 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; 31 double d_volumeLowerBound; 32 double d_volumeUpperBound; 33 ChiralSet(unsigned int pid0,unsigned int pid1,unsigned int pid2,unsigned int pid3,unsigned int pid4,double lowerVolBound,double upperVolBound)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 getUpperVolumeBound()49 inline double getUpperVolumeBound() const { return d_volumeUpperBound; } 50 getLowerVolumeBound()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 } // namespace DistGeom 57 58 #endif 59