centroid#

biotite.structure.centroid(atoms: Coord[N] | MultiCoord[M, N]) ndarray[tuple[XYZ], dtype[floating]] | ndarray[tuple[M, XYZ], dtype[floating]][source]#

Measure the centroid of a structure.

Parameters:
atomsndarray or AtomArray or AtomArrayStack

The structures to determine the centroid from. Alternatively an ndarray containing the coordinates can be provided.

Returns:
centroidfloat or ndarray

The centroid of the structure(s). ndarray is returned when an AtomArrayStack is given (centroid for each model).