00001 /** 00002 * \file SphereDistancePairScore.h 00003 * \brief A score on the distance between the surfaces of two spheres. 00004 * 00005 * Copyright 2007-2010 IMP Inventors. All rights reserved. 00006 */ 00007 00008 #ifndef IMPCORE_SPHERE_DISTANCE_PAIR_SCORE_H 00009 #define IMPCORE_SPHERE_DISTANCE_PAIR_SCORE_H 00010 00011 #include "core_config.h" 00012 #include <IMP/PairScore.h> 00013 #include <IMP/Pointer.h> 00014 #include <IMP/UnaryFunction.h> 00015 00016 IMPCORE_BEGIN_NAMESPACE 00017 00018 //! A score on the distance between the surfaces of two spheres. 00019 /** \see XYZR 00020 \see DistancePairScore 00021 \see NormalizedSphereDistancePairScore 00022 */ 00023 class IMPCOREEXPORT SphereDistancePairScore : public PairScore 00024 { 00025 IMP::internal::OwnerPointer<UnaryFunction> f_; 00026 FloatKey radius_; 00027 public: 00028 SphereDistancePairScore(UnaryFunction *f, 00029 FloatKey radius=FloatKey("radius")); 00030 IMP_SIMPLE_PAIR_SCORE(SphereDistancePairScore); 00031 }; 00032 00033 00034 //! A score on the normalized distance between the surfaces of two spheres 00035 /** The distance between the surfaces of the two spheres is divided by the 00036 smaller radius to normalize it. 00037 \see SphereDistancePairScore 00038 \see XYZR 00039 \see DistancePairScore 00040 */ 00041 class IMPCOREEXPORT NormalizedSphereDistancePairScore : public PairScore 00042 { 00043 IMP::internal::OwnerPointer<UnaryFunction> f_; 00044 FloatKey radius_; 00045 public: 00046 NormalizedSphereDistancePairScore(UnaryFunction *f, 00047 FloatKey radius=FloatKey("radius")); 00048 IMP_SIMPLE_PAIR_SCORE(NormalizedSphereDistancePairScore); 00049 }; 00050 00051 00052 //! A score on a weighted distance between the surfaces of two spheres 00053 /** The distance between the surfaces of the two spheres is multiplied by 00054 the sum of a specific attribute 00055 \see SphereDistancePairScore 00056 \see XYZR 00057 \see DistancePairScore 00058 */ 00059 class IMPCOREEXPORT WeightedSphereDistancePairScore : public PairScore 00060 { 00061 IMP::internal::OwnerPointer<UnaryFunction> f_; 00062 FloatKey radius_; 00063 FloatKey weight_; 00064 public: 00065 WeightedSphereDistancePairScore(UnaryFunction *f, 00066 FloatKey weight, 00067 FloatKey radius=FloatKey("radius")); 00068 IMP_SIMPLE_PAIR_SCORE(WeightedSphereDistancePairScore); 00069 }; 00070 00071 00072 IMPCORE_END_NAMESPACE 00073 00074 #endif /* IMPCORE_SPHERE_DISTANCE_PAIR_SCORE_H */