9 #ifndef IMPATOM_MOLECULAR_DYNAMICS_H
10 #define IMPATOM_MOLECULAR_DYNAMICS_H
12 #include <IMP/atom/atom_config.h>
18 IMPATOM_BEGIN_NAMESPACE
32 static FloatKey get_velocity_key(
unsigned int i) {
81 static FloatKey get_velocity_key(
unsigned int i) {
138 virtual Float get_kinetic_energy()
const;
143 Float get_kinetic_temperature(
Float ekinetic)
const;
158 virtual void assign_velocities(
Float temperature);
183 vel = std::min(vel, velocity_cap_);
185 vel = std::max(vel, -velocity_cap_);
196 IMPATOM_END_NAMESPACE
A particle with angular velocity.
The base class for simulators.
ParticleIndex get_particle_index() const
Returns the particle index decorated by this decorator.
Key< 0 > FloatKey
The type used to identify float attributes in the Particles.
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Model * get_model() const
Returns the Model containing the particle.
virtual bool get_is_simulation_particle(ParticleIndex p) const =0
Return true if the passed particle is appropriate for the simulation.
A particle with linear (XYZ) velocity.
Base class for all optimizers.
virtual double do_step(const ParticleIndexes &sc, double dt)=0
Perform a single time step.
Class for storing model, its restraints, constraints, and particles.
virtual void setup(const ParticleIndexes &)
void set_velocity_cap(Float velocity_cap)
Set maximum velocity in A/fs.
void add_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
add particle atribute with the specied key and initial value
Simple molecular dynamics optimizer.
int degrees_of_freedom_
Number of degrees of freedom in the system.
void set_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
set the value of particle attribute with the specified key
Simple molecular dynamics optimizer.
#define IMP_DECORATOR_SETUP_0(Name)
Interface to specialized Particle types (e.g. atoms)
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
void cap_velocity_component(Float &vel)
Cap a velocity component to the maximum value.
Various important macros for implementing decorators.
Float velocity_cap_
Maximum absolute value of a single velocity component.
#define IMP_DECORATOR_METHODS(Name, Parent)
double Float
Basic floating-point value (could be float, double...)
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
bool get_has_attribute(TypeKey attribute_key, ParticleIndex particle) const
return true if particle has attribute with the specified key
Type get_attribute(TypeKey attribute_key, ParticleIndex particle)
get the value of the particle attribute with the specified key
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.