Return pore diameter for coordinates optimisation in z direction.

def optimise_z(z, *args):
    """Return pore diameter for coordinates optimisation in z direction."""
    x, y, elements, coordinates = args
    window_com = np.array([x, y, z])
    return pore_diameter(elements, coordinates, com=window_com)[0]