![]() |
ESPResSo 3.2.0-167-g2c9ead1-git
Extensible Simulation Package for Soft Matter Research
|
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"
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
| |
| 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
| |
| 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 |
Molecular dynamics integrator.
For more information about the integrator see integrate.h.
Definition in file integrate.c.
| #define REQ_INT_VERLET 400 |
Tag for communication in verlet fix: propagate_positions()
Definition at line 68 of file integrate.c.
| void finalize_p_inst_npt | ( | ) |
Definition at line 540 of file integrate.c.
References comm_cart, nptiso_struct::dimension, friction_thermV_nptiso(), nptiso_struct::geometry, i, INTEG_METHOD_NPT_ISO, integ_switch, MPI_DOUBLE, MPI_Reduce(), MPI_SUM, nptiso_struct::nptgeom_dir, nptiso, nptiso_struct::p_diff, nptiso_struct::p_ext, nptiso_struct::p_inst, nptiso_struct::p_vel, nptiso_struct::p_vir, SQR(), this_node, time_step, and nptiso_struct::volume.
Referenced by propagate_press_box_pos_and_rescale_npt(), and rescale_forces_propagate_vel().
| void force_and_velocity_check | ( | Particle * | p | ) |
Integrator stability check (see compile flag ADDITIONAL_CHECKS).
Definition at line 810 of file integrate.c.
References db_max_force, db_max_vel, db_maxf_id, db_maxv_id, ParticleForce::f, Particle::f, i, ParticleProperties::identity, Particle::l, local_box_l, Particle::m, ParticlePosition::p, Particle::p, ParticleLocal::p_old, Particle::r, skin2, SQR(), this_node, and ParticleMomentum::v.
Referenced by propagate_press_box_pos_and_rescale_npt(), propagate_vel(), and propagate_vel_pos().
| 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 | ( | ) |
Initialize the used thermodynamic Ensemble (NVT or NPT)
Definition at line 136 of file integrate.c.
References box_l, nptiso_struct::dimension, errexit(), INTEG_METHOD_NPT_ISO, integ_switch, nptiso_struct::inv_piston, nptiso_struct::non_const_dim, nptiso, nptiso_struct::p_inst, nptiso_struct::p_inst_av, nptiso_struct::p_vel, nptiso_struct::p_vir, nptiso_struct::piston, recalc_forces, this_node, and nptiso_struct::volume.
Referenced by on_integration_start().
| void integrate_vv | ( | int | n_steps | ) |
integrate with velocity verlet integrator.
| n_steps | number 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 | ( | ) |
Propagate the positions.
Integration step 2 of the Velocity Verletintegrator:
Definition at line 712 of file integrate.c.
References announce_resort_particles(), CellPList::cell, COORD_FIXED, distance2(), i, ifParticleIsVirtual(), INTEG_METHOD_NPT_ISO, integ_switch, INTEG_TRACE, Particle::l, local_cells, Particle::m, CellPList::n, ParticleList::n, nemd_add_velocity(), ParticlePosition::p, Particle::p, ParticleLocal::p_old, ParticleList::part, propagate_press_box_pos_and_rescale_npt(), Particle::r, resort_particles, skin2, this_node, and ParticleMomentum::v.
Referenced by integrate_vv().
| void propagate_press_box_pos_and_rescale_npt | ( | ) |
Definition at line 564 of file integrate.c.
References box_l, CellPList::cell, CELL_FLAG_FAST, cells_on_geometry_change(), check_id, comm_cart, COORD_FIXED, nptiso_struct::cubic_box, nptiso_struct::dimension, ERROR_SPRINTF, ES_DOUBLE_SPACE, finalize_p_inst_npt(), force_and_velocity_check(), nptiso_struct::geometry, grid_changed_box_l(), i, ifParticleIsVirtual(), INTEG_METHOD_NPT_ISO, integ_switch, nptiso_struct::inv_piston, Particle::l, local_cells, Particle::m, MPI_Bcast(), MPI_DOUBLE, CellPList::n, ParticleList::n, nptiso_struct::non_const_dim, nptiso_struct::nptgeom_dir, nptiso, ONEPART_TRACE, ParticlePosition::p, Particle::p, nptiso_struct::p_diff, ParticleLocal::p_old, ParticleList::part, nptiso_struct::piston, Particle::r, recalc_maximal_cutoff(), resort_particles, runtime_error(), SQR(), this_node, time_step, ParticleMomentum::v, and nptiso_struct::volume.
Referenced by propagate_pos().
| void propagate_vel | ( | ) |
Propagate the velocities.
Integration step 1 of the Velocity Verlet integrator:
Definition at line 651 of file integrate.c.
References CellPList::cell, check_id, COORD_FIXED, ParticleForce::f, Particle::f, force_and_velocity_check(), force_and_velocity_display(), friction_therm0_nptiso(), nptiso_struct::geometry, i, ifParticleIsVirtual(), INTEG_METHOD_NPT_ISO, integ_switch, INTEG_TRACE, local_cells, Particle::m, CellPList::n, ParticleList::n, nemd_change_momentum(), nemd_get_velocity(), nemd_store_velocity_profile(), nptiso_struct::nptgeom_dir, nptiso, ONEPART_TRACE, nptiso_struct::p_vel, ParticleList::part, PMASS, propagate_omega_quat_particle(), SQR(), this_node, and ParticleMomentum::v.
Referenced by integrate_vv().
| void propagate_vel_pos | ( | ) |
Propagate the velocities and positions.
Integration step 1 and 2 of the Velocity Verlet integrator:
Definition at line 754 of file integrate.c.
References announce_resort_particles(), CellPList::cell, check_id, COORD_FIXED, db_max_force, db_max_vel, db_maxf_id, db_maxv_id, distance2(), ParticleForce::f, Particle::f, force_and_velocity_check(), force_and_velocity_display(), i, ifParticleIsVirtual(), INTEG_TRACE, Particle::l, local_cells, Particle::m, CellPList::n, ParticleList::n, ONEPART_TRACE, ParticlePosition::p, Particle::p, ParticleLocal::p_old, ParticleList::part, propagate_omega_quat_particle(), Particle::r, resort_particles, skin2, this_node, and ParticleMomentum::v.
Referenced by integrate_vv().
| void rescale_forces | ( | ) |
Rescale all particle forces with
.
Definition at line 457 of file integrate.c.
References CellPList::cell, check_id, check_particle_force(), ParticleForce::f, Particle::f, i, INTEG_TRACE, local_cells, Particle::m, CellPList::n, ParticleList::n, ONEPART_TRACE, ParticleList::part, PMASS, this_node, time_step, and ParticleMomentum::v.
Referenced by integrate_vv().
| void rescale_forces_propagate_vel | ( | ) |
Rescale all particle forces with
and propagate the velocities.
Integration step 4 of the Velocity Verletintegrator:
Definition at line 483 of file integrate.c.
References CellPList::cell, check_id, check_particle_force(), COORD_FIXED, ParticleForce::f, Particle::f, finalize_p_inst_npt(), friction_therm0_nptiso(), nptiso_struct::geometry, i, ifParticleIsVirtual(), INTEG_METHOD_NPT_ISO, integ_switch, INTEG_TRACE, local_cells, Particle::m, CellPList::n, ParticleList::n, nptiso_struct::nptgeom_dir, nptiso, ONEPART_TRACE, nptiso_struct::p_vel, ParticleList::part, PMASS, SQR(), this_node, time_step, and ParticleMomentum::v.
Referenced by integrate_vv().
| 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().
| double db_max_force = 0.0 |
Definition at line 91 of file integrate.c.
Referenced by force_and_velocity_check(), force_and_velocity_display(), and propagate_vel_pos().
| double db_max_vel = 0.0 |
Definition at line 91 of file integrate.c.
Referenced by force_and_velocity_check(), force_and_velocity_display(), and propagate_vel_pos().
| int db_maxf_id = 0 |
Definition at line 92 of file integrate.c.
Referenced by force_and_velocity_check(), force_and_velocity_display(), and propagate_vel_pos().
| int db_maxv_id = 0 |
Definition at line 92 of file integrate.c.
Referenced by force_and_velocity_check(), force_and_velocity_display(), and propagate_vel_pos().
| int integ_switch = INTEG_METHOD_NVT |
Switch determining which Integrator to use.
Definition at line 72 of file integrate.c.
Referenced by add_bonded_force(), add_non_bonded_pair_force(), calc_long_range_forces(), finalize_p_inst_npt(), iccp3m_sanity_check(), init_forces(), init_forces_iccp3m(), integrate_ensemble_init(), integrate_vv(), observable_compute_stress_tensor(), on_integration_start(), on_parameter_change(), propagate_pos(), propagate_press_box_pos_and_rescale_npt(), propagate_vel(), rescale_forces_propagate_vel(), tclcommand_analyze_parse_and_print_pressure(), tclcommand_analyze_parse_and_print_stress_tensor(), tclcommand_integrate_print_status(), tclcommand_integrate_set_npt_isotropic(), and tclcommand_integrate_set_nvt().
| int n_verlet_updates = 0 |
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 |
If non-zero, the forces will be recalculated before the next integration.
Definition at line 86 of file integrate.c.
Referenced by collision_detection_set_params(), integrate_ensemble_init(), integrate_vv(), on_constraint_change(), on_coulomb_change(), on_integration_start(), on_lbboundary_change(), on_resort_particles(), and on_short_range_ia_change().
| int resort_particles = 1 |
If non-zero, the particle data will be resorted before the next integration.
Definition at line 85 of file integrate.c.
Referenced by announce_resort_particles(), cells_re_init(), cells_resort_particles(), cells_update_ghosts(), check_resort_particles(), local_invalidate_system(), on_integration_start(), on_observable_calc(), on_particle_change(), propagate_pos(), propagate_press_box_pos_and_rescale_npt(), and propagate_vel_pos().
| 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 |
Verlet list skin.
Definition at line 82 of file integrate.c.
Referenced by build_verlet_lists(), build_verlet_lists_and_calc_verlet_ia(), build_verlet_lists_and_calc_verlet_ia_iccp3m(), calc_link_cell_iccp3m(), cells_on_geometry_change(), check_particles(), check_resort_particles(), dp3m_adaptive_tune(), dp3m_assign_dipole(), dp3m_calc_local_ca_mesh(), dp3m_mc_time(), dp3m_sanity_checks(), incubewithskin(), integrate_vv(), lb_sanity_checks(), local_stress_tensor_calc(), maggs_sanity_checks(), MMM2D_setup_constants(), on_integration_start(), p3m_adaptive_tune(), p3m_assign_charge(), p3m_calc_local_ca_mesh(), p3m_mc_time(), p3m_sanity_checks(), and tclcallback_skin().
| double skin2 |
Definition at line 83 of file integrate.c.
Referenced by check_particles(), check_resort_particles(), force_and_velocity_check(), force_and_velocity_display(), integrate_vv(), propagate_pos(), and propagate_vel_pos().
| 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 |
Definition at line 77 of file integrate.c.
Referenced by convert_torques_propagate_omega(), mpi_set_time_step(), mpi_set_time_step_slave(), and propagate_omega_quat_particle().
| double time_step_squared = -1.0 |
Definition at line 78 of file integrate.c.
Referenced by mpi_set_time_step(), mpi_set_time_step_slave(), and propagate_omega_quat_particle().
| double time_step_squared_half = -1.0 |
Definition at line 79 of file integrate.c.
Referenced by mpi_set_time_step(), mpi_set_time_step_slave(), and propagate_omega_quat_particle().
| 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().
1.7.5.1