IMPATOM_BEGIN_NAMESPACE Simulator::Simulator(Model *m, std::string name, double wave_factor) : Optimizer(m, name), wave_factor_(wave_factor) { temperature_ = strip_units(IMP::internal::DEFAULT_TEMPERATURE); max_time_step_ = 2; current_time_ = 0; last_time_step_ = -1; }
/** Return the scale for diffusion under the specified force, the diffusion coefficient D and the time step t. @param D diffusion coefficient @param force force coefficient @param dtfs time step in femtoseconds @param temp temperature in Kelvin \*/ double get_diffusion_length(double D, double force, double dtfs, double temp) { unit::Divide<unit::Femtosecond, unit::Femtojoule>::type dtikt = unit::Femtosecond(dtfs) / unit::Femtojoule(IMP::internal::KB * unit::Kelvin(temp)); unit::Femtonewton nforce(get_force_in_femto_newtons(force)); // unit::Angstrom R(sampler_()); unit::Angstrom force_term(nforce * unit::SquareAngstromPerFemtosecond(D) * dtikt); return strip_units(force_term); }
double get_diffusion_length(double D, double dtfs) { unit::Angstrom d = sqrt(6.0 * unit::SquareAngstromPerFemtosecond(D) * unit::Femtosecond(dtfs)); return strip_units(d); }