BitSet withinChain(BitSet bs) {
		Chain chainLast = null;
		BitSet bsResult = new BitSet();
		for (int i = getAtomCount(); --i >= 0;) {
			if (!bs.get(i))
				continue;
			Atom atom = frame.getAtomAt(i);
			Chain chain = atom.getChain();
			if (chain != chainLast) {
				chain.selectAtoms(bsResult);
				chainLast = chain;
			}
		}
		return bsResult;
	}