sponge.function

API Name

Description

Supported Platforms

sponge.function.calc_angle_by_vectors

Compute angle between two vectors.

Ascend GPU

sponge.function.calc_angle_nopbc

Compute angle \(\angle{ABC}\) formed by the position coordinates of three positions

Ascend GPU

sponge.function.calc_angle_pbc

Compute angle \(\angle{ABC}\) formed by the position coordinates of three positions

Ascend GPU

sponge.function.calc_angle

Compute angle formed by three positions \(A\), \(B\) and \(C\) with or without periodic boundary condition.

Ascend GPU

sponge.function.calc_distance_nopbc

Compute distance between position A and B without perodic bundary condition.

Ascend GPU

sponge.function.calc_distance_pbc

Compute distance between position \(A\) and \(B\) at perodic bundary condition.

Ascend GPU

sponge.function.calc_distance

Compute distance between position \(A\) and \(B\).

Ascend GPU

sponge.function.calc_torsion_by_vectors

Compute torsion angle formed by two direction vectors \(\vec{v_1}\) and \(\vec{v_2}\)

Ascend GPU

sponge.function.calc_torsion_nopbc

Compute torsion angle A-B-C-D formed by four positions \(A\), \(B\), \(C\) and \(D\) without periodic boundary condition.

Ascend GPU

sponge.function.calc_torsion_pbc

Compute torsion angle A-B-C-D formed by four positions \(A\), \(B\), \(C\) and \(D\) at periodic boundary condition.

Ascend GPU

sponge.function.calc_torsion

Compute torsion angle \(A-B-C-D\) formed by four positions \(A\), \(B\), \(C\) and \(D\)

Ascend GPU

sponge.function.calc_vector_nopbc

Compute vector from initial point to terminal point without perodic bundary condition.

Ascend GPU

sponge.function.calc_vector_pbc

Compute vector from initial point to terminal point at perodic bundary condition.

Ascend GPU

sponge.function.calc_vector

Compute vector from initial point to terminal point.

Ascend GPU

sponge.function.energy_convert

convert energy according to difference units.

Ascend GPU CPU

sponge.function.Energy

Energy.

Ascend GPU CPU

sponge.function.gather_value

Gather value from the last axis (axis=-1) of the tensor according to index.

Ascend GPU

sponge.function.gather_vector

Gather vector from the penultimate axis (axis=-2) of the tensor according to index.

Ascend GPU

sponge.function.get_energy_ref

get energy reference.

Ascend GPU CPU

sponge.function.get_energy_unit_name

get the name of energy unit.

Ascend GPU CPU

sponge.function.get_energy_unit

get energy unit.

Ascend GPU CPU

sponge.function.get_integer

get integer type of the input value

Ascend GPU CPU

sponge.function.get_length_ref

get length reference.

Ascend GPU CPU

sponge.function.get_length_unit_name

get name of length unit.

Ascend GPU CPU

sponge.function.get_length_unit

get length unit.

Ascend GPU CPU

sponge.function.get_ndarray

get ndarray type of the input value

Ascend GPU CPU

sponge.function.GetDistance

The class to calculate distance with or without PBC box

To Be Developed

sponge.function.GetDistanceShift

Module for calculating B matrix whose dimensions are: C.

To Be Developed

sponge.function.GetShiftGrad

Module for calculating the differentiation of B matrix whose dimensions are: K*N*D.

To Be Developed

sponge.function.GetVector

The class to get vector with or without PBC box

To Be Developed

sponge.function.length_convert

convert length according to different units.

Ascend GPU CPU

sponge.function.Length

Length.

Ascend GPU CPU

sponge.function.pbc_box_reshape

Reshape the pbc_box as the same ndim.

Ascend GPU

sponge.function.pbc_image

calculate the periodic image of the PBC box

Ascend GPU

sponge.function.set_global_length_unit

set global length unit.

Ascend GPU CPU

sponge.function.set_global_energy_unit

set global energy unit.

Ascend GPU CPU

sponge.function.set_global_units

set global units.

Ascend GPU CPU

sponge.function.Units

Unit class to record and convert the length and energy units.

Ascend GPU CPU

sponge.function.vector_in_pbc

Make the value of vector \(\vec{v}\) at a single PBC box \(\vec{L}\).

Ascend GPU

sponge.function.VelocityGenerator

A class to generate velocities for atoms in system according to temperature

