9 #ifndef IMPATOM_DIFFUSION_H
10 #define IMPATOM_DIFFUSION_H
12 #include <IMP/atom/atom_config.h>
16 #include <IMP/internal/constants.h>
21 IMPATOM_BEGIN_NAMESPACE
39 if(!XYZ::get_is_setup(m,pi))
47 if(XYZ::get_is_setup(m,pi))
49 XYZ(m,pi).set_coordinates(v);
55 do_setup_particle(m, pi, D);
99 XYZ::get_is_setup(m, p);
103 get_particle()->set_value(get_diffusion_coefficient_key(), d);
112 static FloatKey get_diffusion_coefficient_key();
115 IMPATOMEXPORT
double get_diffusion_coefficient_from_cm2_per_second(
double din);
162 (get_rotational_diffusion_coefficient_key(),
169 return get_particle()->set_value(get_rotational_diffusion_coefficient_key(),
176 Diffusion::get_is_setup(m, p);
180 static FloatKey get_rotational_diffusion_coefficient_key();
183 IMP_DECORATORS(RigidBodyDiffusion, RigidBodyDiffusions, Diffusions);
185 IMPATOM_END_NAMESPACE
ParticleIndex get_particle_index() const
Returns the particle index decorated by this decorator.
static bool get_is_setup(Model *m, ParticleIndex p)
Return true if the particle is an instance of an RigidBodyDiffusion.
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
Model * get_model() const
Returns the Model containing the particle.
static XYZ setup_particle(Model *m, ParticleIndex pi)
double get_diffusion_coefficient() const
get diffusion coefficient in
Class for storing model, its restraints, constraints, and particles.
void set_rotational_diffusion_coefficient(double d) const
sets the rotational diffusion coefficient in
void set_diffusion_coefficient(double d)
set diffusion coefficient in
void add_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
add particle atribute with the specied key and initial value
#define IMP_DECORATOR_SETUP_2(Name, FirstArgumentType, first_argument_name,SecondArgumentType, second_argument_name)
A decorator for a particle with x,y,z coordinates.
#define IMP_DECORATOR_SETUP_0(Name)
static bool get_is_setup(Model *m, ParticleIndex p)
Return true if the particle is an instance of Diffusion.
Particle * get_particle() const
Returns the particle decorated by this decorator.
#define IMP_DECORATOR_METHODS(Name, Parent)
double get_rotational_diffusion_coefficient() const
returns the rotational diffusion coefficient in
double Float
Basic floating-point value (could be float, double...)
#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
A decorator for a diffusing particle with a diffusion coefficient.
Type get_attribute(TypeKey attribute_key, ParticleIndex particle)
get the value of the particle attribute with the specified key
Decorator for a sphere-like particle.