IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
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
18IMPDISPLAY_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*/
27class IMPDISPLAYEXPORT RestraintGeometry : public Geometry {
30 //! Use this if the restraint is not part of the model
31 RestraintGeometry(Restraint *p, Model *m);
32
33 public:
34 RestraintGeometry(Restraint *p);
35 Restraint *get_restraint() const { return r_; }
36 virtual IMP::display::Geometries get_components() const override;
37 IMP_OBJECT_METHODS(RestraintGeometry);
38};
39
40//! Geometry for a whole set of restraints
41class IMPDISPLAYEXPORT RestraintSetGeometry : public Geometry {
43
44 public:
45 RestraintSetGeometry(RestraintSet *p);
46 RestraintSet *get_restraint_set() const { return r_; }
47 virtual IMP::display::Geometries get_components() const override;
48 IMP_OBJECT_METHODS(RestraintSetGeometry);
49};
50
51/** @} */
52IMPDISPLAY_END_NAMESPACE
53
54#endif /* IMPDISPLAY_RESTRAINT_GEOMETRY_H */
A decorator for a particle with a color.
A container for Pairs.
A nullptr-initialized pointer to an IMP Object.
Class for storing model, its restraints, constraints, and particles.
Definition Model.h:111
Object used to hold a set of restraints.
A restraint is a term in an IMP ScoringFunction.
Definition Restraint.h:56
virtual IMP::display::Geometries get_components() const override
Return a set of geometry composing this one.
virtual IMP::display::Geometries get_components() const override
Return a set of geometry composing this one.
Implement geometry for the basic shapes from IMP.algebra.
macros for display classes
IMP::Vector< IMP::Pointer< Geometry > > Geometries
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
A smart pointer to a ref-counted Object that is a class member.
Definition Pointer.h:144
A smart pointer to a reference counted object.
Definition Pointer.h:88