IMP logo
IMP Reference Guide  2.6.0
The Integrative Modeling Platform
ExamplePairScore.h
Go to the documentation of this file.
1 /**
2  * \file IMP/example/ExamplePairScore.h
3  * \brief A Score on the distance between a pair of particles.
4  *
5  * Copyright 2007-2016 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPEXAMPLE_EXAMPLE_PAIR_SCORE_H
9 #define IMPEXAMPLE_EXAMPLE_PAIR_SCORE_H
10 
11 #include <IMP/example/example_config.h>
12 #include <IMP/core/XYZ.h>
13 #include <IMP/PairScore.h>
14 #include <IMP/pair_macros.h>
15 #include <IMP/UnaryFunction.h>
16 #include <IMP/Pointer.h>
17 
18 IMPEXAMPLE_BEGIN_NAMESPACE
19 
20 //! Apply a harmonic to the distance between two particles.
21 /** The source code is as follows:
22  \include ExamplePairScore.h
23  \include ExamplePairScore.cpp
24 */
25 class IMPEXAMPLEEXPORT ExamplePairScore : public PairScore {
26  double x0_, k_;
27 
28  public:
29  ExamplePairScore(double x0, double k);
30  virtual double evaluate_index(Model *m,
31  const ParticleIndexPair &p,
34  Model *m, const ParticleIndexes &pis) const IMP_OVERRIDE;
37  ;
38 };
39 
41 
42 IMPEXAMPLE_END_NAMESPACE
43 
44 #endif /* IMPEXAMPLE_EXAMPLE_PAIR_SCORE_H */
Abstract class for scoring object(s) of type ParticleIndexPair.
Definition: PairScore.h:37
Macros for various classes.
#define IMP_PAIR_SCORE_METHODS(Name)
Definition: pair_macros.h:25
A class to store an fixed array of same-typed values.
Definition: Array.h:33
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Single variable function.
Simple XYZ decorator.
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:72
Define PairScore.
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const =0
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
Definition: object_macros.h:42
A nullptr-initialized pointer to an IMP Object.
Apply a harmonic to the distance between two particles.
virtual double evaluate_index(Model *m, const ParticleIndexPair &vt, DerivativeAccumulator *da) const =0
Compute the score and the derivative if needed.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Class for adding derivatives from restraints to the model.