00001 /** 00002 * \file TransformedDistancePairScore.h 00003 * \brief A score on the distance between a pair of particles 00004 * after transforming one. 00005 * 00006 * Copyright 2007-2010 IMP Inventors. All rights reserved. 00007 */ 00008 00009 #ifndef IMPCORE_TRANSFORMED_DISTANCE_PAIR_SCORE_H 00010 #define IMPCORE_TRANSFORMED_DISTANCE_PAIR_SCORE_H 00011 00012 #include "core_config.h" 00013 #include <IMP/PairScore.h> 00014 #include <IMP/UnaryFunction.h> 00015 #include <IMP/Pointer.h> 00016 00017 #include <IMP/algebra/Transformation3D.h> 00018 00019 IMPCORE_BEGIN_NAMESPACE 00020 00021 /** \brief Apply a function to the distance between two particles 00022 after transforming the first 00023 00024 Apply a transform to the second particle and then apply the unary 00025 function to the distance between the transformed particle and the 00026 second. This can be used to implement symmetry restraints. 00027 */ 00028 class IMPCOREEXPORT TransformedDistancePairScore : public PairScore 00029 { 00030 IMP::internal::OwnerPointer<UnaryFunction> f_; 00031 algebra::Transformation3D t_; 00032 algebra::Rotation3D ri_; 00033 public: 00034 TransformedDistancePairScore(UnaryFunction *f, 00035 const algebra::Transformation3D &transformation); 00036 00037 /** Set the transformation object.*/ 00038 void set_transformation(const algebra::Transformation3D &rot); 00039 IMP_SIMPLE_PAIR_SCORE(TransformedDistancePairScore); 00040 }; 00041 00042 IMPCORE_END_NAMESPACE 00043 00044 #endif /* IMPCORE_TRANSFORMED_DISTANCE_PAIR_SCORE_H */