def pore_diameter(elements, coordinates, com=None):
if com is None:<EOL><INDENT>com = center_of_mass(elements, coordinates)<EOL><DEDENT>atom_vdw = np.array([[atomic_vdw_radius[x.upper()]] for x in elements])<EOL>dist_matrix = euclidean_distances(coordinates, com.reshape(<NUM_LIT:1>, -<NUM_LIT:1>))<EOL>re_dist_matrix = dist_matrix - atom_vdw<EOL>index = np.argmin(re_dist_matrix)<EOL>pored = re_dist_matrix[index][<NUM_LIT:0>] * <NUM_LIT:2><EOL>return (pored, index)<EOL>
Return pore diameter of a molecule.