IMP logo
IMP Reference Guide  2.13.0
The Integrative Modeling Platform
ExcludeZRangeSingletonScore.h
Go to the documentation of this file.
1 /**
2  * \file ExcludeZRangeSingletonScore.h
3  * \brief XXXXXXXXXXXXXX
4  *
5  * Copyright 2007-2020 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPNPCTRANSPORT_EXCLUDE_Z_RANGE_SINGLETON_SCORE_H
9 #define IMPNPCTRANSPORT_EXCLUDE_Z_RANGE_SINGLETON_SCORE_H
10 
11 #include "npctransport_config.h"
12 #include <IMP/SingletonScore.h>
13 #include <IMP/singleton_macros.h>
14 
15 IMPNPCTRANSPORT_BEGIN_NAMESPACE
16 
17 //! Exclude particles from the given range of z coordinates
18 class IMPNPCTRANSPORTEXPORT ExcludeZRangeSingletonScore
19  : public SingletonScore {
20  private:
21  double bottom_; // bottom z coordinated for exclusion
22  double top_; // top z coordinated for exclusion
23  double k_; // the force constant for repulsion out of the z range
24  public:
25  /**
26  Exclude particles from the range of z coordinates [bottom_..top_]
27  with repulsive force constant k
28  */
29  ExcludeZRangeSingletonScore(double bottom, double top, double k);
30 
31  /** returns the lowest slab z coordinate */
32  double get_bottom_z() const { return bottom_; }
33 
34  /** returns the highest slab z coordinate */
35  double get_top_z() const { return top_; }
36 
37  /** returns the force constant for repulsion out of the z-range */
38  double get_k() const { return k_; }
39 
40  virtual double evaluate_index(Model *m, ParticleIndex p,
43  const ParticleIndexes &pis) const
47 };
48 
49 IMPNPCTRANSPORT_END_NAMESPACE
50 
51 #endif /* IMPNPCTRANSPORT_EXCLUDE_Z_RANGE_SINGLETON_SCORE_H */
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Macros for various classes.
A more IMP-like version of the std::vector.
Definition: Vector.h:39
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:72
Exclude particles from the given range of z coordinates.
Abstract class for scoring object(s) of type ParticleIndex.
#define IMP_SINGLETON_SCORE_METHODS(Name)
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const =0
Overload this method to specify the inputs.
Define SingletonScore.
virtual double evaluate_index(Model *m, ParticleIndex vt, DerivativeAccumulator *da) const =0
Compute the score and the derivative if needed.
#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.