IMP logo
IMP Reference Guide  2.16.0
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-2021 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPPMI_MEMBRANE_RESTRAINT_H
10 #define IMPPMI_MEMBRANE_RESTRAINT_H
11 #include <IMP/pmi/pmi_config.h>
12 #include <IMP/isd/ISDRestraint.h>
13 #include <IMP/Particle.h>
14 
15 IMPPMI_BEGIN_NAMESPACE
16 //! Membrane Restraint
17 /** Favors configurations where target is in the membrane
18  */
19 class IMPPMIEXPORT MembraneRestraint : public isd::ISDRestraint {
20  ParticleIndex z_nuisance_;
21  double thickness_;
22  double softness_;
23  double plateau_;
24  double linear_;
25  double max_float_;
26  double log_max_float_;
27 
28  ParticleIndexes particles_below_;
29  ParticleIndexes particles_above_;
30  ParticleIndexes particles_inside_;
31 
32 public:
33  MembraneRestraint(Model *m, ParticleIndex z_nuisance, double thickness,
34  double softness, double plateau, double linear);
35  void add_particles_below(ParticleIndexes const &particles);
36  void add_particles_above(ParticleIndexes const &particles);
37  void add_particles_inside(ParticleIndexes const &particles);
38  double get_score(double prob) const;
39  double get_probability_above(double z, double z_slope_center_upper) const;
40  double get_score_above(double z, double z_slope_center_upper) const;
41  double get_probability_below(double z, double z_slope_center_lower) const;
42  double get_score_below(double z, double z_slope_center_lower) const;
43  double get_score_inside(double z, double z_slope_center_lower,
44  double z_slope_center_upper) const;
45  virtual double unprotected_evaluate(DerivativeAccumulator *) const
49 };
50 
51 IMPPMI_END_NAMESPACE
52 
53 #endif /* IMPPMI_MEMBRANE_RESTRAINT_H */
A base class for ISD Restraints.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:73
virtual ModelObjectsTemp do_get_inputs() const
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
double get_score() const
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Class for adding derivatives from restraints to the model.