public int compare(Atom a1, Atom a2) {
			// TODO: something like return Integer.compare(a1.layer,a2.layer)
			//       would be more efficient
			if     (a1.layer < a2.layer) return -1;
			else if(a1.layer > a2.layer) return 1;
			else                         return 0;
		}