try {
chemModelRelay.mergeMolecules(end);
} catch (RuntimeException e) {
//move things back, merge is not allowed
Vector2d d = new Vector2d();
d.sub(start2DCenter,end2DCenter);
chemModelRelay.moveBy(atomsToMove, d, null);
chemModelRelay.updateView();
}
}else {
chemModelRelay.moveBy(atomsToMove, null, end);