biotite.structure.distance¶

biotite.structure.
distance
(atoms1, atoms2, box=None)[source]¶ Measure the euclidian distance between atoms.
 Parameters
 atoms1, atoms2ndarray or Atom or AtomArray or AtomArrayStack
The atoms to measure the distances between. The dimensions may ary. Alternatively an ndarray containing the coordinates can be provided. Usual NumPy broadcasting rules apply.
 boxndarray, shape=(3,3) or shape=(m,3,3), optional
If this parameter is set, periodic boundary conditions are taken into account (minimumimage convention), based on the box vectors given with this parameter. The shape (m,3,3) is only allowed, when the input coordinates comprise multiple models.
 Returns
 distfloat or ndarray
The atom distances. The shape is equal to the shape of the input atoms with the highest dimensionality minus the last axis.
See also