IMP logo
IMP Reference Guide  2.20.0
The Integrative Modeling Platform
restraint_geometry.h
Go to the documentation of this file.
1 /**
2  * \file IMP/display/restraint_geometry.h
3  * \brief Represent an XYZR restraint with a sphere
4  *
5  * Copyright 2007-2022 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPDISPLAY_RESTRAINT_GEOMETRY_H
9 #define IMPDISPLAY_RESTRAINT_GEOMETRY_H
10 
11 #include <IMP/display/display_config.h>
12 #include "geometry_macros.h"
13 #include "Colored.h"
14 #include "declare_Geometry.h"
15 #include <IMP/Pointer.h>
16 #include <IMP/PairContainer.h>
17 
18 IMPDISPLAY_BEGIN_NAMESPACE
19 
20 //! Try to draw some stuff for a generic restraint
21 /** Mostly it just breaks the restraint down as much as possible and shows
22  the particles involved in the constituent terms if they are XYZ particles.
23 
24  Note, make sure the model is up to date before calling this, for reasons of
25  efficiency, it does not update the model.
26 */
27 class IMPDISPLAYEXPORT RestraintGeometry : public Geometry {
30  //! Use this if the restraint is not part of the model
32 
33  public:
35  Restraint *get_restraint() const { return r_; }
36  virtual IMP::display::Geometries get_components() const override;
38 };
39 
40 //! Geometry for a whole set of restraints
41 class IMPDISPLAYEXPORT RestraintSetGeometry : public Geometry {
43 
44  public:
46  RestraintSet *get_restraint_set() const { return r_; }
47  virtual IMP::display::Geometries get_components() const override;
49 };
50 
51 /** @} */
52 IMPDISPLAY_END_NAMESPACE
53 
54 #endif /* IMPDISPLAY_RESTRAINT_GEOMETRY_H */
A decorator for a particle with a color.
Geometry for a whole set of restraints.
The base class for geometry.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
macros for display classes
Implement geometry for the basic shapes from IMP.algebra.
A smart pointer to a reference counted object.
Definition: Pointer.h:87
Object used to hold a set of restraints.
Definition: RestraintSet.h:41
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:86
Try to draw some stuff for a generic restraint.
A container for Pairs.
A smart pointer to a ref-counted Object that is a class member.
Definition: Pointer.h:143
A nullptr-initialized pointer to an IMP Object.
virtual Geometries get_components() const
Return a set of geometry composing this one.
A restraint is a term in an IMP ScoringFunction.
Definition: Restraint.h:56