IMP logo
IMP Reference Guide  2.6.2
The Integrative Modeling Platform
CoverRefined.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/CoverRefined.h
3  * \brief Cover a bond with a sphere.
4  *
5  * Copyright 2007-2016 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPCORE_COVER_REFINED_H
9 #define IMPCORE_COVER_REFINED_H
10 
11 #include <IMP/core/core_config.h>
12 
13 #include "XYZR.h"
14 #include <IMP/Refiner.h>
15 #include <IMP/Pointer.h>
16 #include <IMP/Decorator.h>
17 #include <IMP/SingletonModifier.h>
19 
20 IMPCORE_BEGIN_NAMESPACE
21 
22 // for swig
23 class XYZR;
24 
25 /** \brief This class sets the position and radius of each particle to
26  enclose the refined.
27 
28  \see DerivativesFromRefined
29  \see DerivativesToRefined
30  \see CentroidOfRefined
31  \see atom::CoverBond
32 
33  Set the coordinates and radius of the passed particle to cover the particles
34  listed by the particle refiner.
35  An example showing a how to use such a score state to maintain a cover
36  of the atoms of a protein by a sphere per residue.
37  \include cover_particles.py
38 
39  \note The particle passed must be an XYZR.
40  \uses{class CoverRefined, CGAL}
41  */
42 class IMPCOREEXPORT CoverRefined : public SingletonModifier {
44  Float slack_;
45 
46  public:
47  //! Create with the given refiner and radius key
48  /** Slack is the amount added to the radius.*/
49  CoverRefined(Refiner *ref, Float slack = 0);
50 
51  //! Set how much extra to add to the radius.
52  void set_slack(Float slack) { slack_ = slack; }
53 
54  virtual void apply_index(Model *m, ParticleIndex a) const
57  Model *m, const ParticleIndexes &pis) const IMP_OVERRIDE;
59  Model *m, const ParticleIndexes &pis) const IMP_OVERRIDE;
62 };
63 
64 //! A particle which covers a set of other particles.
65 /** A decorator which sets up a particle to be a cover of a
66  set of other particles. That is, the sphere defined by
67  its XYZR decorator will always contain the passed
68  particles.
69 
70  \usesconstraint
71 */
73 
74 IMPCORE_END_NAMESPACE
75 
76 #endif /* IMPCORE_COVER_REFINED_H */
The base class for decorators.
A base class for modifiers of ParticlesTemp.
This class sets the position and radius of each particle to enclose the refined.
Definition: CoverRefined.h:42
A Modifier on ParticlesTemp.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
void set_slack(Float slack)
Set how much extra to add to the radius.
Definition: CoverRefined.h:52
virtual ModelObjectsTemp do_get_outputs(Model *m, const ParticleIndexes &pis) const =0
A particle which covers a set of other particles.
Definition: CoverRefined.h:72
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:72
#define IMP_SINGLETON_MODIFIER_METHODS(Name)
Refine a particle into a list of particles.
A Modifier on ParticlesTemp.
A smart pointer to a ref-counted Object that is a class member.
Definition: Pointer.h:146
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const =0
#define IMP_SUMMARIZE_DECORATOR_DECL(Name, Parent, Members, SetupDoc)
Create a decorator that computes some sort of summary info on a set.
A nullptr-initialized pointer to an IMP Object.
virtual void apply_index(Model *m, ParticleIndex v) const =0
double Float
Basic floating-point value (could be float, double...)
Definition: types.h:20
Abstract class to implement hierarchical methods.
Definition: Refiner.h:34
Decorator for a sphere-like particle.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
A decorator for a particle with x,y,z coordinates and a radius.
Definition: XYZR.h:27