IMP  2.0.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 public:
34  Restraint *get_restraint() const {
35  return r_;
36  }
38 };
39 
40 
41 //! Geometry for a whole set of restraints
42 class IMPDISPLAYEXPORT RestraintSetGeometry: public Geometry {
43  IMP::Pointer<RestraintSet> r_;
44 public:
46  RestraintSet *get_restraint_set() const {
47  return r_;
48  }
50 };
51 
52 
53 
54 /** @} */
55 IMPDISPLAY_END_NAMESPACE
56 
57 #endif /* IMPDISPLAY_RESTRAINT_GEOMETRY_H */