IMP  2.0.0
The Integrative Modeling Platform
BondSingletonScore.h
Go to the documentation of this file.
1 /**
2  * \file IMP/atom/BondSingletonScore.h
3  * \brief A Score on the distance between a the two particles in a bond.
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPATOM_BOND_SINGLETON_SCORE_H
9 #define IMPATOM_BOND_SINGLETON_SCORE_H
10 
11 #include <IMP/atom/atom_config.h>
12 #include "bond_decorators.h"
13 #include <IMP/SingletonScore.h>
14 #include <IMP/UnaryFunction.h>
15 #include <IMP/base/Pointer.h>
16 
17 IMPATOM_BEGIN_NAMESPACE
18 
19 //! Score the bond based on a UnaryFunction,
20 /** The score is based on the difference between the stored length
21  and the actual length and scaled by the stiffness. That is
22  stiffness * (distance-bond_length)
23  \ingroup bond
24  \see Bond
25  \see Bonded
26  */
27 class IMPATOMEXPORT BondSingletonScore : public SingletonScore
28 {
30 public:
31  //! Use f to penalize deviations in length
33  UnaryFunction *get_unary_function() const {
34  return f_;
35  }
37 };
38 
40 
41 IMPATOM_END_NAMESPACE
42 
43 #endif /* IMPATOM_BOND_SINGLETON_SCORE_H */