IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
MembraneRestraint.h
Go to the documentation of this file.
1/**
2 * \file IMP/pmi/MembraneRestraint.h
3 * \brief Favor configurations where target is in the membrane.
4 *
5 * Copyright 2007-2022 IMP Inventors. All rights reserved.
6 *
7 */
8
9#ifndef IMPPMI_MEMBRANE_RESTRAINT_H
10#define IMPPMI_MEMBRANE_RESTRAINT_H
11
12#include <IMP/pmi/pmi_config.h>
14#include <IMP/Particle.h>
15
16IMPPMI_BEGIN_NAMESPACE
17
18//! Membrane Restraint
19/** Favors configurations where target is in the membrane.
20 This is the C++ implementation; for most modeling the Python wrapper
21 is more useful - see IMP.pmi.restraints.basic.MembraneRestraint.
22 */
23class IMPPMIEXPORT MembraneRestraint : public isd::ISDRestraint {
24 ParticleIndex z_nuisance_;
25 double thickness_;
26 double softness_;
27 double plateau_;
28 double linear_;
29 double max_float_;
30 double log_max_float_;
31
32 ParticleIndexes particles_below_;
33 ParticleIndexes particles_above_;
34 ParticleIndexes particles_inside_;
35
36public:
37 MembraneRestraint(Model *m, ParticleIndex z_nuisance, double thickness,
38 double softness, double plateau, double linear);
39 void add_particles_below(ParticleIndexes const &particles);
40 void add_particles_above(ParticleIndexes const &particles);
41 void add_particles_inside(ParticleIndexes const &particles);
42 double get_score(double prob) const;
43 double get_probability_above(double z, double z_slope_center_upper) const;
44 double get_score_above(double z, double z_slope_center_upper) const;
45 double get_probability_below(double z, double z_slope_center_lower) const;
46 double get_score_below(double z, double z_slope_center_lower) const;
47 double get_score_inside(double z, double z_slope_center_lower,
48 double z_slope_center_upper) const;
50 override;
51 virtual IMP::ModelObjectsTemp do_get_inputs() const override;
52 IMP_OBJECT_METHODS(MembraneRestraint);
53};
54
55IMPPMI_END_NAMESPACE
56
57#endif /* IMPPMI_MEMBRANE_RESTRAINT_H */
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
Class for adding derivatives from restraints to the model.
A base class for ISD Restraints.
virtual IMP::ModelObjectsTemp do_get_inputs() const override
virtual double unprotected_evaluate(DerivativeAccumulator *) const override
Return the unweighted score for the restraint.
Index< ParticleIndexTag > ParticleIndex
Definition base_types.h:196
Vector< ParticleIndex, std::allocator< ParticleIndex > > ParticleIndexes
A list of particles, each identified by its ParticleIndex.
Definition base_types.h:199
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Definition base_types.h:122
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.