morse_pair¶
- torch_sim.models.morse.morse_pair(dr, sigma=DEFAULT_SIGMA, epsilon=DEFAULT_EPSILON, alpha=DEFAULT_ALPHA)[source]¶
Calculate pairwise Morse potential energies between particles.
Implements the Morse potential that combines short-range repulsion with longer-range attraction. The potential has a minimum at r=sigma and approaches -epsilon as r→∞.
The functional form is: V(r) = epsilon * (1 - exp(-alpha*(r-sigma)))^2 - epsilon
- 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 equilibrium 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.
alpha (Tensor) – Controls the width of the potential well. Larger values give a narrower well. Either a scalar float or tensor of shape [n, m].
- Returns:
- Pairwise Morse interaction energies between particles.
Shape: [n, m]. Each element [i,j] represents the interaction energy between particles i and j.
- Return type: