private BitSet selectMolecules(String str) {
		MolecularModel mm = (MolecularModel) model;
		if (mm.molecules == null)
			return null;
		int n = mm.molecules.size();
		if (n <= 0)
			return null;
		BitSet bs = new BitSet(n);
		if ("selected".equalsIgnoreCase(str)) {
			synchronized (mm.molecules.getSynchronizationLock()) {
				for (int i = 0; i < n; i++) {
					if (mm.molecules.get(i).isSelected())
						bs.set(i);
				}
			}
			return bs;
		}
		if (selectFromCollection(str, n, bs)) {
			mm.molecules.setSelectionSet(bs);
			return bs;
		}
		out(ScriptEvent.FAILED, "Unrecognized expression: " + str);
		return null;
	}