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 STOKESIAN_DYNAMICS
25
26#include "rotation.hpp"
28#include "thermostat.hpp"
29
31 StokesianThermostat const &stokesian,
32 double time_step, double kT) {
33 propagate_vel_pos_sd(particles, stokesian, time_step, kT);
34
35 for (auto &p : particles) {
36 // translate
37 p.pos() += p.v() * time_step;
38 // rotate
39 auto const norm = p.omega().norm();
40 if (norm != 0.) {
41 auto const omega_unit = (1. / norm) * p.omega();
42 local_rotate_particle(p, omega_unit, norm * time_step);
43 }
44 }
45}
46
47#endif // STOKESIAN_DYNAMICS
This file contains the defaults for ESPResSo.
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:133
void propagate_vel_pos_sd(ParticleRangeStokesian const &particles, StokesianThermostat const &stokesian, double const time_step, double const kT)
Takes the forces and torques on all particles and computes their velocities.
See for the Stokesian dynamics method used here.
void stokesian_dynamics_step_1(ParticleRangeStokesian const &particles, StokesianThermostat const &stokesian, double time_step, double kT)
Thermostat for Stokesian dynamics.