mindspore.ops.LJEnergy
- class mindspore.ops.LJEnergy(atom_numbers, cutoff_square)[source]
Calculate the Van der Waals interaction energy described by Lennard-Jones potential for each atom. Assume the number of atoms is n, and the number of Lennard-Jones types for all atoms is P, which means there will be q = P*(P+1)/2 types of possible Lennard-Jones interactions for all kinds of atom pairs.
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.
\[dr = (x_a-x_b, y_a-y_b, z_a-z_b)\]\[E = A/|dr|^{12} - B/|dr|^{6}\]- Parameters
atom_numbers (int32) – the number of atoms, n.
cutoff_square (float32) – the square value of cutoff.
- Inputs:
- uint_crd (Tensor) - The unsigned int coordinate value of each atom.
The data type is uint32 and the shape is \((n, 3)\)
- LJtype (Tensor) - The Lennard-Jones type of each atom.
The data type is int32 and the shape is \((n,)\)
- charge (Tensor) - The charge carried by each atom.
The data type is float32 and the shape is \((n,)\)
scaler (Tensor) - The scale factor between real space coordinate and its unsigned int value. The data type is float32 and the shape is \((3,)\)
nl_numbers - (Tensor) - The each atom. The data type is int32 and the shape is \((n,)\)
nl_serial - (Tensor) - The neighbor list of each atom, the max number is 800. The data type is int32 and the shape is \((n, 800)\).
d_LJ_A (Tensor) - The Lennard-Jones A coefficient of each kind of atom pair. q is the number of atom pair. The data type is float32 and the shape is \((q,)\).
d_LJ_B (Tensor) - The Lennard-Jones B coefficient of each kind of atom pair. q is the number of atom pair. The data type is float32 and the shape is \((q,)\).
- Outputs:
- d_LJ_energy_atom (Tensor) - The Lennard-Jones potential energy of each atom.
The data type is float32 and the shape is \((n,)\).
d_LJ_energy_sum (Scalar), the sum of Lennard-Jones potential energy of each atom. The data type is float32.
- Supported Platforms:
GPU