sarkas.potentials.force_pp.particles_interaction_loop#

sarkas.potentials.force_pp.particles_interaction_loop(pos, vel, p_mass, p_id, potential_matrix, rc, measure, force, rdf_hist, head, ls_array, cells_per_dim, box_lengths)[source]#

Update the force on the particles based on a linked cell-list (LCL) algorithm.

Parameters
  • pos (numpy.ndarray) – Particles’ positions.

  • vel (numpy.ndarray) – Particles’ positions.

  • p_mass (numpy.ndarray) – Mass of each particle.

  • p_id (numpy.ndarray) – Id of each particle

  • potential_matrix (numpy.ndarray) – Potential parameters.

  • rc (float) – Cut-off radius.

  • measure (bool) – Boolean for rdf calculation.

  • force (func) – Potential and force values.

  • rdf_hist (numpy.ndarray) – Radial Distribution function array.

  • head (numpy.ndarray) – Head array of the linked cell list algorithm.

  • ls_array (numpy.ndarray) – List array of the linked cell list algorithm.

  • cells_per_dim (numpy.ndarray) – Number of cells per dimension.

  • box_lengths (numpy.ndarray) – Array of box sides’ length.

Returns

  • ptcl_pot_energy (numpy.ndarray) – Short-ranged component of the potential energy of each particle. Shape = tot_num_ptcls.

  • acc_s_r (numpy.ndarray) – Short-ranged component of the acceleration for the particles.

  • virial_species_tensor (numpy.ndarray) – Virial term of each particle.

    Shape = (3, 3, pos.shape[0])

  • j_e (numpy.ndarray) – Energy current of each particle. Shape=((3,N)

Notes

Here the “short-ranged component” refers to the Ewald decomposition of the short and long ranged interactions. See the wikipedia article: https://en.wikipedia.org/wiki/Ewald_summation or “Computer Simulation of Liquids by Allen and Tildesley” for more information.