To Be Developed

sponge.function.all_none

Return True if ALL values x in the iterable is None..

Ascend GPU CPU

sponge.function.all_not_none

Return True if ALL values x in the iterable is Not None.

Ascend GPU CPU

sponge.function.any_none

Return True if ANY values x in the iterable is None.

Ascend GPU CPU

sponge.function.any_not_none

Return True if ANY values x in the iterable is NOT None.

Ascend GPU CPU

sponge.function.bonds_in

Return if batch_bond exists in bonds.

To Be Developed

sponge.function.check_broadcast

Check whether the two shapes match the rule of broadcast.

Ascend GPU CPU

sponge.function.concat_first_dim

Connect tensor in the first axis (axis=0).

Ascend GPU CPU

sponge.function.concat_last_dim

Connect tensor in the last axis (axis=-1).

Ascend GPU CPU

sponge.function.concat_penulti

Connect tensor in the penultimate axis (axis=-2).

Ascend GPU CPU

sponge.function.coordinate_in_pbc

get coordinate in main PBC box

Ascend GPU

sponge.function.coulomb_interaction

Calculate Coulomb interaction.

Ascend GPU

sponge.function.get_arguments

get arguments of a class.

Ascend GPU CPU

sponge.function.get_energy

Get the tensor of energy in specific unit

To Be Developed

sponge.function.get_initializer

get initializer by name.

Ascend GPU CPU

sponge.function.get_length

Get the tensor of length in specific unit

To Be Developed

sponge.function.get_ms_array

get mindspore.Tensor type of the input value

Ascend GPU CPU

sponge.function.get_tensor

get mindspore.Tensor type of the input value

Ascend GPU CPU

sponge.function.hamiltonian_product

Get the Hamiltonian-product of the given quaternion and tensor.

To Be Developed

sponge.function.identity

Returns a Tensor with the same shape and contents as input.

Ascend GPU CPU

sponge.function.keepdims_mean

Reduces a dimension to 1 by averaging the elements in the dimension of x along the axis, and the dimensions of the output and input are the same.

Ascend GPU CPU

sponge.function.keepdims_prod

Reduces a dimension to 1 by multiplying the elements in the dimension of x along the axis, and the dimensions of the output and input are the same.

Ascend GPU CPU

sponge.function.keepdims_sum

Reduces a dimension to 1 by summing the elements in the dimension of x along the axis, and the dimensions of the output and input are the same.

Ascend GPU CPU

sponge.function.lennard_jones_potential

Calculate Lennard-Jones (LJ) potential with \(\epsilon\) and \(\sigma\).

Ascend GPU

sponge.function.lennard_jones_potential2

Calculate Lennard-Jones (LJ) potential with \(\epsilon\) and \(r_0\).

Ascend GPU

sponge.function.periodic_difference

get value of difference between periodic variables.

Ascend GPU

sponge.function.periodic_variable

get the value in the periodic range.

Ascend GPU

sponge.function.quaternion_inverse

Get the quaternion conjugate of the given tensor.

To Be Developed

sponge.function.quaternion_multiply

Get the quaternion multiplication of the given tensor.

To Be Developed

sponge.function.reduce_all

Reduces a dimension of a tensor by the "logicalAND" of all elements in the dimension, by default.

Ascend GPU CPU

sponge.function.reduce_any

Reduces a dimension of a tensor by the "logical OR" of all elements in the dimension, by default.

Ascend GPU CPU

sponge.function.reduce_prod

Reduces a dimension of a tensor by multiplying all elements in the dimension, by default.

Ascend GPU CPU

sponge.function.squeeze_first_dim

Return the Tensor after deleting the dimension of size 1 from the first axis (axis=0).

Ascend GPU CPU

sponge.function.squeeze_last_dim

Return the Tensor after deleting the dimension of size 1 from the last axis (axis=-1).

Ascend GPU CPU

sponge.function.squeeze_penulti

Return the Tensor after deleting the dimension of size 1 from the penultimate axis (axis=-2).

Ascend GPU CPU

sponge.function.stack_first_dim

Stacks a list of tensors in the first axis (axis=0).

Ascend GPU CPU

sponge.function.stack_last_dim

Stacks a list of tensors in the last axis (axis=-1).

Ascend GPU CPU

sponge.function.stack_penulti

Stacks a list of tensors in the penultimate axis (axis=-2).

Ascend GPU CPU