00001 /** 00002 * \file BoundingBox3DSingletonScore.h 00003 * \brief Score particles based on a bounding box 00004 * 00005 * Copyright 2007-8 IMP Inventors. All rights reserved. 00006 */ 00007 00008 #ifndef IMPCORE_BOUNDING_BOX_3DSINGLETON_SCORE_H 00009 #define IMPCORE_BOUNDING_BOX_3DSINGLETON_SCORE_H 00010 00011 #include "core_config.h" 00012 #include <IMP/SingletonScore.h> 00013 #include <IMP/UnaryFunction.h> 00014 #include <IMP/algebra/BoundingBoxD.h> 00015 00016 IMPCORE_BEGIN_NAMESPACE 00017 00018 //! Score particles based on how far outside a box they are. 00019 /** The radius of the particle is ignored, only the center coordinates 00020 are used. A particle that is contained within the bounding box has 00021 a score of 0. The UnaryFunction passed should return 0 when given 00022 a feature size of 0. 00023 */ 00024 class IMPCOREEXPORT BoundingBox3DSingletonScore: public SingletonScore 00025 { 00026 IMP::internal::OwnerPointer<UnaryFunction> f_; 00027 algebra::BoundingBoxD<3> bb_; 00028 public: 00029 BoundingBox3DSingletonScore(UnaryFunction *f, 00030 const algebra::BoundingBoxD<3> &bb); 00031 00032 IMP_SIMPLE_SINGLETON_SCORE(BoundingBox3DSingletonScore); 00033 }; 00034 00035 00036 IMPCORE_END_NAMESPACE 00037 00038 #endif /* IMPCORE_BOUNDING_BOX_3DSINGLETON_SCORE_H */