IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
EnvelopePenetrationRestraint.h
Go to the documentation of this file.
1/**
2 * \file IMP/em/EnvelopePenetrationRestraint.h
3 * \brief Score how well a protein is inside its density
4 *
5 * Copyright 2007-2022 IMP Inventors. All rights reserved.
6 *
7 */
8
9#ifndef IMPEM_ENVELOPE_PENETRATION_RESTRAINT_H
10#define IMPEM_ENVELOPE_PENETRATION_RESTRAINT_H
11
12#include <IMP/em/em_config.h>
13#include "DensityMap.h"
14#include <IMP/atom/Hierarchy.h>
15#include <IMP/atom/Atom.h>
16#include <IMP/atom/Mass.h>
17#include <IMP/core/XYZR.h>
18#include <IMP/Model.h>
19#include <IMP/Restraint.h>
20#include <IMP/Refiner.h>
21
22IMPEM_BEGIN_NAMESPACE
23
24//! Calculate score based on fit to EM map
25/** \ingroup exp_restraint
26
27 */
28class IMPEMEXPORT EnvelopePenetrationRestraint : public Restraint {
29 public:
30 //! Constructor
31 /**
32 \param[in] ps The particles participating in the fitting score
33 \param[in] em_map The density map used in the fitting score
34 \param[in] threshold
35
36 \note Particles that are rigid-bodies are interpolated and
37 not resampled.
38 This significantly reduces the running time but is less accurate.
39 If the user prefers to get more accurate results, provide
40 its members as input particles and not the rigid body.
41 \todo we currently assume rigid bodies are also molecular hierarchies.
42 */
44 Float threshold);
45
47 const override;
48 virtual IMP::ModelObjectsTemp do_get_inputs() const override;
50
51#ifndef SWIG
52 IMP_LIST(private, Particle, particle, Particle *, Particles);
53#endif
54 private:
55 IMP::PointerMember<DensityMap> target_dens_map_;
56 algebra::BoundingBoxD<3> target_bounding_box_;
57 // reference to the IMP environment
58 IMP::core::XYZs xyz_;
59 Particles ps_;
60 Float threshold_;
61};
62
63IMPEM_END_NAMESPACE
64
65#endif /* IMPEM_ENVELOPE_PENETRATION_RESTRAINT_H */
Simple atom decorator.
Class for handling density maps.
A decorator for particles with mass.
Storage of a model, its restraints, constraints and particles.
Refine a particle into a list of particles.
Abstract base class for all restraints.
Decorator for a sphere-like particle.
Decorator for helping deal with a hierarchy of molecules.
Class for adding derivatives from restraints to the model.
Class to handle individual particles of a Model object.
Definition Particle.h:45
Restraint(Model *m, std::string name)
Create a restraint and register it with the model.
An axis-aligned bounding box.
Class for handling density maps.
Definition DensityMap.h:95
virtual IMP::ModelObjectsTemp do_get_inputs() const override
virtual double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
EnvelopePenetrationRestraint(Particles ps, DensityMap *em_map, Float threshold)
Constructor.
#define IMP_LIST(protection, Ucname, lcname, Data, PluralData)
A macro to provide a uniform interface for storing lists of objects.
Vector< Pointer< Particle > > Particles
A list of reference-counted Particle objects.
Definition base_types.h:138
double Float
Basic floating-point value (could be float, double...).
Definition types.h:19
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Definition base_types.h:122
#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