for example: user draws two benzene molecules (from template perhaps), then drags one close enough to the other that two atoms on one molecule overlap (within some tolerance distance) with the other, the resulting merge creates a napthalene. Napthalene provides additional challenge to get the double-bond rendering correct which is probably a separate issue from merging.
GUI should provide user feedback to make this operation reasonably intuitive.