Generally, I believe hammers can touch, and be kept in contact with frog spawns. Torches are more aggressive and shouldn't be kept where they can touch anything but other torches. I think you would still have to be careful and keep an eye out for stinging, especially if one hammer isn't as healthy as another beside it. If one is causing the other to close up, move it, ASAP. I don't know if this was exactly what you were looking for, but I think it was, lol.
Just to be on the safe side if you aren't sure, I would slowly bring them closer together to be able to watch for warfare with the least amount of damage possible. Perhaps put one directly "downwind" of the other, and see if sweepers are put out in response.