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