repeat_box_coord#
- biotite.structure.repeat_box_coord(coord: ndarray[tuple[N, XYZ], dtype[floating]] | ndarray[tuple[M, N, XYZ], dtype[floating]], box: ndarray[tuple[XYZ, XYZ], dtype[floating]] | ndarray[tuple[M, XYZ, XYZ], dtype[floating]], amount: int = 1) tuple[ndarray[tuple[Any, XYZ], dtype[floating]] | ndarray[tuple[M, Any, XYZ], dtype[floating]], ndarray[tuple[Any], dtype[integer]]][source]#
Similar to
repeat_box(), repeat the coordinates in a box by duplicating and placing them in adjacent boxes.- Parameters:
- coordndarray, dtype=float, shape=(n,3) or shape=(m,n,3)
The coordinates to be repeated.
- boxndarray, dtype=float, shape=(3,3) or shape=(m,3,3)
The reference box. If only one box is provided, i.e. the shape is (3,3), the box is used for all models m, if the coordinates shape is (m,n,3).
- amountint, optional
The amount of boxes that are created in each direction of the central box. Hence, the total amount of boxes is \((1 + 2 \cdot \text{amount}) ^ 3\). By default, one box is created in each direction, totalling in 27 boxes.
- Returns:
- repeatedndarray, dtype=float, shape=(p,3) or shape=(m,p,3)
The repeated coordinates, with the same dimension as the input coord. Includes the original coordinates (central box) in the beginning of the array.
- indicesndarray, dtype=int, shape=(p,3)
Indices to the coordinates in the original array. Equal to
numpy.tile(np.arange(coord.shape[-2]), (1 + 2 * amount) ** 3).