def optimise_xy(xy, *args):
z, elements, coordinates = args<EOL>window_com = np.array([xy[<NUM_LIT:0>], xy[<NUM_LIT:1>], z])<EOL>return -pore_diameter(elements, coordinates, com=window_com)[<NUM_LIT:0>]<EOL>
Return negative pore diameter for x and y coordinates optimisation.