deepmd.jax.jax2tf.region#

Functions#

phys2inter(→ tensorflow.experimental.numpy.ndarray)

Convert physical coordinates to internal(direct) coordinates.

inter2phys(→ tensorflow.experimental.numpy.ndarray)

Convert internal(direct) coordinates to physical coordinates.

normalize_coord(→ tensorflow.experimental.numpy.ndarray)

Apply PBC according to the atomic coordinates.

to_face_distance(→ tensorflow.experimental.numpy.ndarray)

Compute the to-face-distance of the simulation cell.

b_to_face_distance(cell)

Module Contents#

deepmd.jax.jax2tf.region.phys2inter(coord: tensorflow.experimental.numpy.ndarray, cell: tensorflow.experimental.numpy.ndarray) tensorflow.experimental.numpy.ndarray[source]#

Convert physical coordinates to internal(direct) coordinates.

Parameters:
coordtnp.ndarray

physical coordinates of shape [*, na, 3].

celltnp.ndarray

simulation cell tensor of shape [*, 3, 3].

Returns:
inter_coord: tnp.ndarray

the internal coordinates

deepmd.jax.jax2tf.region.inter2phys(coord: tensorflow.experimental.numpy.ndarray, cell: tensorflow.experimental.numpy.ndarray) tensorflow.experimental.numpy.ndarray[source]#

Convert internal(direct) coordinates to physical coordinates.

Parameters:
coordtnp.ndarray

internal coordinates of shape [*, na, 3].

celltnp.ndarray

simulation cell tensor of shape [*, 3, 3].

Returns:
phys_coord: tnp.ndarray

the physical coordinates

deepmd.jax.jax2tf.region.normalize_coord(coord: tensorflow.experimental.numpy.ndarray, cell: tensorflow.experimental.numpy.ndarray) tensorflow.experimental.numpy.ndarray[source]#

Apply PBC according to the atomic coordinates.

Parameters:
coordtnp.ndarray

original coordinates of shape [*, na, 3].

celltnp.ndarray

simulation cell shape [*, 3, 3].

Returns:
wrapped_coord: tnp.ndarray

wrapped coordinates of shape [*, na, 3].

deepmd.jax.jax2tf.region.to_face_distance(cell: tensorflow.experimental.numpy.ndarray) tensorflow.experimental.numpy.ndarray[source]#

Compute the to-face-distance of the simulation cell.

Parameters:
celltnp.ndarray

simulation cell tensor of shape [*, 3, 3].

Returns:
dist: tnp.ndarray

the to face distances of shape [*, 3]

deepmd.jax.jax2tf.region.b_to_face_distance(cell)[source]#