BitSet getAtomsWithin(float distance, Point3f coord) {
		if (frame == null)
			return null;
		BitSet bsResult = new BitSet();
		for (int i = frame.getAtomCount(); --i >= 0;) {
			Atom atom = frame.getAtomAt(i);
			if (atom.distance(coord) <= distance)
				bsResult.set(atom.atomIndex);
		}
		return bsResult;
	}