10 #ifndef IMPNPCTRANSPORT_TRANSPORTING_H
11 #define IMPNPCTRANSPORT_TRANSPORTING_H
13 #include "npctransport_config.h"
17 IMPNPCTRANSPORT_BEGIN_NAMESPACE
41 bool is_last_entry_from_top =
false);
75 get_particle()->set_value(get_is_last_entry_from_top_key(),
76 is_last_entry_from_top ? 1 : 0);
82 return (
get_particle()->get_value(get_is_last_entry_from_top_key()) != 0);
86 static IntKey get_is_last_entry_from_top_key();
91 get_particle()->set_value(get_last_tracked_z_key(), last_tracked_z);
97 return get_particle()->get_value(get_last_tracked_z_key());
101 static FloatKey get_last_tracked_z_key();
106 get_particle()->set_value(get_n_entries_bottom_key(), n);
112 return get_particle()->get_value(get_n_entries_bottom_key());
116 static IntKey get_n_entries_bottom_key();
127 return get_particle()->get_value(get_n_entries_top_key());
131 static IntKey get_n_entries_top_key();
138 IMPNPCTRANSPORT_END_NAMESPACE
The base class for decorators.
bool get_is_last_entry_from_top() const
returns whether the particle last enetered the transport moiety from its
int get_n_entries_bottom() const
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
void set_n_entries_bottom(int n)
A decorator for a particle transporting through a barrier.
void set_is_last_entry_from_top(bool is_last_entry_from_top)
sets whether the particle last enetered the transport moiety from its top
Class for storing model, its restraints, constraints, and particles.
static bool get_is_setup(Model *m, ParticleIndex pi)
Return true if the particle is an instance of an Transporting.
Helper macros for implementing Decorators.
int get_n_entries_top() const
void set_n_entries_top(int n)
Particle * get_particle() const
Returns the particle decorated by this decorator.
Interface to specialized Particle types (e.g. atoms)
#define IMP_DECORATOR_METHODS(Name, Parent)
void set_last_tracked_z(double last_tracked_z)
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
bool get_has_attribute(TypeKey attribute_key, ParticleIndex particle) const
return true if particle has attribute with the specified key
double get_last_tracked_z() const