00001 /** 00002 * \file atom/BondSingletonScore.h 00003 * \brief A Score on the distance between a the two particles in a bond. 00004 * 00005 * Copyright 2007-2010 IMP Inventors. All rights reserved. 00006 */ 00007 00008 #ifndef IMPATOM_BOND_SINGLETON_SCORE_H 00009 #define IMPATOM_BOND_SINGLETON_SCORE_H 00010 00011 #include "atom_config.h" 00012 #include "bond_decorators.h" 00013 #include <IMP/SingletonScore.h> 00014 #include <IMP/UnaryFunction.h> 00015 #include <IMP/Pointer.h> 00016 00017 IMPATOM_BEGIN_NAMESPACE 00018 00019 //! Score the bond based on a UnaryFunction, 00020 /** The score is based on the difference between the stored length 00021 and the actual length and scaled by the stiffness. That is 00022 stiffness * (distance-bond_length) 00023 \ingroup bond 00024 \see Bond 00025 \see Bonded 00026 */ 00027 class IMPATOMEXPORT BondSingletonScore : public SingletonScore 00028 { 00029 IMP::internal::OwnerPointer<UnaryFunction> f_; 00030 public: 00031 //! Use f to penalize deviations in length 00032 BondSingletonScore(UnaryFunction *f); 00033 IMP_SINGLETON_SCORE(BondSingletonScore); 00034 }; 00035 00036 IMPATOM_END_NAMESPACE 00037 00038 #endif /* IMPATOM_BOND_SINGLETON_SCORE_H */