9#ifndef IMPSPB_MOLECULAR_DYNAMICS_WITH_WTE_H
10#define IMPSPB_MOLECULAR_DYNAMICS_WITH_WTE_H
14#include <boost/scoped_array.hpp>
17#include <IMP/spb/spb_config.h>
35 double min_, max_, sigma_, gamma_, dx_, w0_, currentscore_;
36 boost::scoped_array<double> bias_;
38 void update_bias(
double score);
39 double get_derivative(
double score)
const;
40 double deriv_to_acceleration_;
45 double gamma,
double w0);
47 double get_bias(
double score)
const;
49 Floats get_bias_buffer()
const {
50 Floats buffer(bias_.get(), bias_.get() + 2 * nbin_);
54 int get_nbin()
const {
return nbin_; }
56 void set_w0(
double w0) { w0_ = w0; }
58 void set_bias(
const Floats &bias) {
59 IMP_USAGE_CHECK(
static_cast<int>(bias.size()) == 2 * nbin_,
"Don't match");
62 std::copy(bias.begin(), bias.end(), bias_.get());
Base class for all optimizers.
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
Base class for "simulators", such as molecular dynamics.
Macros for maintaining molecular hierarchies.
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
The base class for simulators.
FloatKey vs_[3]
Keys of the xyz velocities.
virtual void assign_velocities(Float temperature)
Assign velocities representative of the given temperature.
Float get_kinetic_temperature(Float ekinetic) const
MolecularDynamicsWithWte(Model *m, double emin, double emax, double sigma, double gamma, double w0)
void rescale_velocities(Float rescale)
Rescale velocities.
void set_velocity_cap(Float velocity_cap)
Set maximum velocity in A/fs.
virtual Float get_kinetic_energy() const
virtual bool get_is_simulation_particle(ParticleIndex p) const override
Return true if the passed particle is appropriate for the simulation.
void cap_velocity_component(Float &vel)
Cap a velocity component to the maximum value.
Float velocity_cap_
Maximum absolute value of a single velocity component.
virtual double do_step(const ParticleIndexes &sc, double dt) override
Perform a single time step.
virtual void setup(const ParticleIndexes &ps) override
int degrees_of_freedom_
Number of degrees of freedom in the system.
virtual void propagate_velocities(const ParticleIndexes &ps, double step_size)
Second part of velocity Verlet (update velocity).
virtual void propagate_coordinates(const ParticleIndexes &ps, double step_size)
First part of velocity Verlet (update coordinates and half-step velocity).
Index< ParticleIndexTag > ParticleIndex
double Float
Basic floating-point value (could be float, double...).
Vector< ParticleIndex, std::allocator< ParticleIndex > > ParticleIndexes
A list of particles, each identified by its ParticleIndex.
Key< 0 > FloatKey
The type used to identify float attributes in the Particles.
IMP::Vector< Float > Floats
Standard way to pass a bunch of Float values.