![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Main system class. More...
#include <System.hpp>
Public Member Functions | |
| System (Private) | |
| auto | get_time_step () const |
| Get time_step. | |
| void | set_time_step (double value) |
| Set time_step. | |
| auto | get_sim_time () const |
| Get sim_time. | |
| void | set_sim_time (double value) |
| Set sim_time. | |
| auto | get_force_cap () const |
| Get force_cap. | |
| void | set_force_cap (double value) |
| Set force_cap. | |
| auto | get_min_global_cut () const |
| Get min_global_cut. | |
| void | set_min_global_cut (double value) |
| Set min_global_cut. | |
| void | set_box_l (Utils::Vector3d const &box_l) |
| Change the box dimensions. | |
| void | tune_verlet_skin (double min_skin, double max_skin, double tol, int int_steps, bool adjust_max_skin) |
| Tune the Verlet skin. | |
| void | set_cell_structure_topology (CellStructureType topology) |
| Change cell structure topology. | |
| void | rebuild_cell_structure () |
| Rebuild cell lists. | |
| void | rebuild_aosoa () |
| double | maximal_cutoff () const |
| Calculate the maximal cutoff of all interactions. | |
| double | get_interaction_range () const |
| Get the interaction range. | |
| unsigned | get_global_ghost_flags () const |
| Returns the ghost flags required for running pair kernels for the global state, e.g. | |
| unsigned | get_force_reduce_ghost_flags () const |
| Returns the ghost flags for the force-reduce step. | |
| bool | long_range_interactions_sanity_checks () const |
| Check electrostatic and magnetostatic methods are properly initialized. | |
| Observable_stat const & | calculate_energy () |
| Calculate the total energy. | |
| Observable_stat const & | calculate_pressure () |
| Calculate the pressure from a virial expansion. | |
| void | synchronize_npt_state () |
| Synchronize NpT state such as instantaneous and average pressure. | |
| void | npt_ensemble_init (bool recalc_forces) |
| Reinitialize the NpT state. | |
| void | npt_add_virial_contribution (double energy) |
| bool | has_npt_enabled () const |
| Utils::Vector3d * | get_npt_virial () const |
| void | calculate_forces () |
| Calculate all forces. | |
| void | calculate_long_range_fields () |
| Calculate dipole fields. | |
| bool | has_collision_detection_enabled () const |
| double | particle_short_range_energy_contribution (int pid) |
| Compute the short-range energy of a particle. | |
| std::optional< double > | particle_bond_energy (int pid, int bond_id, std::vector< int > partners) |
| Compute the energy of a given bond which has to exist on the given particle. | |
| int | integrate (int n_steps, int reuse_forces) |
| Integrate equations of motion. | |
| int | integrate_with_signal_handler (int n_steps, int reuse_forces, bool update_accumulators) |
| void | lb_couple_particles () |
| Calculate particle-lattice interactions. | |
| void | update_dependent_particles () |
| Update particles with properties depending on other particles, namely virtual sites and ICC charges. | |
| void | update_used_propagations () |
| Update the global propagation bitmask. | |
| void | check_kT (double value) const |
| Veto temperature change. | |
Hook procedures | |
These procedures are called if several significant changes to the system happen which may make a reinitialization of subsystems necessary. | |
| void | on_boxl_change (bool skip_method_adaption=false) |
| Called when the box length has changed. | |
| void | on_node_grid_change () |
| void | on_periodicity_change () |
| void | on_cell_structure_change () |
| void | on_thermostat_param_change () |
| void | on_temperature_change () |
| void | on_verlet_skin_change () |
| void | on_timestep_change () |
| void | on_integration_start () |
| void | on_short_range_ia_change () |
| void | on_non_bonded_ia_change () |
| void | on_coulomb_change () |
| void | on_dipoles_change () |
| void | on_constraint_change () |
| Called every time a constraint is changed. | |
| void | on_lb_boundary_conditions_change () |
| Called when the LB boundary conditions change (geometry, slip velocity, or both). | |
| void | on_particle_local_change () |
| Called every time a particle local property changes. | |
| void | on_particle_change () |
| Called every time a particle property changes. | |
| void | on_particle_charge_change () |
| Called every time a particle charge changes. | |
| void | on_observable_calc () |
| called before calculating observables, i.e. | |
| void | on_lees_edwards_change () |
| void | veto_boxl_change (bool skip_particle_checks=false) const |
Static Public Member Functions | |
| static std::shared_ptr< System > | create () |
Protected Member Functions | |
| void | update_local_geo () |
| void | update_icc_particles () |
| bool | has_icc_enabled () const |
| void | integrate_magnetodynamics () |
| Run magnetodynamics update for local virtual particles. | |
Protected Attributes | |
| bool | reinit_thermo |
| Whether the thermostat has to be reinitialized before integration. | |
| double | time_step |
| Molecular dynamics integrator time step. | |
| double | sim_time |
| Molecular dynamics integrator simulation time. | |
| double | force_cap |
| Molecular dynamics integrator force capping. | |
| double | min_global_cut |
| Minimal global interaction cutoff. | |
| std::shared_ptr< EnergyObservable > | m_obs_energy |
| std::shared_ptr< PressureObservable > | m_obs_pressure |
Main system class.
Most components follow the composite pattern and the opaque pointer pattern. See System class design for more details.
Definition at line 87 of file core/system/System.hpp.
| System::System::System | ( | Private | ) |
Definition at line 75 of file core/system/System.cpp.
References auto_update_accumulators, bond_breakage, bonded_ias, box_geo, cell_structure, collision_detection, comfixed, constraints, force_cap, galilei, gpu, immersed_boundaries, inactive_cutoff, kokkos_handle, lees_edwards, local_geo, min_global_cut, nonbonded_ias, npt_inst_pressure, nptiso, oif_global, propagation, reinit_thermo, sim_time, steepest_descent, stokesian_dynamics, thermostat, and time_step.
| Observable_stat const & System::System::calculate_energy | ( | ) |
Calculate the total energy.
Definition at line 64 of file energy.cpp.
References bonded_ias, box_geo, cabana_short_range(), cell_structure, constraints, coulomb, dipoles, ESPRESSO_CALI_MARK_BEGIN, ESPRESSO_CALI_MARK_END, get_interaction_range(), get_ptr(), get_sim_time(), gpu, inactive_cutoff, kokkos_deep_copy(), long_range_interactions_sanity_checks(), m_obs_energy, maximal_cutoff(), nonbonded_ias, on_observable_calc(), propagation, reduce_cabana_energy(), rotational_kinetic_energy(), EnergyBinLayout::total, translational_kinetic_energy(), and update_verlet_state().
Referenced by Observables::Energy::operator()().
| void System::System::calculate_forces | ( | ) |
Calculate all forces.
Definition at line 415 of file forces.cpp.
References bond_breakage, bonded_ias, cabana_short_range(), cell_structure, collision_detection, comfixed, constraints, coulomb, create_cabana_neighbor_kernel(), create_kokkos_bonds_kernel_data(), create_specialized_verlet_pair_loop(), dipoles, ESPRESSO_CALI_MARK_BEGIN, ESPRESSO_CALI_MARK_END, ESPRESSO_CALI_MARK_FUNCTION, force_cap, force_capping(), gay_berne_active(), GayBerne, get_force_reduce_ghost_flags(), get_interaction_range(), get_npt_virial(), get_ptr(), get_sim_time(), ghost_reduce_overlap_eligible(), GHOSTTRANS_TORQUE, gpu, immersed_boundaries, inactive_cutoff, init_forces_and_thermostat(), INTEG_METHOD_STEEPEST_DESCENT, lb_couple_particles(), nonbonded_ias, npt_inst_pressure, oif_global, propagation, reduce_cabana_forces_and_torques(), reinit_dip_fld(), PropagationMode::ROT_VS_INDEPENDENT, PropagationMode::ROT_VS_RELATIVE, thermostat, this_node, PropagationMode::TRANS_LANGEVIN_NPT, PropagationMode::TRANS_LB_MOMENTUM_EXCHANGE, PropagationMode::TRANS_VS_CENTER_OF_MASS, PropagationMode::TRANS_VS_RELATIVE, update_icc_particles(), update_verlet_state(), vs_com_back_transfer_forces_and_torques(), and vs_relative_back_transfer_forces_and_torques().
Referenced by integrate().
| void System::System::calculate_long_range_fields | ( | ) |
Calculate dipole fields.
References check_kT(), has_collision_detection_enabled(), integrate(), integrate_with_signal_handler(), lb_couple_particles(), on_boxl_change(), on_cell_structure_change(), on_constraint_change(), on_coulomb_change(), on_dipoles_change(), on_integration_start(), on_lb_boundary_conditions_change(), on_lees_edwards_change(), on_node_grid_change(), on_non_bonded_ia_change(), on_observable_calc(), on_particle_change(), on_particle_charge_change(), on_particle_local_change(), on_periodicity_change(), on_short_range_ia_change(), on_temperature_change(), on_thermostat_param_change(), on_timestep_change(), on_verlet_skin_change(), particle_bond_energy(), particle_short_range_energy_contribution(), update_dependent_particles(), update_used_propagations(), and veto_boxl_change().
| Observable_stat const & System::System::calculate_pressure | ( | ) |
Calculate the pressure from a virial expansion.
Definition at line 60 of file pressure.cpp.
References bonded_ias, box_geo, cabana_short_range(), cell_structure, coulomb, dipoles, Utils::flatten(), get_interaction_range(), get_ptr(), get_time_step(), inactive_cutoff, kokkos_deep_copy(), long_range_interactions_sanity_checks(), m_obs_pressure, maximal_cutoff(), nonbonded_ias, on_observable_calc(), propagation, reduce_cabana_pressure(), reduce_over_local_particles(), Utils::sqr(), Utils::tensor_product(), thermostat, PressureBinLayout::total, update_verlet_state(), and vs_relative_pressure_tensor().
Referenced by Observables::Pressure::operator()(), and Observables::PressureTensor::operator()().
| void System::System::check_kT | ( | double | value | ) | const |
Veto temperature change.
Definition at line 163 of file core/system/System.cpp.
Referenced by calculate_long_range_fields().
|
static |
Definition at line 69 of file core/system/System.cpp.
Referenced by ScriptInterface::System::System::do_construct().
|
inline |
Get force_cap.
Definition at line 115 of file core/system/System.hpp.
References force_cap.
Referenced by ghost_reduce_overlap_eligible().
| unsigned System::System::get_force_reduce_ghost_flags | ( | ) | const |
Returns the ghost flags for the force-reduce step.
Always includes GHOSTTRANS_FORCE; adds GHOSTTRANS_TORQUE when orientation physics is active (same whitelist as get_global_ghost_flags for QUAT).
Definition at line 664 of file core/system/System.cpp.
References GHOSTTRANS_FORCE, GHOSTTRANS_TORQUE, and System::orientation_ghosts_needed().
Referenced by calculate_forces().
| unsigned System::System::get_global_ghost_flags | ( | ) | const |
Returns the ghost flags required for running pair kernels for the global state, e.g.
the force calculation.
Definition at line 634 of file core/system/System.cpp.
References collision_detection, Cells::DATA_PART_BONDS, Cells::DATA_PART_MOMENTUM, Cells::DATA_PART_POSITION, Cells::DATA_PART_PROPERTIES, Cells::DATA_PART_QUAT, lb, System::orientation_ghosts_needed(), THERMO_BOND, THERMO_DPD, and thermostat.
Referenced by BondBreakage::BondBreakage::execute_bond_breakage(), integrate(), on_observable_calc(), on_particle_local_change(), particle_bond_energy(), particle_short_range_energy_contribution(), and update_dependent_particles().
| double System::System::get_interaction_range | ( | ) | const |
Get the interaction range.
Definition at line 479 of file core/system/System.cpp.
References cell_structure, inactive_cutoff, and maximal_cutoff().
Referenced by calculate_energy(), calculate_forces(), calculate_pressure(), set_cell_structure_topology(), and update_verlet_state().
|
inline |
Get min_global_cut.
Definition at line 121 of file core/system/System.hpp.
References min_global_cut.
Referenced by CollisionDetection::BindAtPointOfCollision::handle_collisions(), CollisionDetection::GlueToSurface::handle_collisions(), and maximal_cutoff().
| Utils::Vector3d * System::System::get_npt_virial | ( | ) | const |
Definition at line 681 of file core/system/System.cpp.
References has_npt_enabled(), and npt_inst_pressure.
Referenced by calculate_forces().
|
inline |
Get sim_time.
Definition at line 109 of file core/system/System.hpp.
References sim_time.
Referenced by calculate_energy(), and calculate_forces().
|
inline |
Get time_step.
Definition at line 103 of file core/system/System.hpp.
References time_step.
Referenced by calculate_pressure(), init_forces_and_thermostat(), lb_couple_particles(), npt_ensemble_init(), ScriptInterface::Integrators::IntegratorHandle::on_bind_system(), EK::EKWalberla::sanity_checks(), and LB::LBWalberla::sanity_checks().
| bool System::System::has_collision_detection_enabled | ( | ) | const |
Definition at line 691 of file core/system/System.cpp.
References collision_detection.
Referenced by calculate_long_range_fields().
|
protected |
Definition at line 315 of file icc.cpp.
References coulomb.
Referenced by update_dependent_particles().
| bool System::System::has_npt_enabled | ( | ) | const |
Definition at line 675 of file core/system/System.cpp.
References INTEG_METHOD_NPT_ISO_AND, INTEG_METHOD_NPT_ISO_MTK, and propagation.
Referenced by get_npt_virial(), integrate(), and npt_add_virial_contribution().
| int System::System::integrate | ( | int | n_steps, |
| int | reuse_forces ) |
Integrate equations of motion.
| n_steps | Number of integration steps, can be zero |
| reuse_forces | Decide when to re-calculate forces |
This function calls two hooks for propagation kernels such as velocity Verlet, velocity Verlet + NpT, or steepest descent. One hook is called before and one after the force calculation. It is up to the propagation kernels to increment the simulation time.
This function propagates the system according to the choice of integrator stored in Propagation::integ_switch. The general structure is:
High-level documentation of the integration and thermostatting schemes can be found in doc/sphinx/system_setup.rst and /doc/sphinx/running.rst
Definition at line 609 of file integrate.cpp.
References bond_breakage, bonded_ias, box_geo, calculate_forces(), cell_structure, check_runtime_errors(), collision_detection, comm_cart, correct_position_shake(), correct_velocity_shake(), Cells::DATA_PART_PROPERTIES, ek, ESPRESSO_CALI_MARK_BEGIN, ESPRESSO_CALI_MARK_END, ESPRESSO_CALI_MARK_FUNCTION, get_global_ghost_flags(), CellStructure::ghosts_reduce_forces_finish(), has_npt_enabled(), CellStructure::has_pending_ghost_reduce(), INTEG_ERROR_RUNTIME, INTEG_ERROR_SIGINT, INTEG_METHOD_BD, INTEG_METHOD_STEEPEST_DESCENT, INTEG_REUSE_FORCES_ALWAYS, INTEG_REUSE_FORCES_NEVER, integrate_magnetodynamics(), integrator_step_1(), integrator_step_2(), integrator_step_2_filtered(), EspressoCaliLoop::iteration(), lb, lb_tracers_add_particle_force_to_fluid(), lb_tracers_propagate(), LEES_EDWARDS, lees_edwards, local_geo, on_integration_start(), propagation, Cells::RESORT_LOCAL, resort_particles_if_needed(), PropagationMode::ROT_VS_INDEPENDENT, PropagationMode::ROT_VS_RELATIVE, runtimeErrorMsg, save_old_position(), sim_time, synchronize_npt_state(), thermostat, time_step, PropagationMode::TRANS_LB_MOMENTUM_EXCHANGE, PropagationMode::TRANS_LB_TRACER, PropagationMode::TRANS_VS_CENTER_OF_MASS, PropagationMode::TRANS_VS_RELATIVE, update_used_propagations(), vs_com_update_particles(), and vs_relative_update_particles().
Referenced by calculate_long_range_fields(), integrate_with_signal_handler(), run_full_force_calc(), and time_calc().
|
protected |
Run magnetodynamics update for local virtual particles.
Iterate over local particles and update the dipole moment of virtual particles according to the thermal Stoner-Wohlfarth model. Collect active homogeneous external magnetic fields from constraints and add the per-particle dipolar contribution before performing either the simplified no-field update or the full thermal Stoner-Wohlfarth update.
Definition at line 258 of file stoner_wohlfarth_thermal.cpp.
References cell_structure, constraints, Particle::dip_fld(), get_external_field(), get_reference_particle(), Particle::id(), Particle::is_virtual(), Random::philox_4_uint64s(), Particle::stoner_wohlfarth_is_enabled(), stoner_wohlfarth_main(), stoner_wohlfarth_no_field(), THERMO_LANGEVIN, thermostat, and Utils::uniform().
Referenced by integrate().
| int System::System::integrate_with_signal_handler | ( | int | n_steps, |
| int | reuse_forces, | ||
| bool | update_accumulators ) |
Definition at line 999 of file integrate.cpp.
References auto_update_accumulators, cell_structure, comm_cart, INTEG_ERROR_RUNTIME, INTEG_REUSE_FORCES_ALWAYS, and integrate().
Referenced by calculate_long_range_fields(), and ScriptInterface::Integrators::SteepestDescent::integrate().
| void System::System::lb_couple_particles | ( | ) |
Calculate particle-lattice interactions.
Definition at line 351 of file particle_coupling.cpp.
References box_geo, cell_structure, ESPRESSO_CALI_MARK_FUNCTION, get_time_step(), LB::is_tracer(), LB::ParticleCoupling::kernel(), lb, LB::lb_coupling_sanity_checks(), local_geo, runtimeErrorMsg, LB::CouplingBookkeeping::should_be_coupled(), and thermostat.
Referenced by calculate_forces(), and calculate_long_range_fields().
| bool System::System::long_range_interactions_sanity_checks | ( | ) | const |
Check electrostatic and magnetostatic methods are properly initialized.
Definition at line 464 of file core/system/System.cpp.
References coulomb, dipoles, and runtimeErrorMsg.
Referenced by calculate_energy(), calculate_pressure(), and on_integration_start().
| double System::System::maximal_cutoff | ( | ) | const |
Calculate the maximal cutoff of all interactions.
Definition at line 446 of file core/system/System.cpp.
References bonded_ias, collision_detection, communicator, coulomb, dipoles, get_min_global_cut(), inactive_cutoff, and nonbonded_ias.
Referenced by calculate_energy(), calculate_pressure(), create_cabana_neighbor_kernel(), create_specialized_verlet_pair_loop(), get_interaction_range(), and tune_verlet_skin().
| void System::System::npt_add_virial_contribution | ( | double | energy | ) |
Definition at line 137 of file npt.cpp.
References has_npt_enabled(), and npt_inst_pressure.
| void System::System::npt_ensemble_init | ( | bool | recalc_forces | ) |
Reinitialize the NpT state.
Definition at line 101 of file npt.cpp.
References box_geo, cell_structure, comm_cart, Utils::Mpi::gather_buffer(), get_time_step(), npt_inst_pressure, nptiso, and this_node.
Referenced by on_integration_start().
| void System::System::on_boxl_change | ( | bool | skip_method_adaption = false | ) |
Called when the box length has changed.
This routine is relatively fast, and changing the box length every time step as for example necessary for NpT is more or less ok.
| skip_method_adaption | skip the long-range methods adaptions |
Definition at line 212 of file core/system/System.cpp.
References constraints, coulomb, dipoles, ek, lb, rebuild_cell_structure(), and update_local_geo().
Referenced by calculate_long_range_fields(), set_box_l(), velocity_verlet_npt_propagate_AVOVA_And(), and velocity_verlet_npt_propagate_AVOVA_MTK().
| void System::System::on_cell_structure_change | ( | ) |
Definition at line 276 of file core/system/System.cpp.
References clear_particle_node(), coulomb, dipoles, ek, and lb.
Referenced by calculate_long_range_fields().
| void System::System::on_constraint_change | ( | ) |
Called every time a constraint is changed.
Definition at line 338 of file core/system/System.cpp.
References propagation.
Referenced by calculate_long_range_fields().
| void System::System::on_coulomb_change | ( | ) |
Definition at line 324 of file core/system/System.cpp.
References coulomb, and on_short_range_ia_change().
Referenced by calculate_long_range_fields(), and CoulombP3MImpl< FloatType, Architecture, FFTConfig >::tune().
| void System::System::on_dipoles_change | ( | ) |
Definition at line 331 of file core/system/System.cpp.
References dipoles, and on_short_range_ia_change().
Referenced by calculate_long_range_fields(), and DipolarP3MHeffte< FloatType, Architecture, FFTConfig >::tune().
| void System::System::on_integration_start | ( | ) |
Definition at line 491 of file core/system/System.cpp.
References Utils::Mpi::all_compare(), cell_structure, comm_cart, coulomb, dipoles, ek, INTEG_METHOD_NPT_ISO_AND, INTEG_METHOD_NPT_ISO_MTK, invalidate_fetch_cache(), lb, long_range_interactions_sanity_checks(), npt_ensemble_init(), on_observable_calc(), propagation, reinit_thermo, runtimeErrorMsg, thermostat, and time_step.
Referenced by calculate_long_range_fields(), and integrate().
| void System::System::on_lb_boundary_conditions_change | ( | ) |
Called when the LB boundary conditions change (geometry, slip velocity, or both).
Definition at line 340 of file core/system/System.cpp.
References propagation.
Referenced by calculate_long_range_fields(), and ScriptInterface::walberla::LBFluid::do_call_method().
| void System::System::on_lees_edwards_change | ( | ) |
Definition at line 438 of file core/system/System.cpp.
References lb.
Referenced by calculate_long_range_fields().
| void System::System::on_node_grid_change | ( | ) |
Definition at line 244 of file core/system/System.cpp.
References coulomb, dipoles, ek, lb, rebuild_cell_structure(), and update_local_geo().
Referenced by calculate_long_range_fields().
| void System::System::on_non_bonded_ia_change | ( | ) |
Definition at line 317 of file core/system/System.cpp.
References nonbonded_ias, on_thermostat_param_change(), propagation, and rebuild_cell_structure().
Referenced by calculate_long_range_fields().
| void System::System::on_observable_calc | ( | ) |
called before calculating observables, i.e.
energy, pressure or the integrator (forces). Initialize any methods here which are not initialized immediately (P3M etc.).
Definition at line 410 of file core/system/System.cpp.
References cell_structure, clear_particle_node(), coulomb, dipoles, get_global_ghost_flags(), rebuild_aosoa(), and update_dependent_particles().
Referenced by calculate_energy(), calculate_long_range_fields(), calculate_pressure(), dpd_pressure_local(), and on_integration_start().
| void System::System::on_particle_change | ( | ) |
Called every time a particle property changes.
Definition at line 350 of file core/system/System.cpp.
References cell_structure, coulomb, dipoles, HYBRID, invalidate_fetch_cache(), propagation, Cells::RESORT_GLOBAL, and Cells::RESORT_LOCAL.
Referenced by calculate_long_range_fields(), Galilei::galilei_transform(), Galilei::kill_particle_forces(), Galilei::kill_particle_motion(), make_new_particle(), remove_particle(), set_particle_pos(), ScriptInterface::Particles::set_particles_bonds(), and ScriptInterface::Particles::set_particles_exclusions().
| void System::System::on_particle_charge_change | ( | ) |
Called every time a particle charge changes.
Definition at line 370 of file core/system/System.cpp.
References coulomb.
Referenced by calculate_long_range_fields(), and ScriptInterface::Particles::set_particles_charges().
| void System::System::on_particle_local_change | ( | ) |
Called every time a particle local property changes.
Definition at line 344 of file core/system/System.cpp.
References cell_structure, get_global_ghost_flags(), and propagation.
Referenced by calculate_long_range_fields().
| void System::System::on_periodicity_change | ( | ) |
Definition at line 257 of file core/system/System.cpp.
References box_geo, coulomb, dipoles, INTEG_METHOD_SD, on_verlet_skin_change(), propagation, and runtimeErrorMsg.
Referenced by calculate_long_range_fields().
| void System::System::on_short_range_ia_change | ( | ) |
Definition at line 312 of file core/system/System.cpp.
References propagation, and rebuild_cell_structure().
Referenced by calculate_long_range_fields(), on_coulomb_change(), on_dipoles_change(), and on_verlet_skin_change().
| void System::System::on_temperature_change | ( | ) |
Definition at line 301 of file core/system/System.cpp.
Referenced by calculate_long_range_fields().
| void System::System::on_thermostat_param_change | ( | ) |
Definition at line 288 of file core/system/System.cpp.
References reinit_thermo.
Referenced by ScriptInterface::Integrators::VelocityVerletIsoNPT::activate(), calculate_long_range_fields(), ScriptInterface::Thermostat::Interface< CoreClass >::on_bind_system(), ScriptInterface::Thermostat::Interface< CoreClass >::on_detach_system(), on_non_bonded_ia_change(), and on_timestep_change().
| void System::System::on_timestep_change | ( | ) |
Definition at line 306 of file core/system/System.cpp.
References ek, lb, and on_thermostat_param_change().
Referenced by calculate_long_range_fields(), and set_time_step().
| void System::System::on_verlet_skin_change | ( | ) |
Definition at line 290 of file core/system/System.cpp.
References coulomb, dipoles, on_short_range_ia_change(), and rebuild_cell_structure().
Referenced by calculate_long_range_fields(), on_periodicity_change(), and set_min_global_cut().
| std::optional< double > System::System::particle_bond_energy | ( | int | pid, |
| int | bond_id, | ||
| std::vector< int > | partners ) |
Compute the energy of a given bond which has to exist on the given particle.
Requires that bond partners are visible on the same MPI rank as the primary particle. Returns nothing if the primary particle is not owned by this MPI rank.
| pid | Particle id |
| bond_id | Bond id |
| partners | Particle ids of the bond partners |
Definition at line 219 of file energy.cpp.
References bond_broken_error(), bonded_ias, box_geo, calc_bonded_energy(), cell_structure, coulomb, get_global_ghost_flags(), get_ptr(), Particle::id(), and Particle::is_ghost().
Referenced by calculate_long_range_fields().
| double System::System::particle_short_range_energy_contribution | ( | int | pid | ) |
Compute the short-range energy of a particle.
Iterate through particles inside cell and neighboring cells and compute energy contribution for a specific particle.
| pid | Particle id |
Definition at line 195 of file energy.cpp.
References bonded_ias, calc_non_bonded_pair_energy(), cell_structure, coulomb, do_nonbonded(), get_global_ghost_flags(), and nonbonded_ias.
Referenced by calculate_long_range_fields().
| void System::System::rebuild_aosoa | ( | ) |
Definition at line 428 of file core/system/System.cpp.
References collision_detection, inactive_cutoff, and update_verlet_state().
Referenced by on_observable_calc(), and update_dependent_particles().
| void System::System::rebuild_cell_structure | ( | ) |
Rebuild cell lists.
Use e.g. after a skin change.
Definition at line 208 of file core/system/System.cpp.
References cell_structure, and set_cell_structure_topology().
Referenced by on_boxl_change(), on_node_grid_change(), on_non_bonded_ia_change(), on_short_range_ia_change(), and on_verlet_skin_change().
| void System::System::set_box_l | ( | Utils::Vector3d const & | box_l | ) |
Change the box dimensions.
Definition at line 486 of file core/system/System.cpp.
References box_geo, and on_boxl_change().
| void System::System::set_cell_structure_topology | ( | CellStructureType | topology | ) |
Change cell structure topology.
Definition at line 182 of file core/system/System.cpp.
References cell_structure, get_interaction_range(), HYBRID, NSQUARE, and REGULAR.
Referenced by rebuild_cell_structure().
| void System::System::set_force_cap | ( | double | value | ) |
Set force_cap.
Definition at line 172 of file core/system/System.cpp.
References force_cap, and propagation.
| void System::System::set_min_global_cut | ( | double | value | ) |
Set min_global_cut.
Definition at line 177 of file core/system/System.cpp.
References min_global_cut, and on_verlet_skin_change().
| void System::System::set_sim_time | ( | double | value | ) |
Set sim_time.
Definition at line 1048 of file integrate.cpp.
References box_geo, lees_edwards, propagation, and sim_time.
| void System::System::set_time_step | ( | double | value | ) |
Set time_step.
Definition at line 150 of file core/system/System.cpp.
References ek, lb, on_timestep_change(), and time_step.
| void System::System::synchronize_npt_state | ( | ) |
Synchronize NpT state such as instantaneous and average pressure.
Definition at line 44 of file npt.cpp.
References comm_cart, npt_inst_pressure, and nptiso.
Referenced by integrate().
| void System::System::tune_verlet_skin | ( | double | min_skin, |
| double | max_skin, | ||
| double | tol, | ||
| int | int_steps, | ||
| bool | adjust_max_skin ) |
Tune the Verlet skin.
Choose the optimal Verlet list skin between min_skin and max_skin by bisection to tolerance tol.
Definition at line 125 of file tuning.cpp.
References box_geo, cell_structure, maximal_cutoff(), and time_calc().
| void System::System::update_dependent_particles | ( | ) |
Update particles with properties depending on other particles, namely virtual sites and ICC charges.
Definition at line 376 of file core/system/System.cpp.
References box_geo, cell_structure, get_global_ghost_flags(), has_icc_enabled(), immersed_boundaries, propagation, rebuild_aosoa(), PropagationMode::ROT_VS_INDEPENDENT, PropagationMode::ROT_VS_RELATIVE, PropagationMode::TRANS_VS_CENTER_OF_MASS, PropagationMode::TRANS_VS_RELATIVE, update_icc_particles(), update_used_propagations(), vs_com_update_particles(), and vs_relative_update_particles().
Referenced by calculate_long_range_fields(), and on_observable_calc().
|
protected |
Definition at line 321 of file icc.cpp.
References coulomb, and get_ptr().
Referenced by calculate_forces(), and update_dependent_particles().
|
protected |
Definition at line 440 of file core/system/System.cpp.
References box_geo, communicator, local_geo, and LocalBox::make_regular_decomposition().
Referenced by on_boxl_change(), and on_node_grid_change().
| void System::System::update_used_propagations | ( | ) |
Update the global propagation bitmask.
Definition at line 189 of file integrate.cpp.
References cell_structure, comm_cart, PropagationMode::NONE, propagation, and PropagationMode::SYSTEM_DEFAULT.
Referenced by calculate_long_range_fields(), CollisionDetection::BindAtPointOfCollision::handle_collisions(), CollisionDetection::GlueToSurface::handle_collisions(), integrate(), and update_dependent_particles().
| void System::System::veto_boxl_change | ( | bool | skip_particle_checks = false | ) | const |
Definition at line 230 of file core/system/System.cpp.
References cell_structure, comm_cart, constraints, ek, and lb.
Referenced by calculate_long_range_fields().
| std::shared_ptr<Accumulators::AutoUpdateAccumulators> System::System::auto_update_accumulators |
Definition at line 342 of file core/system/System.hpp.
Referenced by integrate_with_signal_handler(), ScriptInterface::Accumulators::AutoUpdateAccumulators::on_bind_system(), and System().
| std::shared_ptr<BondBreakage::BondBreakage> System::System::bond_breakage |
Definition at line 339 of file core/system/System.hpp.
Referenced by calculate_forces(), create_kokkos_bonds_kernel_data(), integrate(), ScriptInterface::BondBreakage::BreakageSpecs::on_bind_system(), and System().
| std::shared_ptr<BondedInteractionsMap> System::System::bonded_ias |
Definition at line 329 of file core/system/System.hpp.
Referenced by calculate_energy(), calculate_forces(), calculate_pressure(), create_cabana_neighbor_kernel(), create_kokkos_bonds_kernel_data(), ScriptInterface::Analysis::get_summary(), CollisionDetection::BindAtPointOfCollision::handle_collisions(), CollisionDetection::BindAtPointOfCollision::initialize(), CollisionDetection::BindCenters::initialize(), CollisionDetection::GlueToSurface::initialize(), integrate(), maximal_cutoff(), ScriptInterface::CollisionDetection::CollisionDetection::on_bind_system(), ScriptInterface::Interactions::BondedInteractions::on_bind_system(), particle_bond_energy(), particle_short_range_energy_contribution(), and System().
| std::shared_ptr<BoxGeometry> System::System::box_geo |
Definition at line 325 of file core/system/System.hpp.
Referenced by angular_momentum(), calc_part_distribution(), calc_re(), calc_rg(), calc_rh(), Galilei::calc_system_cms_position(), calculate_energy(), calculate_pressure(), center_of_mass(), create_cabana_neighbor_kernel(), create_kokkos_bonds_kernel_data(), create_specialized_verlet_pair_loop(), PairCriteria::DistanceCriterion::decide(), ScriptInterface::walberla::LBFluid::do_call_method(), ScriptInterface::walberla::LatticeWalberla::do_construct(), dpd_pressure(), dpd_pressure_local(), draw_polymer_positions(), Observables::BondAngles::evaluate(), Observables::BondDihedrals::evaluate(), Observables::CosPersistenceAngles::evaluate(), Observables::CylindricalDensityProfile::evaluate(), Observables::CylindricalFluxDensityProfile::evaluate(), Observables::CylindricalVelocityProfile::evaluate(), Observables::DensityProfile::evaluate(), Observables::FluxDensityProfile::evaluate(), Observables::ForceDensityProfile::evaluate(), Observables::ParticleDistances::evaluate(), BondBreakage::BondBreakage::execute_bond_breakage(), LB::Solver::get_interpolated_densities(), LB::Solver::get_interpolated_density(), LB::Solver::get_interpolated_velocity(), gyration_tensor(), CollisionDetection::BindAtPointOfCollision::handle_collisions(), CollisionDetection::GlueToSurface::handle_collisions(), CoulombP3MImpl< FloatType, Architecture, FFTConfig >::init_gpu_kernels(), integrate(), lb_couple_particles(), LB::Solver::make_lattice_position_checker(), maybe_insert_particle(), mindist(), moment_of_inertia_matrix(), nbhood(), npt_ensemble_init(), on_periodicity_change(), pack_particles(), particle_bond_energy(), ParticleObservables::traits< Particle >::position(), resort_particles_if_needed(), EK::EKWalberla::sanity_checks(), CoulombP3M::sanity_checks_boxl(), DipolarP3M::sanity_checks_boxl(), set_box_l(), set_sim_time(), structure_factor(), System(), CoulombP3MImpl< FloatType, Architecture, FFTConfig >::tune(), DipolarP3MHeffte< FloatType, Architecture, FFTConfig >::tune(), tune_verlet_skin(), update_dependent_particles(), update_local_geo(), velocity_verlet_npt_propagate_AVOVA_And(), and velocity_verlet_npt_propagate_AVOVA_MTK().
| std::shared_ptr<CellStructure> System::System::cell_structure |
Definition at line 327 of file core/system/System.hpp.
Referenced by CollisionDetection::add_bind_centers(), add_bond(), angular_momentum(), calc_linear_momentum(), calc_re(), calc_rg(), calc_rh(), Galilei::calc_system_cms_position(), Galilei::calc_system_cms_velocity(), calculate_energy(), calculate_forces(), calculate_pressure(), center_of_mass(), Coulomb::check_charge_neutrality(), create_cabana_neighbor_kernel(), create_kokkos_bonds_kernel_data(), create_specialized_verlet_pair_loop(), dpd_pressure_local(), BondBreakage::BondBreakage::execute_bond_breakage(), Galilei::galilei_transform(), gather_traits_for_types(), get_cell_structure(), get_interacting_neighbors(), get_interaction_range(), get_neighbor_pids(), get_pairs_filtered(), get_short_range_neighbors(), CollisionDetection::BindAtPointOfCollision::handle_collisions(), CollisionDetection::GlueToSurface::handle_collisions(), init_forces_and_thermostat(), integrate(), integrate_magnetodynamics(), integrate_with_signal_handler(), is_valid_position(), Galilei::kill_particle_forces(), Galilei::kill_particle_motion(), lb_couple_particles(), mindist(), moment_of_inertia_matrix(), nbhood(), non_bonded_loop_trace(), npt_ensemble_init(), ScriptInterface::CellSystem::CellSystem::on_bind_system(), on_integration_start(), on_observable_calc(), on_particle_change(), on_particle_local_change(), particle_bond_energy(), particle_short_range_energy_contribution(), rebuild_cell_structure(), reduce_cabana_forces_and_torques(), resort_particles_if_needed(), set_cell_structure_topology(), System(), tune_verlet_skin(), update_dependent_particles(), update_used_propagations(), update_verlet_state(), velocity_verlet_npt_propagate_AVOVA_And(), velocity_verlet_npt_propagate_AVOVA_MTK(), and veto_boxl_change().
| ResourceCleanup System::System::cleanup_queue |
Definition at line 100 of file core/system/System.hpp.
| std::shared_ptr<CollisionDetection::CollisionDetection> System::System::collision_detection |
Definition at line 337 of file core/system/System.hpp.
Referenced by calculate_forces(), get_global_ghost_flags(), has_collision_detection_enabled(), integrate(), maximal_cutoff(), ScriptInterface::CollisionDetection::CollisionDetection::on_bind_system(), rebuild_aosoa(), and System().
| std::shared_ptr<ComFixed> System::System::comfixed |
Definition at line 332 of file core/system/System.hpp.
Referenced by calculate_forces(), ghost_reduce_overlap_eligible(), ScriptInterface::Galilei::ComFixed::on_bind_system(), and System().
| std::shared_ptr<Constraints::Constraints> System::System::constraints |
Definition at line 343 of file core/system/System.hpp.
Referenced by calculate_energy(), calculate_forces(), integrate_magnetodynamics(), is_valid_position(), ScriptInterface::Constraints::Constraints::on_bind_system(), on_boxl_change(), System(), and veto_boxl_change().
| Coulomb::Solver System::System::coulomb |
Definition at line 321 of file core/system/System.hpp.
Referenced by calculate_energy(), calculate_forces(), calculate_pressure(), create_cabana_neighbor_kernel(), create_specialized_verlet_pair_loop(), has_icc_enabled(), CoulombP3MImpl< FloatType, Architecture, FFTConfig >::init_gpu_kernels(), long_range_interactions_sanity_checks(), maximal_cutoff(), on_boxl_change(), on_cell_structure_change(), on_coulomb_change(), on_integration_start(), on_node_grid_change(), on_observable_calc(), on_particle_change(), on_particle_charge_change(), on_periodicity_change(), on_verlet_skin_change(), particle_bond_energy(), particle_short_range_energy_contribution(), update_icc_particles(), and update_verlet_state().
| Dipoles::Solver System::System::dipoles |
Definition at line 322 of file core/system/System.hpp.
Referenced by calculate_energy(), calculate_forces(), calculate_pressure(), ghost_reduce_overlap_eligible(), init_forces_and_thermostat(), long_range_interactions_sanity_checks(), maximal_cutoff(), on_boxl_change(), on_cell_structure_change(), on_dipoles_change(), on_integration_start(), on_node_grid_change(), on_observable_calc(), on_particle_change(), on_periodicity_change(), on_verlet_skin_change(), and update_verlet_state().
| EK::Solver System::System::ek |
Definition at line 324 of file core/system/System.hpp.
Referenced by check_kT(), ScriptInterface::walberla::EKContainer::do_call_method(), integrate(), on_boxl_change(), on_cell_structure_change(), on_integration_start(), on_node_grid_change(), on_temperature_change(), on_timestep_change(), set_time_step(), and veto_boxl_change().
|
protected |
Molecular dynamics integrator force capping.
Definition at line 362 of file core/system/System.hpp.
Referenced by calculate_forces(), get_force_cap(), set_force_cap(), and System().
| std::shared_ptr<Galilei> System::System::galilei |
Definition at line 333 of file core/system/System.hpp.
Referenced by ScriptInterface::Galilei::Galilei::on_bind_system(), and System().
| std::shared_ptr<GpuParticleData> System::System::gpu |
Definition at line 98 of file core/system/System.hpp.
Referenced by calculate_energy(), calculate_forces(), CoulombP3MImpl< FloatType, Architecture, FFTConfig >::init_gpu_kernels(), and System().
| std::shared_ptr<ImmersedBoundaries> System::System::immersed_boundaries |
Definition at line 335 of file core/system/System.hpp.
Referenced by calculate_forces(), System(), and update_dependent_particles().
| LB::Solver System::System::lb |
Definition at line 323 of file core/system/System.hpp.
Referenced by calc_linear_momentum(), check_kT(), ScriptInterface::walberla::LBFluid::do_call_method(), get_global_ghost_flags(), integrate(), lb_couple_particles(), on_boxl_change(), on_cell_structure_change(), on_integration_start(), on_lees_edwards_change(), on_node_grid_change(), on_temperature_change(), on_timestep_change(), Observables::LBFluidPressureTensor::operator()(), EK::EKWalberla::propagate(), set_time_step(), and veto_boxl_change().
| std::shared_ptr<LeesEdwards::LeesEdwards> System::System::lees_edwards |
Definition at line 340 of file core/system/System.hpp.
Referenced by integrate(), ScriptInterface::LeesEdwards::LeesEdwards::on_bind_system(), set_sim_time(), and System().
| std::shared_ptr<LocalBox> System::System::local_geo |
Definition at line 326 of file core/system/System.hpp.
Referenced by integrate(), lb_couple_particles(), EK::EKWalberla::sanity_checks(), LB::LBWalberla::sanity_checks(), CoulombP3M::sanity_checks_boxl(), DipolarP3M::sanity_checks_boxl(), System(), and update_local_geo().
|
protected |
Definition at line 369 of file core/system/System.hpp.
Referenced by calculate_energy().
|
protected |
Definition at line 370 of file core/system/System.hpp.
Referenced by calculate_pressure().
|
protected |
Minimal global interaction cutoff.
Particles with a distance smaller than this are guaranteed to be available on the same node (through ghosts).
Definition at line 368 of file core/system/System.hpp.
Referenced by get_min_global_cut(), set_min_global_cut(), and System().
| std::shared_ptr<InteractionsNonBonded> System::System::nonbonded_ias |
Definition at line 330 of file core/system/System.hpp.
Referenced by calculate_energy(), calculate_forces(), calculate_pressure(), create_cabana_neighbor_kernel(), create_specialized_verlet_pair_loop(), dpd_pressure_local(), ScriptInterface::Analysis::get_summary(), CollisionDetection::BindAtPointOfCollision::initialize(), CollisionDetection::GlueToSurface::initialize(), maximal_cutoff(), ScriptInterface::Interactions::NonBondedInteractions::on_bind_system(), on_non_bonded_ia_change(), particle_short_range_energy_contribution(), ScriptInterface::Particles::set_particles_types(), System(), and VerletCriterion< CutoffGetter, ShortRangeOnly >::VerletCriterion().
| std::shared_ptr<InstantaneousPressure> System::System::npt_inst_pressure |
Definition at line 350 of file core/system/System.hpp.
Referenced by calculate_forces(), get_npt_virial(), npt_add_virial_contribution(), npt_ensemble_init(), synchronize_npt_state(), System(), velocity_verlet_npt_Andersen_step_1(), velocity_verlet_npt_Andersen_step_2(), velocity_verlet_npt_MTK_step_1(), velocity_verlet_npt_MTK_step_2(), and velocity_verlet_npt_propagate_AVOVA_And().
| std::shared_ptr<NptIsoParameters> System::System::nptiso |
Definition at line 349 of file core/system/System.hpp.
Referenced by ScriptInterface::Integrators::VelocityVerletIsoNPT::activate(), npt_ensemble_init(), synchronize_npt_state(), System(), velocity_verlet_npt_Andersen_step_1(), velocity_verlet_npt_Andersen_step_2(), velocity_verlet_npt_MTK_step_1(), velocity_verlet_npt_MTK_step_2(), velocity_verlet_npt_propagate_AVOVA_And(), and velocity_verlet_npt_propagate_AVOVA_MTK().
| std::shared_ptr<OifGlobal> System::System::oif_global |
Definition at line 334 of file core/system/System.hpp.
Referenced by calculate_forces(), and System().
| std::shared_ptr<Propagation> System::System::propagation |
Definition at line 328 of file core/system/System.hpp.
Referenced by ScriptInterface::Integrators::BrownianDynamics::activate(), ScriptInterface::Integrators::SteepestDescent::activate(), ScriptInterface::Integrators::SymplecticEuler::activate(), ScriptInterface::Integrators::VelocityVerlet::activate(), ScriptInterface::Integrators::VelocityVerletIsoNPT::activate(), calculate_energy(), calculate_forces(), calculate_pressure(), ghost_reduce_overlap_eligible(), has_npt_enabled(), init_forces_and_thermostat(), integrate(), ScriptInterface::Integrators::IntegratorHandle::on_bind_system(), on_constraint_change(), on_integration_start(), on_lb_boundary_conditions_change(), on_non_bonded_ia_change(), on_particle_change(), on_particle_local_change(), on_periodicity_change(), on_short_range_ia_change(), set_force_cap(), set_sim_time(), System(), update_dependent_particles(), update_used_propagations(), and update_verlet_state().
|
protected |
Whether the thermostat has to be reinitialized before integration.
Definition at line 356 of file core/system/System.hpp.
Referenced by on_integration_start(), on_thermostat_param_change(), and System().
|
protected |
Molecular dynamics integrator simulation time.
Definition at line 360 of file core/system/System.hpp.
Referenced by get_sim_time(), integrate(), set_sim_time(), and System().
| std::shared_ptr<SteepestDescent> System::System::steepest_descent |
Definition at line 344 of file core/system/System.hpp.
Referenced by ScriptInterface::Integrators::SteepestDescent::activate(), integrator_step_1(), and System().
| std::shared_ptr<StokesianDynamics> System::System::stokesian_dynamics |
Definition at line 346 of file core/system/System.hpp.
Referenced by integrator_step_1(), and System().
| std::shared_ptr<Thermostat::Thermostat> System::System::thermostat |
Definition at line 331 of file core/system/System.hpp.
Referenced by calculate_forces(), calculate_pressure(), create_cabana_neighbor_kernel(), dpd_pressure_local(), get_global_ghost_flags(), init_forces_and_thermostat(), integrate(), integrate_magnetodynamics(), integrator_step_1(), lb_couple_particles(), ScriptInterface::Thermostat::Interface< CoreClass >::on_bind_system(), ScriptInterface::Thermostat::Thermostat::on_bind_system(), ScriptInterface::Thermostat::Interface< CoreClass >::on_detach_system(), on_integration_start(), and System().
|
protected |
Molecular dynamics integrator time step.
Definition at line 358 of file core/system/System.hpp.
Referenced by get_time_step(), integrate(), on_integration_start(), set_time_step(), and System().