ESPResSo 3.2.0-167-g2c9ead1-git
Extensible Simulation Package for Soft Matter Research
Defines | Functions | Variables
integrate.c File Reference

Molecular dynamics integrator. More...

#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "utils.h"
#include "integrate.h"
#include "reaction.h"
#include "interaction_data.h"
#include "particle_data.h"
#include "communication.h"
#include "grid.h"
#include "cells.h"
#include "verlet.h"
#include "rotation.h"
#include "ghosts.h"
#include "pressure.h"
#include "p3m.h"
#include "maggs.h"
#include "thermostat.h"
#include "initialize.h"
#include "forces.h"
#include "nsquare.h"
#include "domain_decomposition.h"
#include "layered.h"
#include "nemd.h"
#include "rattle.h"
#include "errorhandling.h"
#include "lattice.h"
#include "lb.h"
#include "virtual_sites.h"
#include "adresso.h"
#include "statistics_correlation.h"
#include "ghmc.h"
Include dependency graph for integrate.c:

Go to the source code of this file.

Defines

#define REQ_INT_VERLET   400
 Tag for communication in verlet fix: propagate_positions()

Functions

void local_invalidate_system ()
 local routine of tclcommand_invalidate_system
void integrate_ensemble_init ()
 Initialize the used thermodynamic Ensemble (NVT or NPT)
void integrate_vv (int n_steps)
 integrate with velocity verlet integrator.
void rescale_velocities (double scale)
 function that rescales all velocities on one node according to a new time step.
void propagate_press_box_pos_and_rescale_npt ()
Privat Functions
void rescale_forces ()
 Rescale all particle forces with

\[ 0.5 \Delta t^2 \]

.

void propagate_vel ()
 Propagate the velocities.
void propagate_pos ()
 Propagate the positions.
void propagate_vel_pos ()
 Propagate the velocities and positions.
void rescale_forces_propagate_vel ()
 Rescale all particle forces with

\[ 0.5 \Delta t^2 \]

and propagate the velocities.

void force_and_velocity_check (Particle *p)
 Integrator stability check (see compile flag ADDITIONAL_CHECKS).
void force_and_velocity_display ()
 Integrator stability check (see compile flag ADDITIONAL_CHECKS).
void finalize_p_inst_npt ()

Variables

int integ_switch = INTEG_METHOD_NVT
 Switch determining which Integrator to use.
int n_verlet_updates = 0
 incremented if a Verlet update is done, aka particle resorting.
double time_step = -1.0
 Time step for the integration.
double time_step_half = -1.0
double time_step_squared = -1.0
double time_step_squared_half = -1.0
double sim_time = 0.0
 Actual simulation time (only on MASTER NODE).
double skin = -1.0
 Verlet list skin.
double skin2
int resort_particles = 1
 If non-zero, the particle data will be resorted before the next integration.
int recalc_forces = 1
 If non-zero, the forces will be recalculated before the next integration.
double verlet_reuse = 0.0
 Average number of integration steps the verlet list has been re used.
double db_max_force = 0.0
double db_max_vel = 0.0
int db_maxf_id = 0
int db_maxv_id = 0

Detailed Description

Molecular dynamics integrator.

For more information about the integrator see integrate.h.

Definition in file integrate.c.


Define Documentation

#define REQ_INT_VERLET   400

Tag for communication in verlet fix: propagate_positions()

Definition at line 68 of file integrate.c.


Function Documentation

void finalize_p_inst_npt ( )
void force_and_velocity_check ( Particle p)
void force_and_velocity_display ( )

Integrator stability check (see compile flag ADDITIONAL_CHECKS).

Definition at line 840 of file integrate.c.

References db_max_force, db_max_vel, db_maxf_id, db_maxv_id, ParticleForce::f, Particle::f, local_particles, Particle::m, skin2, this_node, and ParticleMomentum::v.

Referenced by propagate_vel(), and propagate_vel_pos().

void integrate_ensemble_init ( )
void integrate_vv ( int  n_steps)

integrate with velocity verlet integrator.

Parameters:
n_stepsnumber of steps to integrate.

Correct those particle positions that participate in a rigid/constrained bond

Definition at line 161 of file integrate.c.

