sponge.function.lennard_jones_potential2
- sponge.function.lennard_jones_potential2(epsilon: Tensor, r_0: Tensor, r_ij: Tensor, mask: Tensor = None)[source]
Calculate Lennard-Jones (LJ) potential with \(\epsilon\) and \(r_0\).
Math:
\[E_{lj}(r_{ij}) = 4 \epsilon \left [\frac{1}{4} \left ( \frac{r_0}{r_{ij}} \right ) ^{12} - \frac{1}{2} \left ( \frac{r_0}{r_{ij}} \right ) ^{6} \right]\]- Parameters
epsilon (Tensor) – Tensor of shape (…). Data type is float. Well depth \(\epsilon\).
r_0 (Tensor) – Tensor of shape (…). Data type is float. Atomic radius \(r_0\).
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