Return optimised pore diameter and it's COM.

def opt_pore_diameter(elements, coordinates, bounds=None, com=None, **kwargs):
    """Return optimised pore diameter and it's COM."""
    args = elements, coordinates
    if com is not None:
        pass
    else:
        com = center_of_mass(elements, coordinates)
    if bounds is None:
        pore_r = pore_diameter(elements, coordinates, com=com)[0] / 2
        bounds = (
            (com[0]-pore_r, com[0]+pore_r),
            (com[1]-pore_r, com[1]+pore_r),
            (com[2]-pore_r, com[2]+pore_r)
        )
    minimisation = minimize(
        correct_pore_diameter, x0=com, args=args, bounds=bounds)
    pored = pore_diameter(elements, coordinates, com=minimisation.x)
    return (pored[0], pored[1], minimisation.x)