void decodeBonds(XMLDecoder in, AtomisticView.State viewState) throws Exception {

		super.decodeBonds(in, viewState);

		Reaction reaction = null;
		try {
			reaction = (Reaction) in.readObject();
		}
		catch (Exception e) {
			e.printStackTrace(System.err);
			return;
		}
		if (reaction == null)
			return;
		setType(reaction);
		setConserveEnergy(heatBath == null);

		// any non-bonded atom is supposed to be a radical. We perform this check here in case a free atom's
		// radical state persists to the point when the model is saved.
		reassertFreeRadicals();

	}