00001 /** 00002 * \file RigidBodyDistancePairScore.h 00003 * \brief Act on the distance between two rigid bodies 00004 * 00005 * Copyright 2007-8 IMP Inventors. All rights reserved. 00006 */ 00007 00008 #ifndef IMPCORE_RIGID_BODY_DISTANCE_PAIR_SCORE_H 00009 #define IMPCORE_RIGID_BODY_DISTANCE_PAIR_SCORE_H 00010 00011 #include "core_config.h" 00012 #include <IMP/PairContainer.h> 00013 #include <IMP/SingletonContainer.h> 00014 #include <IMP/PairScore.h> 00015 #include <IMP/Refiner.h> 00016 00017 IMPCORE_BEGIN_NAMESPACE 00018 00019 //! Accelerated computation of the distance between two rigid bodies 00020 /** Rigid bodies are made of a collection of particles whose internal 00021 relationships don't change. The distance between two rigid bodies 00022 can be defined as the minimal distance over all bipartite pairs 00023 with one particle taken from each rigid body. This computation can 00024 be accelerated (similarly to the RigidClosePairsFinder). The passed 00025 PairScore is then applied to this minimal pair to give the returned 00026 score. 00027 */ 00028 class IMPCOREEXPORT RigidBodyDistancePairScore: public PairScore 00029 { 00030 IMP::internal::OwnerPointer<Refiner> r0_, r1_; 00031 IMP::internal::OwnerPointer<PairScore> ps_; 00032 ObjectKey k0_, k1_; 00033 public: 00034 /** Use the passed refiner for both particles. */ 00035 RigidBodyDistancePairScore(PairScore *ps, Refiner *r); 00036 /** Use r0 for the first passed particle and r1 for the second. */ 00037 RigidBodyDistancePairScore(PairScore *ps, Refiner *r0, Refiner *r1); 00038 00039 IMP_PAIR_SCORE(RigidBodyDistancePairScore); 00040 }; 00041 00042 00043 IMPCORE_END_NAMESPACE 00044 00045 #endif /* IMPCORE_RIGID_BODY_DISTANCE_PAIR_SCORE_H */