IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
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-2022 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>
14
15IMPNPCTRANSPORT_BEGIN_NAMESPACE
16
17//! Exclude particles from the given range of z coordinates
18class 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,
41 DerivativeAccumulator *da) const override;
43 const ParticleIndexes &pis) const
44 override;
47};
48
49IMPNPCTRANSPORT_END_NAMESPACE
50
51#endif /* IMPNPCTRANSPORT_EXCLUDE_Z_RANGE_SINGLETON_SCORE_H */
Define SingletonScore.
Class for adding derivatives from restraints to the model.
Class for storing model, its restraints, constraints, and particles.
Definition Model.h:111
virtual double evaluate_index(Model *m, ParticleIndex p, DerivativeAccumulator *da) const override
Compute the score and the derivative if needed.
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const override
Overload this method to specify the inputs.
ExcludeZRangeSingletonScore(double bottom, double top, double k)
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.
Macros for various classes.
#define IMP_SINGLETON_SCORE_METHODS(Name)