IMP logo
IMP Reference Guide  2.10.1
The Integrative Modeling Platform
CAAngleRestraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/atom/CAAngleRestraint.h
3  * \brief Angle restraint between three residues in CA-only representation.
4  *
5  * Copyright 2007-2018 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPATOM_CA_ANGLE_RESTRAINT_H
10 #define IMPATOM_CA_ANGLE_RESTRAINT_H
11 
12 #include "atom_config.h"
13 
14 #include <IMP/Restraint.h>
15 #include <IMP/Particle.h>
16 #include <IMP/generic.h>
17 #include <map>
18 
19 IMPATOM_BEGIN_NAMESPACE
20 
21 //! Angle restraint between three residues in CA-only representation
22 /** This restraint is designed to be used in conjunction with a CA-only
23  representation; each restraint is applied to three CA atoms that
24  correspond to three residues that are adjacent in sequence.
25  A simple statistical potential is applied to score the angle.
26  Currently, no splining or other smoothing is done and no derivatives
27  are calculated.
28  */
29 class IMPATOMEXPORT CAAngleRestraint : public Restraint
30 {
31 public:
32  //! Create the angle restraint.
33  /** The value of the restraint is simply score[n] where phi0[n]
34  is the closest angle in phi0 to that between p1-p2-p3.
35  \param[in] m Model
36  \param[in] p1 First CA atom (in previous residue)
37  \param[in] p2 Second CA atom (in current residue)
38  \param[in] p3 Third CA atom (in next residue)
39  \param[in] phi0 List of angles for which scores are available
40  \param[in] score List of scores that correspond to phi0
41  */
43  ParticleIndexAdaptor p3, Floats phi0, Floats score);
44 
45  virtual double
46  unprotected_evaluate(IMP::DerivativeAccumulator *accum)
47  const IMP_OVERRIDE;
50 
51 private:
52  ParticleIndex p_[3];
53  Floats phi0_;
54  Floats score_;
55 
56  double get_distance(double v0, double v1) const;
57  int get_closest(std::vector<double> const& vec, double value) const;
58 
59 };
60 
61 IMPATOM_END_NAMESPACE
62 
63 #endif /* IMPATOM_CA_ANGLE_RESTRAINT_H */
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:72
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
Angle restraint between three residues in CA-only representation.
Abstract base class for all restraints.
double get_distance(const Line3D &s, const Vector3D &p)
Get closest distance between a line and a point.
virtual ModelObjectsTemp do_get_inputs() const =0
#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.
A restraint is a term in an IMP ScoringFunction.
Definition: Restraint.h:54
Various important functionality for implementing decorators.