mindspore.ops.AngleForce

class mindspore.ops.AngleForce(*args, **kwargs)[source]

Calculate the force exerted by angles made of 3 atoms on the corresponding atoms. Assume the number of angles is m and the number of atoms is n.

\[dr_{ab} = (x_b-x_a, y_b-y_a, z_b-z_a)\]
\[dr_{cb} = (x_b-x_c, y_b-y_c, z_b-z_c)\]
\[theta = arccos(inner_product(dr_{ab}, dr_{cb})/|dr_{ab}|/|dr_{cb}|)\]
\[F_a = -2*k*(theta-theta_0)/sin(theta)*[cos(theta)/|dr_{ab}|^2*dr_{ab} - 1/|dr_{ab}|/|dr_{cb}|*dr_{cb}]\]
\[F_c = -2*k*(theta-theta_0)/sin(theta)*[cos(theta)/|dr_{cb}|^2*dr_{cb} - 1/|dr_{cb}|/|dr_{ab}|*dr_{ab}]\]
\[F_b = -F_a - F_c\]
Parameters

angle_numbers (int32) – the number of angles m.

Inputs:
  • uint_crd_f (Tensor, uint32) - [n, 3], the unsigned int coordinate value of each atom.

  • scaler_f (Tensor, float32) - [3,], the 3-D scale factor between the real space float coordinates and the unsigned int coordinates.

  • atom_a (Tensor, int32) - [m,], the 1st atom index of each angle.

  • atom_b (Tensor, int32) - [m,], the 2nd and the central atom index of each angle.

  • atom_c (Tensor, int32) - [m,], the 3rd atom index of each angle.

  • angle_k (Tensor, float32) - [m,], the force constant for each angle.

  • angle_theta0 (Tensor, float32) - [m,], the equilibrium position value for each angle.

Outputs:
  • frc_f (Tensor, float32) - [n, 3], the force felt by each atom.

Supported Platforms:

GPU