![]() |
ESPResSo 3.2.0-11-g9950804-git
Extensible Simulation Package for Soft Matter Research
|
Implementation of the energy calculation. More...
#include "utils.h"#include "integrate.h"#include "statistics.h"#include "thermostat.h"#include "p3m.h"#include "p3m-dipolar.h"#include "lj.h"#include "ljgen.h"#include "steppot.h"#include "hertzian.h"#include "gaussian.h"#include "bmhtf-nacl.h"#include "buckingham.h"#include "soft_sphere.h"#include "hat.h"#include "ljcos.h"#include "ljcos2.h"#include "ljangle.h"#include "tab.h"#include "overlap.h"#include "gb.h"#include "fene.h"#include "object-in-fluid/stretching_force.h"#include "object-in-fluid/area_force_local.h"#include "object-in-fluid/area_force_global.h"#include "object-in-fluid/bending_force.h"#include "object-in-fluid/volume_force.h"#include "harmonic.h"#include "subt_lj.h"#include "angle.h"#include "angle_harmonic.h"#include "angle_cosine.h"#include "angle_cossquare.h"#include "angledist.h"#include "dihedral.h"#include "debye_hueckel.h"#include "endangledist.h"#include "reaction_field.h"#include "mmm1d.h"#include "mmm2d.h"#include "maggs.h"#include "morse.h"#include "elc.h"#include "mdlc_correction.h"

