BitSet withinGroup(BitSet bs) {
		// Logger.debug("withinGroup");
		Group groupLast = null;
		BitSet bsResult = new BitSet();
		for (int i = getAtomCount(); --i >= 0;) {
			if (!bs.get(i))
				continue;
			Atom atom = frame.getAtomAt(i);
			Group group = atom.getGroup();
			if (group != groupLast) {
				group.selectAtoms(bsResult);
				groupLast = group;
			}
		}
		return bsResult;
	}