A robust and efficient algorithm for determining molecular connectivities.