IMP  2.1.1
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-2013 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/base/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  kernel::Restraint *get_restraint() const { return r_; }
36  virtual IMP::display::Geometries get_components() const IMP_OVERRIDE;
38 };
39 
40 //! Geometry for a whole set of restraints
41 class IMPDISPLAYEXPORT RestraintSetGeometry : public Geometry {
43 
44  public:
46  kernel::RestraintSet *get_restraint_set() const { return r_; }
47  virtual IMP::display::Geometries get_components() const IMP_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.
A nullptr-initialized pointer to an IMP Object.
The base class for geometry.
A smart pointer to a ref-counted Object that is a class memeber.
Definition: base/Pointer.h:147
Object used to hold a set of restraints.
macros for display classes
A smart pointer to a reference counted object.
Definition: base/Pointer.h:87
Implement geometry for the basic shapes from IMP.algebra.
Try to draw some stuff for a generic restraint.
Import IMP/kernel/PairContainer.h in the namespace.
A restraint is a term in an IMP ScoringFunction.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
virtual Geometries get_components() const
Return a set of geometry composing this one.
Class for storing model, its restraints, constraints, and particles.