IMP logo
IMP Reference Guide  2.20.0
The Integrative Modeling Platform
SurfaceSymmetryConstraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/SurfaceSymmetryConstraint.h
3  * \brief Constrain orientation of surfaces with respect to rigid bodies.
4  *
5  * Copyright 2007-2022 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPCORE_SURFACE_SYMMETRY_CONSTRAINT_H
10 #define IMPCORE_SURFACE_SYMMETRY_CONSTRAINT_H
11 
12 #include <IMP/core/core_config.h>
13 #include <IMP/core/Surface.h>
14 #include <IMP/core/rigid_bodies.h>
16 #include <IMP/Constraint.h>
17 #include <IMP/Particle.h>
18 #include <IMP/Object.h>
19 #include <IMP/Model.h>
20 
21 IMPCORE_BEGIN_NAMESPACE
22 
23 //! Constrain orientation of surfaces with respect to rigid bodies.
24 /** Given two surfaces and two rigid bodies assumed to be identical,
25  constrain the orientation of the first surface relative to the
26  first rigid body to be the same as the orientation of second
27  surface with respect to the second rigid body.
28 
29  \note Both RigidBody particles are assumed to be identical copies.
30  This is not enforced.
31 
32  \note Derivatives from the first surface are transformed and
33  added to the second surface.
34 */
35 class IMPCOREEXPORT SurfaceSymmetryConstraint : public IMP::Constraint {
36  ParticleIndexPair spip_;
37  ParticleIndexPair rbpip_;
38 
39  algebra::Transformation3D get_transformation() const;
40 
41  public:
42  //! Create restraint from particle pairs.
43  /** \param[in] m the Model
44  \param[in] ss pair of Surface particles, where the first surface is
45  constrained
46  \param[in] rbs pair of RigidBody particles, corresponding to
47  the surfaces in `ss`
48  */
50  const ParticleIndexPair &ss,
51  const ParticleIndexPair &rbs);
52 
53  virtual void do_update_attributes() override;
54 
55  virtual void do_update_derivatives(DerivativeAccumulator *da) override;
56 
57  virtual ModelObjectsTemp do_get_inputs() const override;
58 
59  virtual ModelObjectsTemp do_get_outputs() const override;
60 
62 };
63 
64 IMPCORE_END_NAMESPACE
65 
66 #endif /* IMPCORE_SURFACE_SYMMETRY_CONSTRAINT_H */
Simple 3D transformation class.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Storage of a model, its restraints, constraints and particles.
Constrain orientation of surfaces with respect to rigid bodies.
A more IMP-like version of the std::vector.
Definition: Vector.h:42
Implement a constraint on the Model.
Definition: Constraint.h:49
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:86
Simple surface decorator.
functionality for defining rigid bodies
A base class for constraints.
Simple 3D transformation class.
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
virtual ModelObjectsTemp do_get_outputs() const =0
A shared base class to help in debugging and things.
virtual ModelObjectsTemp do_get_inputs() const =0
Class for adding derivatives from restraints to the model.