00001 /** 00002 * \file atom/AngleSingletonScore.h 00003 * \brief A score on the deviation of an angle from ideality. 00004 * 00005 * Copyright 2007-2010 IMP Inventors. All rights reserved. 00006 */ 00007 00008 #ifndef IMPATOM_ANGLE_SINGLETON_SCORE_H 00009 #define IMPATOM_ANGLE_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 angle based on a UnaryFunction, 00020 /** This scores the angle using information stored in its Angle decorator. 00021 The score is based on the difference between the stored ideal 00022 angle and the actual angle and scaled by the stiffness. That is 00023 stiffness * (angle-ideal_value). The difference is in radians 00024 between -pi and +pi; it is the shortest distance from one angle to the 00025 other. 00026 00027 \see CHARMMParameters::generate_angles(), Angle. 00028 */ 00029 class IMPATOMEXPORT AngleSingletonScore : public SingletonScore 00030 { 00031 IMP::internal::OwnerPointer<UnaryFunction> f_; 00032 public: 00033 //! Use f to penalize deviations in angle 00034 AngleSingletonScore(UnaryFunction *f); 00035 IMP_SINGLETON_SCORE(AngleSingletonScore); 00036 }; 00037 00038 IMPATOM_END_NAMESPACE 00039 00040 #endif /* IMPATOM_ANGLE_SINGLETON_SCORE_H */