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>
19 IMPSPB_BEGIN_NAMESPACE
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());
66 virtual Float get_kinetic_energy()
const;
71 Float get_kinetic_temperature(
Float ekinetic)
const;
86 virtual void assign_velocities(
Float temperature);
89 void rescale_velocities(
Float rescale);
112 vel = std::min(vel, velocity_cap_);
114 vel = std::max(vel, -velocity_cap_);
int degrees_of_freedom_
Number of degrees of freedom in the system.
The base class for simulators.
Simple molecular dynamics optimizer.
virtual bool get_is_simulation_particle(ParticleIndex p) const =0
Return true if the passed particle is appropriate for the simulation.
void set_velocity_cap(Float velocity_cap)
Set maximum velocity in A/fs.
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 cap_velocity_component(Float &vel)
Cap a velocity component to the maximum value.
Simple molecular dynamics optimizer.
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
Various important macros for implementing decorators.
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.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Float velocity_cap_
Maximum absolute value of a single velocity component.