mindspore.ops.Dihedral14LJForceWithDirectCF

class mindspore.ops.Dihedral14LJForceWithDirectCF(nb14_numbers, atom_numbers)[source]

Calculate the Lennard-Jones part and the Coulomb part of force correction for each necessary dihedral 1,4 terms.

Because there is a large amount of inputs and each of them are related, there is no way to construct Examples using random methods. For details, refer the webpage SPONGE in MindSpore.

The calculation formula of the Lennard-Jones part is the same as operator Dihedral14LJForce(), and the Coulomb part is as follows:

\[dr = (x_a-x_b, y_a-y_b, z_a-z_b)\]
\[F = -k*q_a*q_b/|r|^3*dr\]
Parameters
  • nb14_numbers (int32) – the number of necessary dihedral 1,4 terms m.

  • atom_numbers (int32) – the number of atoms n.

Inputs:
  • uint_crd_f (Tensor) - The unsigned int coordinate value of each atom. The data type is uint32 and the shape is \((n, 3)\).

  • LJ_type (Tensor) - The Lennard-Jones type of each atom. The data type is int32 and the shape is \((n,)\).

  • charge (Tensor) - The charge of each atom. The data type is float32 and the shape is \((n,)\).

  • boxlength_f (Tensor) - The length of molecular simulation box in 3 dimensions. The data type is float32 and the shape is \((3,)\).

  • a_14 (Tensor) - The first atom index of each dihedral 1,4 term. The data type is int32 and the shape is \((m,)\).

  • b_14 (Tensor) - The second atom index of each dihedral 1,4 term. The data type is int32 and the shape is \((m,)\).

  • lj_scale_factor (Tensor) - The scale factor for the Lennard-Jones part of force correction of each dihedral 1,4 term. The data type is float32 and the shape is \((m,)\).

  • cf_scale_factor (Tensor) - The scale factor for the Coulomb part of force correction for each dihedral 1,4 terms. The data type is float32 and the shape is \((m,)\).

  • LJ_type_A (Tensor) - The A parameter in Lennard-Jones scheme of each atom pair type. q is the number of atom pair. The data type is float32 and the shape is \((q,)\).

  • LJ_type_B (Tensor) - The B parameter in Lennard-Jones shceme of each atom pair type. q is the number of atom pair. The data type is float32 and the shape is \((q,)\).

Outputs:
  • frc_f (Tensor) - The force felt by each atom. The data type is float32 and the shape is \((n, 3)\)

Supported Platforms:

GPU