mindspore.ops.BondForceWithAtomVirial

class mindspore.ops.BondForceWithAtomVirial(bond_numbers, atom_numbers)[source]

Calculate bond force and the virial coefficient caused by simple harmonic bond for each atom together.

The calculation formula of the force part is the same as operator BondForce().

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 Virial part is as follows:

\[dr = (x_1-x_2, y_1-y_2, z_1-z_2)\]
\[virial = |dr|*(|dr| - r_0)*k\]
Parameters
  • atom_numbers (int32) – the number of atoms n.

  • bond_numbers (int32) – the number of harmonic bonds m.

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

  • scaler_f (Tensor) - The 3-D scale factor (x, y, z), between the real space float coordinates and the unsigned int coordinates. The data type is float32 and the shape is \((3,)\).

  • atom_a (Tensor) - The first atom index of each bond. The data type is int32 and the shape is \((m,)\).

  • atom_b (Tensor) - The second atom index of each bond. The data type is int32 and the shape is \((m,)\).

  • bond_k (Tensor) - The force constant of each bond. The data type is float32 and the shape is \((m,)\).

  • bond_r0 (Tensor) - The equlibrium length of each bond. The data type is float32 and the shape is \((m,)\).

Outputs:
  • frc_f (Tensor) - Same as operator BondForce(). The data type is float32 and the shape is \((n, 3)\).

  • atom_v (Tensor) - The accumulated virial coefficient for each atom. The data type is float32 and the shape is \((n,)\).

Supported Platforms:

GPU