deepmd.dpmodel.utils.region
Module Contents
Functions
| Convert physical coordinates to internal(direct) coordinates. |
| Convert internal(direct) coordinates to physical coordinates. |
| Apply PBC according to the atomic coordinates. |
| Compute the to-face-distance of the simulation cell. |
|
- deepmd.dpmodel.utils.region.phys2inter(coord: numpy.ndarray, cell: numpy.ndarray) numpy.ndarray [source]
Convert physical coordinates to internal(direct) coordinates.
- Parameters:
- coord
np.ndarray
physical coordinates of shape [*, na, 3].
- cell
np.ndarray
simulation cell tensor of shape [*, 3, 3].
- coord
- Returns:
- inter_coord:
np.ndarray
the internal coordinates
- inter_coord:
- deepmd.dpmodel.utils.region.inter2phys(coord: numpy.ndarray, cell: numpy.ndarray) numpy.ndarray [source]
Convert internal(direct) coordinates to physical coordinates.
- Parameters:
- coord
np.ndarray
internal coordinates of shape [*, na, 3].
- cell
np.ndarray
simulation cell tensor of shape [*, 3, 3].
- coord
- Returns:
- phys_coord:
np.ndarray
the physical coordinates
- phys_coord:
- deepmd.dpmodel.utils.region.normalize_coord(coord: numpy.ndarray, cell: numpy.ndarray) numpy.ndarray [source]
Apply PBC according to the atomic coordinates.
- Parameters:
- coord
np.ndarray
orignal coordinates of shape [*, na, 3].
- cell
np.ndarray
simulation cell shape [*, 3, 3].
- coord
- Returns:
- wrapped_coord:
np.ndarray
wrapped coordinates of shape [*, na, 3].
- wrapped_coord:
- deepmd.dpmodel.utils.region.to_face_distance(cell: numpy.ndarray) numpy.ndarray [source]
Compute the to-face-distance of the simulation cell.
- Parameters:
- cell
np.ndarray
simulation cell tensor of shape [*, 3, 3].
- cell
- Returns:
- dist:
np.ndarray
the to face distances of shape [*, 3]
- dist: