00001 /** 00002 * \file ClosePairsPairScore.h 00003 * \brief Apply a PairScore to close pairs. 00004 * 00005 * Copyright 2007-2010 IMP Inventors. All rights reserved. 00006 */ 00007 00008 #ifndef IMPCORE_CLOSE_PAIRS_PAIR_SCORE_H 00009 #define IMPCORE_CLOSE_PAIRS_PAIR_SCORE_H 00010 00011 #include "core_config.h" 00012 #include "XYZR.h" 00013 00014 #include <IMP/PairScore.h> 00015 #include <IMP/UnaryFunction.h> 00016 #include <IMP/Pointer.h> 00017 #include <IMP/Refiner.h> 00018 00019 IMPCORE_BEGIN_NAMESPACE 00020 00021 //! Traverse the Refiner hierarchy to find all pairs which are close 00022 /** The Refiner implicitly defines a tree rooted at each particle. 00023 This PairScore applies another PairScore to all pairs of leaves, one 00024 taken from each tree such that the leaves are closer than the threshold. 00025 \note All particles in the tree must be XYZR particles for the 00026 passed radius. In addition, the ball defined by a particle must contain 00027 the balls of all its leaves. 00028 \see ClosePairsScoreState 00029 */ 00030 class IMPCOREEXPORT ClosePairsPairScore : public PairScore 00031 { 00032 IMP::internal::OwnerPointer<Refiner> r_; 00033 IMP::internal::OwnerPointer<PairScore> f_; 00034 Float th_; 00035 FloatKey rk_; 00036 public: 00037 /** \param[in] r The Refiner to call on each particle 00038 \param[in] f The pair score to apply to the generated pairs 00039 \param[in] max_distance Only score pairs which are close than 00040 the max_distance 00041 \param[in] rk The key to use for the radius. 00042 */ 00043 ClosePairsPairScore(Refiner *r, PairScore *f, 00044 Float max_distance, 00045 FloatKey rk= XYZR::get_default_radius_key()); 00046 IMP_PAIR_SCORE(ClosePairsPairScore); 00047 }; 00048 00049 IMPCORE_END_NAMESPACE 00050 00051 #endif /* IMPCORE_CLOSE_PAIRS_PAIR_SCORE_H */