ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
velocity_verlet_npt_Andersen.cpp File Reference
#include "config/config.hpp"
#include "velocity_verlet_npt.hpp"
#include "BoxGeometry.hpp"
#include "Particle.hpp"
#include "ParticleRange.hpp"
#include "cell_system/CellStructure.hpp"
#include "communication.hpp"
#include "errorhandling.hpp"
#include "thermostats/npt_inline.hpp"
#include <utils/Vector.hpp>
#include <boost/mpi/collectives.hpp>
#include <cmath>
#include <functional>
+ Include dependency graph for velocity_verlet_npt_Andersen.cpp:

Go to the source code of this file.

Functions

static void velocity_verlet_npt_finalize_p_inst (NptIsoParameters &nptiso, InstantaneousPressure &npt_inst_pressure, double time_step)
 Scale and communicate instantaneous NpT pressure and propagate the conjugate momentum for volume.
 
static void velocity_verlet_npt_propagate_AVOVA_And (ParticleRangeNPT const &particles, IsotropicNptThermostat const &npt_iso, double time_step, System::System &system)
 propagete positions and the volume and add thermal fluctuation.
 
void velocity_verlet_npt_Andersen_step_1 (ParticleRangeNPT const &particles, IsotropicNptThermostat const &npt_iso, double time_step, System::System &system)
 Special propagator for NpT isotropic for Andersen method.
 
void velocity_verlet_npt_Andersen_step_2 (ParticleRangeNPT const &particles, double time_step, System::System &system)
 Final integration step of the Velocity Verlet+NpT integrator for Andersen method.
 

Function Documentation

◆ velocity_verlet_npt_Andersen_step_1()

void velocity_verlet_npt_Andersen_step_1 ( ParticleRangeNPT const particles,
IsotropicNptThermostat const npt_iso,
double  time_step,
System::System system 
)

Special propagator for NpT isotropic for Andersen method.

Propagate the velocities and positions. Integration steps before force calculation of the Velocity Verlet integrator:

\[ v(t+0.5 \Delta t) = v(t) + 0.5 \Delta t \cdot F(t)/m \]

\[ x(t+\Delta t) = x(t) + \Delta t \cdot v(t+0.5 \Delta t) \]

Propagate pressure, box_length (2 times) and positions, rescale positions and velocities and check Verlet list criterion (only NpT).

Definition at line 211 of file velocity_verlet_npt_Andersen.cpp.

References stream, velocity_verlet_npt_propagate_AVOVA_And(), and velocity_verlet_npt_propagate_vel().

Referenced by integrator_step_1().

◆ velocity_verlet_npt_Andersen_step_2()

void velocity_verlet_npt_Andersen_step_2 ( ParticleRangeNPT const particles,
double  time_step,
System::System system 
)

Final integration step of the Velocity Verlet+NpT integrator for Andersen method.

Finalize instantaneous pressure calculation:

\[ v(t+\Delta t) = v(t+0.5 \Delta t) + 0.5 \Delta t \cdot F(t+\Delta t)/m \]

Definition at line 223 of file velocity_verlet_npt_Andersen.cpp.

References stream, velocity_verlet_npt_finalize_p_inst(), and velocity_verlet_npt_propagate_vel_final().

Referenced by integrator_step_2().

◆ velocity_verlet_npt_finalize_p_inst()

static void velocity_verlet_npt_finalize_p_inst ( NptIsoParameters nptiso,
InstantaneousPressure npt_inst_pressure,
double  time_step 
)
static

Scale and communicate instantaneous NpT pressure and propagate the conjugate momentum for volume.

\( p_{\epsilon}(t+dt) = p_{\epsilon}(t) + (P_{\text{inst}} - P_{\text{ext}})*0.5*dt \)

Definition at line 47 of file velocity_verlet_npt_Andersen.cpp.

References comm_cart, NptIsoParameters::dimension, NptIsoParameters::geometry, NptIsoParameters::nptgeom_dir, NptIsoParameters::p_epsilon, NptIsoParameters::p_ext, InstantaneousPressure::p_inst, InstantaneousPressure::p_vel, InstantaneousPressure::p_vir, stream, this_node, and NptIsoParameters::volume.

Referenced by velocity_verlet_npt_Andersen_step_2(), and velocity_verlet_npt_propagate_AVOVA_And().

◆ velocity_verlet_npt_propagate_AVOVA_And()

static void velocity_verlet_npt_propagate_AVOVA_And ( ParticleRangeNPT const particles,
IsotropicNptThermostat const npt_iso,
double  time_step,
System::System system 
)
static

propagete positions and the volume and add thermal fluctuation.

A and V are the position and volume propagators for half-time step. O is the propagator corresponding to Ornstein-Uhlenbeck process representing the stochastic thermostat. The time evolution follows the sequence A-V-O-V-A in this function, with propagators applied right to left.

Definition at line 80 of file velocity_verlet_npt_Andersen.cpp.

References comm_cart, NptIsoParameters::nptgeom_dir, propagate_therm0_nptiso(), propagate_thermV_nptiso(), Cells::RESORT_LOCAL, runtimeErrorMsg, Utils::sqr(), stream, this_node, and velocity_verlet_npt_finalize_p_inst().

Referenced by velocity_verlet_npt_Andersen_step_1().