sponge.function.lennard_jones_potential
- sponge.function.lennard_jones_potential(epsilon: Tensor, sigma: Tensor, r_ij: Tensor, mask: Tensor = None)[source]
Calculate Lennard-Jones (LJ) potential with \(\epsilon\) and \(\sigma\).
Math:
\[E_{lj}(r_{ij}) = 4 \epsilon \left [\left ( \frac{\sigma}{r_{ij}} \right ) ^{12} - \left ( \frac{\sigma}{r_{ij}} \right ) ^{6} \right]\]- Parameters
epsilon (Tensor) – Tensor of shape (…). Data type is float. Well depth \(\epsilon\).
sigma (Tensor) – Tensor of shape (…). Data type is float. Characteristic distance \(\sigma\).
r_ij (Tensor) – Tensor of shape (…). Data type is float. Distance \(r_{ij}\) between atoms \(i\) and \(i\).
mask (Tensor) – Tensor of shape (…). Data type is bool. Mask for distances \(r_{ij}\). Default:
None
.
- Returns
E_coulomb (Tensor), Tensor of shape (…). Data type is float.
- Supported Platforms:
Ascend
GPU