IMP logo
IMP Reference Guide  2.22.0
The Integrative Modeling Platform
SoftCylinderPairScore.h
Go to the documentation of this file.
1 /**
2  * \file IMP/misc/SoftCylinderPairScore.h
3  * \brief A Score on the distance between a pair of particles.
4  *
5  * Copyright 2007-2022 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPMISC_SOFT_CYLINDER_PAIR_SCORE_H
9 #define IMPMISC_SOFT_CYLINDER_PAIR_SCORE_H
10 
11 #include <IMP/misc/misc_config.h>
12 #include <IMP/PairScore.h>
13 #include <IMP/UnaryFunction.h>
14 #include <IMP/Pointer.h>
15 #include <IMP/pair_macros.h>
16 
17 IMPMISC_BEGIN_NAMESPACE
18 
19 //! Apply a function to the distance between the cylinders defined by two bonds.
20 /** The two endpoints of the bond must have the same radius and that is used
21  for the radius of the cylinder connecting them.
22 */
23 class IMPMISCEXPORT SoftCylinderPairScore : public PairScore {
24  double k_;
25 
26  public:
27  SoftCylinderPairScore(double k);
28  virtual double evaluate_index(Model *m,
29  const ParticleIndexPair &p,
30  DerivativeAccumulator *da) const override;
32  Model *m, const ParticleIndexes &pis) const override;
35  ;
36 };
37 
38 IMPMISC_END_NAMESPACE
39 
40 #endif /* IMPMISC_SOFT_CYLINDER_PAIR_SCORE_H */
Abstract class for scoring object(s) of type ParticleIndexPair.
Definition: PairScore.h:44
Macros for various classes.
#define IMP_PAIR_SCORE_METHODS(Name)
Definition: pair_macros.h:25
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Single variable function.
A more IMP-like version of the std::vector.
Definition: Vector.h:50
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:86
Apply a function to the distance between the cylinders defined by two bonds.
Define PairScore.
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const =0
Overload this method to specify the inputs.
A nullptr-initialized pointer to an IMP Object.
virtual double evaluate_index(Model *m, const ParticleIndexPair &vt, DerivativeAccumulator *da) const =0
Compute the score and the derivative if needed.
Class for adding derivatives from restraints to the model.