Go to the source code of this file.
Functions | |
Exported Functions | |
| void | init_energies (Observable_stat *stat) |
| allocate energy arrays and initialize with zero | |
| void | master_energy_calc () |
| on the master node: calc energies only if necessary | |
| void | energy_calc (double *result) |
| parallel energy calculation. | |
| MDINLINE double | calc_non_bonded_pair_energy (Particle *p1, Particle *p2, IA_parameters *ia_params, double d[3], double dist, double dist2) |
| Calculate non bonded energies between a pair of particles. | |
| MDINLINE void | add_non_bonded_pair_energy (Particle *p1, Particle *p2, double d[3], double dist, double dist2) |
| Add non bonded energies and short range coulomb between a pair of particles. | |
| MDINLINE void | add_bonded_energy (Particle *p1) |
| Calculate bonded energies for one particle. | |
| MDINLINE void | add_kinetic_energy (Particle *p1) |
| Calculate kinetic energies for one particle. | |
Variables | |
Exported Variables | |
| Observable_stat | energy |
| Observable_stat | total_energy |
Implementation of the energy calculation.
Definition in file energy.h.
| MDINLINE void add_bonded_energy | ( | Particle * | p1 | ) |
Calculate bonded energies for one particle.
| p1 | particle for which to calculate energies |
Definition at line 276 of file energy.h.
References angle_cosine_energy(), angle_cossquare_energy(), angle_energy(), angle_harmonic_energy(), angledist_energy(), Particle::bl, BONDED_IA_ANGLE_COSINE, BONDED_IA_ANGLE_COSSQUARE, BONDED_IA_ANGLE_HARMONIC, BONDED_IA_ANGLE_OLD, BONDED_IA_ANGLEDIST, BONDED_IA_DIHEDRAL, BONDED_IA_ENDANGLEDIST, BONDED_IA_FENE, BONDED_IA_HARMONIC, BONDED_IA_OVERLAPPED, bonded_ia_params, BONDED_IA_RIGID_BOND, BONDED_IA_SUBT_LJ, BONDED_IA_TABULATED, BONDED_IA_VIRTUAL_BOND, dihedral_energy(), IntList::e, endangledist_pair_energy(), ERROR_SPRINTF, ES_INTEGER_SPACE, fene_pair_energy(), get_mi_vector(), harmonic_pair_energy(), i, ParticleProperties::identity, local_particles, Bonded_ia_parameters::num, obsstat_bonded(), Bonded_ia_parameters::overlap, overlap_angle_energy(), OVERLAP_BOND_ANGLE, OVERLAP_BOND_DIHEDRAL, overlap_bond_energy(), OVERLAP_BOND_LENGTH, overlap_dihedral_energy(), ParticlePosition::p, Particle::p, Bonded_ia_parameters::p, Particle::r, runtime_error(), subt_lj_pair_energy(), Bonded_ia_parameters::tab, tab_angle_energy(), TAB_BOND_ANGLE, TAB_BOND_DIHEDRAL, tab_bond_energy(), TAB_BOND_LENGTH, tab_dihedral_energy(), and Bonded_ia_parameters::type.
Referenced by calculate_link_cell_energies(), calculate_verlet_energies(), layered_calculate_energies(), and nsq_calculate_energies().
| MDINLINE void add_kinetic_energy | ( | Particle * | p1 | ) |
Calculate kinetic energies for one particle.
| p1 | particle for which to calculate energies |
Definition at line 456 of file energy.h.
References Observable_stat::data, DoubleList::e, ifParticleIsVirtual(), Particle::m, ParticleMomentum::omega, Particle::p, PMASS, ParticleProperties::rinertia, ParticleProperties::rotation, SQR(), time_step, and ParticleMomentum::v.
Referenced by calculate_link_cell_energies(), calculate_verlet_energies(), layered_calculate_energies(), and nsq_calculate_energies().
| MDINLINE void add_non_bonded_pair_energy | ( | Particle * | p1, |
| Particle * | p2, | ||
| double | d[3], | ||
| double | dist, | ||
| double | dist2 | ||
| ) |
Add non bonded energies and short range coulomb between a pair of particles.
| p1 | pointer to particle 1. |
| p2 | pointer to particle 2. |
| d | vector between p1 and p2. |
| dist | distance between p1 and p2. |
| dist2 | distance squared between p1 and p2. |
Definition at line 206 of file energy.h.
References calc_non_bonded_pair_energy(), Observable_stat::coulomb, coulomb, COULOMB_DH, COULOMB_ELC_P3M, COULOMB_INTER_RF, COULOMB_MMM1D, COULOMB_MMM2D, COULOMB_NONE, COULOMB_P3M, COULOMB_RF, dh_coulomb_pair_energy(), ELC_struct::dielectric_contrast_on, Observable_stat::dipolar, DIPOLAR_MDLC_P3M, DIPOLAR_NONE, DIPOLAR_P3M, Coulomb_parameters::Dmethod, dp3m_pair_energy(), ELC_P3M_dielectric_layers_energy_contribution(), elc_params, get_ia_param(), ia_params, Coulomb_parameters::method, mmm1d_coulomb_pair_energy(), mmm2d_coulomb_pair_energy(), obsstat_nonbonded(), Particle::p, p3m_pair_energy(), ParticleProperties::q, rf_coulomb_pair_energy(), and ParticleProperties::type.
Referenced by calculate_link_cell_energies(), calculate_verlet_energies(), layered_calculate_energies(), and nsq_calculate_energies().
| MDINLINE double calc_non_bonded_pair_energy | ( | Particle * | p1, |
| Particle * | p2, | ||
| IA_parameters * | ia_params, | ||
| double | d[3], | ||
| double | dist, | ||
| double | dist2 | ||
| ) |
Calculate non bonded energies between a pair of particles.
| p1 | pointer to particle 1. |
| p2 | pointer to particle 2. |
| ia_params | the interaction parameters between the two particles |
| d | vector between p1 and p2. |
| dist | distance between p1 and p2. |
| dist2 | distance squared between p1 and p2. |
Definition at line 103 of file energy.h.
References BMHTF_pair_energy(), buck_pair_energy(), checkIfParticlesInteractViaMolCut(), gaussian_pair_energy(), gb_pair_energy(), hat_pair_energy(), hertzian_pair_energy(), interrf_pair_energy(), lj_pair_energy(), ljangle_pair_energy(), ljcos2_pair_energy(), ljcos_pair_energy(), ljgen_pair_energy(), ParticleProperties::mol_id, morse_pair_energy(), Particle::p, SmSt_pair_energy(), soft_pair_energy(), and tabulated_pair_energy().
Referenced by add_constraints_energy(), and add_non_bonded_pair_energy().
| void energy_calc | ( | double * | result | ) |
parallel energy calculation.
| result | non-zero only on master node; will contain the cumulative over all nodes. |
Definition at line 47 of file energy.c.
References build_verlet_lists(), calc_long_range_energies(), calculate_link_cell_energies(), calculate_verlet_energies(), cell_structure, CELL_STRUCTURE_DOMDEC, CELL_STRUCTURE_LAYERED, CELL_STRUCTURE_NSQUARE, check_obs_calc_initialized(), comm_cart, Observable_stat::data, dd, DoubleList::e, init_energies(), layered_calculate_energies(), MPI_DOUBLE, MPI_Reduce(), MPI_SUM, DoubleList::n, nsq_calculate_energies(), on_observable_calc(), rebuild_verletlist, time_step, CellStructure::type, and DomainDecomposition::use_vList.
Referenced by mpi_gather_stats(), and mpi_gather_stats_slave().
| void init_energies | ( | Observable_stat * | stat | ) |
allocate energy arrays and initialize with zero
Definition at line 160 of file energy.c.
References coulomb, COULOMB_ELC_P3M, COULOMB_NONE, COULOMB_P3M, DIPOLAR_ALL_WITH_ALL_AND_NO_REPLICA, DIPOLAR_DS, DIPOLAR_MDLC_DS, DIPOLAR_MDLC_P3M, DIPOLAR_NONE, DIPOLAR_P3M, Coulomb_parameters::Dmethod, Observable_stat::init_status, Coulomb_parameters::method, n_bonded_ia, n_particle_types, and obsstat_realloc_and_clear().
Referenced by energy_calc(), hamiltonian_calc(), and tclcommand_analyze_parse_and_print_energy().
| void master_energy_calc | ( | ) |
on the master node: calc energies only if necessary
Definition at line 201 of file energy.c.
References Observable_stat::data, DoubleList::e, Observable_stat::init_status, and mpi_gather_stats().
Referenced by hamiltonian_calc(), and tclcommand_analyze_parse_and_print_energy().
Definition at line 35 of file energy.c.
Referenced by add_constraints_energy(), fene_pair_energy(), get_DLC_dipolar(), get_DLC_energy_dipolar(), and subt_lj_pair_energy().
Definition at line 36 of file energy.c.
Referenced by hamiltonian_calc(), invalidate_obs(), tclcommand_analyze_parse_and_print_energy(), and tclcommand_analyze_print_all().
1.7.5.1