References calc_and_apply_mol_constraints(), cell_structure, CELL_STRUCTURE_DOMDEC, cells_update_ghosts(), check_runtime_errors(), CellStructure::collect_ghost_force_comm, comm_cart, convert_initial_torques(), convert_torques_propagate_omega(), correct_pos_shake(), correct_vel_shake(), coulomb, COULOMB_MAGGS, dd, distribute_mol_force(), force_calc(), ghmc_close(), ghmc_init(), ghmc_mc(), ghmc_momentum_update(), ghmc_nmd, ghost_communicator(), handle_collisions(), i, init_forces_ghosts(), INTEG_METHOD_NPT_ISO, integ_switch, INTEG_TRACE, integrate_reaction(), nptiso_struct::invalidate_p_vel, lattice_boltzmann_update(), lattice_boltzmann_update_gpu(), LATTICE_LB, LATTICE_LB_GPU, lattice_switch, maggs_propagate_B_field(), Coulomb_parameters::method, MPI_Bcast(), MPI_DOUBLE, n_verlet_updates, nemd_method, NEMD_METHOD_OFF, nptiso, on_integration_start(), nptiso_struct::p_diff, nptiso_struct::p_inst, nptiso_struct::p_inst_av, prepare_collision_queue(), propagate_pos(), propagate_vel(), propagate_vel_pos(), recalc_forces, rescale_forces(), rescale_forces_propagate_vel(), save_old_pos(), sim_time, skin, skin2, SQR(), thermo_cool_down(), THERMO_GHMC, thermo_heat_up(), thermo_switch, this_node, time_step, transfer_momentum, transfer_momentum_gpu, CellStructure::type, CellStructure::update_ghost_pos_comm, update_mol_vel(), update_mol_vel_pos(), DomainDecomposition::use_vList, verlet_reuse, and nptiso_struct::volume.

Referenced by mpi_integrate(), and mpi_integrate_slave().

void local_invalidate_system ( )

local routine of tclcommand_invalidate_system

Definition at line 129 of file integrate.c.

References invalidate_obs(), and resort_particles.

Referenced by mpi_bcast_event_slave().

void propagate_pos ( )
void propagate_press_box_pos_and_rescale_npt ( )
void propagate_vel ( )
void propagate_vel_pos ( )
void rescale_forces ( )
void rescale_forces_propagate_vel ( )
void rescale_velocities ( double  scale)

function that rescales all velocities on one node according to a new time step.

Definition at line 435 of file integrate.c.

References CellPList::cell, i, local_cells, Particle::m, CellPList::n, ParticleList::n, ParticleList::part, and ParticleMomentum::v.

Referenced by mpi_set_time_step(), and mpi_set_time_step_slave().


Variable Documentation

double db_max_force = 0.0
double db_max_vel = 0.0
int db_maxf_id = 0
int db_maxv_id = 0
int integ_switch = INTEG_METHOD_NVT

incremented if a Verlet update is done, aka particle resorting.

Definition at line 74 of file integrate.c.

Referenced by cells_resort_particles(), and integrate_vv().

int recalc_forces = 1
double sim_time = 0.0

Actual simulation time (only on MASTER NODE).

Definition at line 81 of file integrate.c.

Referenced by autoupdate_correlations(), integrate_vv(), maggs_check_intersect_1D(), tclcallback_time(), and tclcommand_correlation_parse_autoupdate().

double skin = -1.0
double skin2
double time_step = -1.0

Time step for the integration.

Definition at line 76 of file integrate.c.

Referenced by add_kinetic_energy(), calc_energy_kinetic_mol(), calc_kinetic(), calc_local_temp(), double_correlation_init(), energy_calc(), finalize_p_inst_npt(), friction_thermo_langevin(), integrate_reaction(), integrate_vv(), inter_dpd_init(), inter_dpd_set_params(), lattice_boltzmann_calc_shanchen_gpu(), lattice_boltzmann_update(), lattice_boltzmann_update_gpu(), lb_reinit_parameters(), lb_reinit_parameters_gpu(), lb_viscous_coupling(), local_stress_tensor_calc(), maggs_calc_forces(), maggs_sanity_checks(), maxwell_velocitiesC(), mpi_set_time_step(), mpi_set_time_step_slave(), nemd_init(), observable_blocked_com_force(), observable_blocked_com_velocity(), observable_com_force(), observable_com_velocity(), observable_currents(), observable_flux_density_profile(), observable_particle_currents(), observable_particle_forces(), observable_particle_velocities(), observable_radial_flux_density_profile(), on_integration_start(), partial_momentum_update(), predict_momentum_particles(), pressure_calc(), propagate_omega_quat_particle(), propagate_press_box_pos_and_rescale_npt(), rescale_forces(), rescale_forces_propagate_vel(), rigid_bond_set_params(), simple_momentum_update(), tclcommand_analyze_current(), tclcommand_analyze_parse_and_print_energy_kinetic(), tclcommand_analyze_print_MSD(), tclcommand_analyze_print_vel_distr(), tclcommand_inter_parse_rigid_bond(), tclcommand_lbfluid(), tclcommand_nemd_parse_and_print_profile(), tclcommand_nemd_parse_and_print_viscosity(), tclcommand_part_parse_f(), tclcommand_part_parse_v(), tclcommand_part_print_f(), tclcommand_part_print_v(), tclcommand_reaction(), tclcommand_system_CMS_velocity(), tclprint_to_result_rigid_bond(), thermo_init_dpd(), thermo_init_langevin(), thermo_init_npt_isotropic(), and update_mol_vel_particle().

double time_step_half = -1.0
double time_step_squared = -1.0
double time_step_squared_half = -1.0
double verlet_reuse = 0.0

Average number of integration steps the verlet list has been re used.

Definition at line 88 of file integrate.c.

Referenced by integrate_vv().