public boolean translateWholeModel(double dx, double dy) {
		boolean b = true;
		int n = 0;
		for (int i = 0; i < numberOfAtoms; i++) {
			atom[i].storeCurrentState();
			atom[i].translateBy(dx, dy);
			if (!boundary.contains(atom[i].rx, atom[i].ry)) {
				b = false;
				n = i;
				break;
			}
		}
		if (b) {
			for (int i = 0; i < numberOfAtoms; i++) {
				PointRestraint pr = atom[i].getRestraint();
				if (pr != null) {
					pr.setX0(pr.getX0() + dx);
					pr.setY0(pr.getY0() + dy);
				}
			}
		} else {
			for (int i = 0; i <= n; i++)
				atom[i].translateBy(-dx, -dy);
			return false;
		}
		if (obstacles != null) {
			int size = obstacles.size();
			RectangularObstacle obs = null;
			for (int i = 0; i < size; i++) {
				obs = obstacles.get(i);
				obs.storeCurrentState();
				obs.translateBy(dx, dy);
				if (!boundary.contains(obs)) {
					b = false;
					n = i;
					break;
				}
			}
		}
		if (!b) {
			for (int i = 0; i < numberOfAtoms; i++)
				atom[i].translateBy(-dx, -dy);
			for (int i = 0; i <= n; i++)
				obstacles.get(i).translateBy(-dx, -dy);
			return false;
		}
		if (view.getUseJmol())
			view.refreshJmol();
		view.repaint();
		return true;
	}