structuretoolkit.analyse.spatial.get_mean_positions#
- structuretoolkit.analyse.spatial.get_mean_positions(positions: ndarray, cell: ndarray, pbc: ndarray, labels: ndarray) ndarray[source]#
This function calculates the average position(-s) across periodic boundary conditions according to the labels
- Parameters:
positions (numpy.ndarray (n, 3)) – Coordinates to be averaged
cell (numpy.ndarray (3, 3)) – Cell dimensions
pbc (numpy.ndarray (3,)) – Periodic boundary conditions (in boolean)
labels (numpy.ndarray (n,)) – labels according to which the atoms are grouped
- Returns:
mean positions
- Return type:
(numpy.ndarray)