ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
integrators/brownian_inline.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010-2022 The ESPResSo project
3 * Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010
4 * Max-Planck-Institute for Polymer Research, Theory Group
5 *
6 * This file is part of ESPResSo.
7 *
8 * ESPResSo is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * ESPResSo is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24#include "config/config.hpp"
25
26#include "rotation.hpp"
27#include "thermostat.hpp"
29
31 Particle &p, double time_step,
32 double kT) {
33 p.pos() += bd_drag(brownian.gamma, p, time_step);
34 p.v() = bd_drag_vel(brownian.gamma, p);
35 p.pos() += bd_random_walk(brownian, p, time_step, kT);
36 p.v() += bd_random_walk_vel(brownian, p);
37}
38
39#ifdef ROTATION
41 Particle &p, double time_step,
42 double kT) {
43 if (!p.can_rotate())
44 return;
46 p.quat() = bd_drag_rot(brownian.gamma_rotation, p, time_step);
47 p.omega() = bd_drag_vel_rot(brownian.gamma_rotation, p);
48 p.quat() = bd_random_walk_rot(brownian, p, time_step, kT);
49 p.omega() += bd_random_walk_vel_rot(brownian, p);
50}
51#endif // ROTATION
This file contains the defaults for ESPResSo.
void brownian_dynamics_rotator(BrownianThermostat const &brownian, Particle &p, double time_step, double kT)
void brownian_dynamics_propagator(BrownianThermostat const &brownian, Particle &p, double time_step, double kT)
This file contains all subroutines required to process rotational motion.
void convert_torque_to_body_frame_apply_fix(Particle &p)
Definition rotation.hpp:143
Thermostat for Brownian dynamics.
GammaType gamma
Translational friction coefficient .
GammaType gamma_rotation
Rotational friction coefficient .
Struct holding all information for one particle.
Definition Particle.hpp:393
bool can_rotate() const
Definition Particle.hpp:458
auto const & quat() const
Definition Particle.hpp:475
auto const & v() const
Definition Particle.hpp:431
auto const & omega() const
Definition Particle.hpp:479
auto const & pos() const
Definition Particle.hpp:429
Utils::Vector3d bd_random_walk_vel_rot(BrownianThermostat const &brownian, Particle const &p)
Determine the angular velocities: random walk part.
Utils::Quaternion< double > bd_drag_rot(Thermostat::GammaType const &brownian_gamma_rotation, Particle &p, double dt)
Determine quaternions: viscous drag driven by conservative torques.
Utils::Vector3d bd_random_walk(BrownianThermostat const &brownian, Particle const &p, double dt, double kT)
Determine the positions: random walk part.
Utils::Vector3d bd_drag_vel(Thermostat::GammaType const &brownian_gamma, Particle const &p)
Set the terminal velocity driven by the conservative forces drag.
Utils::Vector3d bd_random_walk_vel(BrownianThermostat const &brownian, Particle const &p)
Determine the velocities: random walk part.
Utils::Quaternion< double > bd_random_walk_rot(BrownianThermostat const &brownian, Particle const &p, double dt, double kT)
Determine the quaternions: random walk part.
Utils::Vector3d bd_drag(Thermostat::GammaType const &brownian_gamma, Particle const &p, double dt)
Determine position: viscous drag driven by conservative forces.
Utils::Vector3d bd_drag_vel_rot(Thermostat::GammaType const &brownian_gamma_rotation, Particle const &p)
Set the terminal angular velocity driven by the conservative torques drag.