<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def optimise_xy(xy, *args):
 """Return negative pore diameter for x and y coordinates optimisation."""

    z, elements, coordinates = args
    window_com = np.array([xy[0], xy[1], z])
    return -pore_diameter(elements, coordinates, com=window_com)[0]