sponge.function.coulomb_interaction

View Source On Gitee
sponge.function.coulomb_interaction(q_i: Tensor, q_j: Tensor, r_ij: Tensor, mask: Tensor = None, coulomb_const: float = 1)[source]

Calculate Coulomb interaction.

Math:

Ecoulomb(rij)=kqiqjrij
Parameters
  • q_i (Tensor) – Tensor of shape (…). Data type is float. Charge of the i-th atom qi.

  • q_j (Tensor) – Tensor of shape (…). Data type is float. Charge of the j-th atom qj.

  • r_ij (Tensor) – Tensor of shape (…). Data type is float. Distance rij between atoms i and i.

  • mask (Tensor) – Tensor of shape (…). Data type is bool. Mask for distance rij. Default: None.

  • coulomb_const (float) – Coulomb constant k. Default: 1

Returns

E_coulomb (Tensor), Tensor of shape (…). Data type is float.

Supported Platforms:

Ascend GPU