deepmd.jax.jax2tf.format_nlist#
Functions#
| Format neighbor list. |
Module Contents#
- deepmd.jax.jax2tf.format_nlist.format_nlist(extended_coord: tensorflow.experimental.numpy.ndarray, nlist: tensorflow.experimental.numpy.ndarray, nsel: int, rcut: float)[source]#
Format neighbor list.
If nnei == nsel, do nothing; If nnei < nsel, pad -1; If nnei > nsel, sort by distance and truncate.
- Parameters:
- extended_coord
The extended coordinates of the atoms. shape: nf x nall x 3
- nlist
The neighbor list. shape: nf x nloc x nnei
- nsel
The number of selected neighbors.
- rcut
The cutoff radius.
- Returns:
nlistThe formatted neighbor list. shape: nf x nloc x nsel