ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
stokesian_dynamics_inline.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010-2022 The ESPResSo project
3 *
4 * This file is part of ESPResSo.
5 *
6 * ESPResSo is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * ESPResSo is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#pragma once
21
22#include <config/config.hpp>
23
24#ifdef ESPRESSO_STOKESIAN_DYNAMICS
25
26#include "rotation.hpp"
28#include "thermostat.hpp"
29
31 StokesianDynamics const &integrator,
32 StokesianThermostat const &stokesian,
33 double time_step, double kT) {
34 integrator.propagate_vel_pos(particles, stokesian, time_step, kT);
35
36 for (auto &p : particles) {
37 // translate
38 p.pos() += p.v() * time_step;
39 // rotate
40 auto const norm = p.omega().norm();
41 if (norm != 0.) {
42 auto const omega_unit = (1. / norm) * p.omega();
43 local_rotate_particle(p, omega_unit, norm * time_step);
44 }
45 }
46}
47
48#endif // ESPRESSO_STOKESIAN_DYNAMICS
This file contains all subroutines required to process rotational motion.
void local_rotate_particle(Particle &p, const Utils::Vector3d &axis_space_frame, const double phi)
Rotate the particle p around the NORMALIZED axis aSpaceFrame by amount phi.
Definition rotation.hpp:134
See for the Stokesian dynamics method used here.
void stokesian_dynamics_step_1(ParticleRangeStokesian const &particles, StokesianDynamics const &integrator, StokesianThermostat const &stokesian, double time_step, double kT)
void propagate_vel_pos(ParticleRangeStokesian const &particles, StokesianThermostat const &stokesian, double time_step, double kT) const
Take the forces and torques on all particles and compute velocities.
Thermostat for Stokesian dynamics.