def max_dim(elements, coordinates):
atom_vdw_vertical = np.matrix(<EOL>[[atomic_vdw_radius[i.upper()]] for i in elements])<EOL>atom_vdw_horizontal = np.matrix(<EOL>[atomic_vdw_radius[i.upper()] for i in elements])<EOL>dist_matrix = euclidean_distances(coordinates, coordinates)<EOL>vdw_matrix = atom_vdw_vertical + atom_vdw_horizontal<EOL>re_dist_matrix = dist_matrix + vdw_matrix<EOL>final_matrix = np.triu(re_dist_matrix)<EOL>i1, i2 = np.unravel_index(final_matrix.argmax(), final_matrix.shape)<EOL>maxdim = final_matrix[i1, i2]<EOL>return i1, i2, maxdim<EOL>
Return the maximum diameter of a molecule.

Parameters
----------
elements : numpy.ndarray
    An array of all elements (type: str) in a molecule.

coordinates : numpy.ndarray
    An array containing molecule's coordinates.

Returns
-------