BitSet getAtomsWithin(float distance, BitSet bs) {
		if (frame == null)
			return null;
		BitSet bsResult = new BitSet();
		for (int i = frame.getAtomCount(); --i >= 0;) {
			if (bs.get(i)) {
				Atom atom = frame.getAtomAt(i);
				AtomIterator iterWithin = frame.getWithinModelIterator(atom, distance);
				while (iterWithin.hasNext())
					bsResult.set(iterWithin.next().getAtomIndex());
			}
		}
		return bsResult;
	}