IMP logo
IMP Reference Guide  develop.d97d4ead1f,2024/11/21
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-2022 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 <IMP/atom/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
47  const override;
48  virtual IMP::ModelObjectsTemp do_get_inputs() const 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
Take Decorator, Particle or ParticleIndex.
virtual double unprotected_evaluate(DerivativeAccumulator *da) const
Return the unweighted score for the restraint.
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:86
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
Class for adding derivatives from restraints to the model.
A restraint is a term in an IMP ScoringFunction.
Definition: Restraint.h:56
Compile-time generic restraint and constraint support.