lennard_jones_pair

torch_sim.models.lennard_jones.lennard_jones_pair(dr, sigma=DEFAULT_SIGMA, epsilon=DEFAULT_EPSILON)[source]

Calculate pairwise Lennard-Jones interaction energies between particles.

Implements the standard 12-6 Lennard-Jones potential that combines short-range repulsion with longer-range attraction. The potential has a minimum at r=sigma.

The functional form is: V(r) = 4*epsilon*[(sigma/r)^12 - (sigma/r)^6]

Parameters:
  • dr (Tensor) – Pairwise distances between particles. Shape: [n, m].

  • sigma (Tensor) – Distance at which potential reaches its minimum. Either a scalar float or tensor of shape [n, m] for particle-specific interaction distances.

  • epsilon (Tensor) – Depth of the potential well (energy scale). Either a scalar float or tensor of shape [n, m] for pair-specific interaction strengths.

Returns:

Pairwise Lennard-Jones interaction energies between particles.

Shape: [n, m]. Each element [i,j] represents the interaction energy between particles i and j.

Return type:

Tensor