int getMoleculeCountInModel(int modelIndex) {
		// not implemented for pop-up menu -- will slow it down.
		int n = 0;
		if (moleculeCount == 0)
			getMolecules();
		for (int i = 0; i < modelCount; i++) {
			if (modelIndex == i || modelIndex < 0)
				n += mmset.getModel(i).moleculeCount;
		}
		return n;
	}