soft_sphere_pair

torch_sim.models.soft_sphere.soft_sphere_pair(dr, sigma=DEFAULT_SIGMA, epsilon=DEFAULT_EPSILON, alpha=DEFAULT_ALPHA)[source]

Calculate pairwise repulsive energies between soft spheres with finite-range interactions.

Computes a soft-core repulsive potential between particle pairs based on their separation distance, size, and interaction parameters. The potential goes to zero at finite range.

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

  • sigma (Tensor) – Particle diameters. Either a scalar float or tensor of shape [n, m] for particle-specific sizes.

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

  • alpha (Tensor) – Stiffness exponent controlling the interaction decay. Either a scalar float or tensor of shape [n, m].

Returns:

Pairwise interaction energies between particles. Shape: [n, m].

Each element [i,j] represents the repulsive energy between particles i and j.

Return type:

Tensor