def cart2frac_all(coordinates, lattice_array):
    """Convert all cartesian coordinates to fractional."""
    frac_coordinates = deepcopy(coordinates)
    for coord in range(frac_coordinates.shape[0]):
        frac_coordinates[coord] = fractional_from_cartesian(
            frac_coordinates[coord], lattice_array)
    return frac_coordinates
Convert all cartesian coordinates to fractional.