RDCode: ChiralSet.h Source File

# ChiralSet.h

Go to the documentation of this file.

    00001 //
    00002 //  Copyright (C) 2004-2008 Greg Landrum and Rational Discovery LLC
    00003 //
    00004 //   @@ All Rights Reserved  @@
    00005 //
    00006 #ifndef __RD_CHIRAL_SET_H__
    00007 #define __RD_CHIRAL_SET_H__
    00008
    00009 #include <RDGeneral/Invariant.h>
    00010 #include <boost/smart_ptr.hpp>
    00011 #include <vector>
    00012
    00013 namespace DistGeom {
    00014
    00015   /*! \brief Class used to store a quartet of points and chiral volume bounds on them
    00016    *
    00017    */
    00018   class ChiralSet {
    00019   public:
    00020
    00021     unsigned int d_idx1;
    00022     unsigned int d_idx2;
    00023     unsigned int d_idx3;
    00024     unsigned int d_idx4;
    00025     double d_volumeLowerBound;
    00026     double d_volumeUpperBound;
    00027
    00028     ChiralSet(unsigned int pid1, unsigned int pid2,
    00029               unsigned int pid3, unsigned int pid4,
    00030               double lowerVolBound, double upperVolBound) :
    00031       d_idx1(pid1), d_idx2(pid2), d_idx3(pid3), d_idx4(pid4),
    00032       d_volumeLowerBound(lowerVolBound),d_volumeUpperBound(upperVolBound) {
    00033       CHECK_INVARIANT(lowerVolBound <= upperVolBound, "Inconsistent bounds\n");
    00034       d_volumeLowerBound = lowerVolBound;
    00035       d_volumeUpperBound = upperVolBound;
    00036     }
    00037
    00038     inline double getUpperVolumeBound() const {
    00039       return d_volumeUpperBound;
    00040     }
    00041
    00042     inline double getLowerVolumeBound() const {
    00043       return d_volumeLowerBound;
    00044     }
    00045   };
    00046
    00047   typedef boost::shared_ptr<ChiralSet> ChiralSetPtr;
    00048   typedef std::vector<ChiralSetPtr> VECT_CHIRALSET;
    00049
    00050 }
    00051
    00052 #endif