IMP logo
IMP Reference Guide  2.20.2
The Integrative Modeling Platform
AngleSingletonScore.h
Go to the documentation of this file.
1 /**
2  * \file IMP/atom/AngleSingletonScore.h
3  * \brief A score on the deviation of an angle from ideality.
4  *
5  * Copyright 2007-2022 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPATOM_ANGLE_SINGLETON_SCORE_H
9 #define IMPATOM_ANGLE_SINGLETON_SCORE_H
10 
11 #include <IMP/atom/atom_config.h>
12 #include "bond_decorators.h"
13 #include <IMP/SingletonScore.h>
14 #include <IMP/singleton_macros.h>
15 #include <IMP/UnaryFunction.h>
16 #include <IMP/Pointer.h>
17 
18 IMPATOM_BEGIN_NAMESPACE
19 
20 //! Score the angle based on a UnaryFunction,
21 /** This scores the angle using information stored in its Angle decorator.
22  The score is based on the difference between the stored ideal
23  angle and the actual angle and scaled by the stiffness. That is
24  stiffness * (angle-ideal_value). The difference is in radians
25  between -pi and +pi; it is the shortest distance from one angle to the
26  other.
27 
28  \see CHARMMParameters::create_angles(), Angle.
29  */
30 class IMPATOMEXPORT AngleSingletonScore : public SingletonScore {
32 
33  public:
34  //! Use f to penalize deviations in angle
36  virtual double evaluate_index(Model *m, ParticleIndex p,
37  DerivativeAccumulator *da) const override;
39  Model *m, const ParticleIndexes &pis) const override;
42  ;
43 };
44 
46 
47 IMPATOM_END_NAMESPACE
48 
49 #endif /* IMPATOM_ANGLE_SINGLETON_SCORE_H */
Score the angle based on a UnaryFunction,.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Single variable function.
Macros for various classes.
A more IMP-like version of the std::vector.
Definition: Vector.h:42
Contains decorators for a bond.
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:86
Abstract class for scoring object(s) of type ParticleIndex.
#define IMP_SINGLETON_SCORE_METHODS(Name)
A smart pointer to a ref-counted Object that is a class member.
Definition: Pointer.h:143
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const =0
Overload this method to specify the inputs.
Define SingletonScore.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
Definition: object_macros.h:44
A nullptr-initialized pointer to an IMP Object.
virtual double evaluate_index(Model *m, ParticleIndex vt, DerivativeAccumulator *da) const =0
Compute the score and the derivative if needed.
Abstract single variable functor class for score functions.
Definition: UnaryFunction.h:27
Class for adding derivatives from restraints to the model.