private boolean evaluateSelectClause(String clause) {

		// "none" clause is a special case for clearing the selection status of all types
		if ("none".equalsIgnoreCase(clause)) {
			deselectAll();
			return true;
		}

		if (!NOT_SELECTED.matcher(clause).find()) { // "not selected" clause is a special case.
			deselectAll();
		}

		Matcher matcher = ATOM.matcher(clause); // select by atom
		if (matcher.find()) {
			BitSet selection = null;
			String str = clause.substring(matcher.end()).trim();
			if (LOGICAL_OPERATOR.matcher(str).find()) { // logical expressions
				selection = parseLogicalExpression(str, BY_ATOM);
			}
			else {
				selection = selectAtoms(str);
			}
			if (!getAsTask())
				out(ScriptEvent.SUCCEEDED, (selection != null ? selection.cardinality() : 0) + " atoms are selected.");
			return true;
		}
		matcher = ELEMENT.matcher(clause); // select by element
		if (matcher.find()) {
			String str = clause.substring(matcher.end()).trim();
			BitSet selection = null;
			if (LOGICAL_OPERATOR.matcher(str).find()) {// logical expressions
				selection = parseLogicalExpression(str, BY_ELEMENT);
			}
			else {
				selection = selectElements(str);
			}
			if (!getAsTask())
				out(ScriptEvent.SUCCEEDED, (selection != null ? selection.cardinality() : 0) + " atoms are selected.");
			return true;
		}
		matcher = RBOND.matcher(clause); // select by radial bond
		if (matcher.find()) {
			String str = clause.substring(matcher.end()).trim();
			BitSet selection = null;
			if (LOGICAL_OPERATOR.matcher(str).find()) {// logical expressions
				selection = parseLogicalExpression(str, BY_RBOND);
			}
			else {
				selection = selectRBonds(str);
			}
			if (!getAsTask())
				out(ScriptEvent.SUCCEEDED, (selection != null ? selection.cardinality() : 0)
						+ " radial bonds are selected.");
			return true;
		}
		matcher = ABOND.matcher(clause); // select by angular bond
		if (matcher.find()) {
			String str = clause.substring(matcher.end()).trim();
			BitSet selection = null;
			if (LOGICAL_OPERATOR.matcher(str).find()) {// logical expressions
				selection = parseLogicalExpression(str, BY_ABOND);
			}
			else {
				selection = selectABonds(str);
			}
			if (!getAsTask())
				out(ScriptEvent.SUCCEEDED, (selection != null ? selection.cardinality() : 0)
						+ " angular bonds are selected.");
			return true;
		}
		matcher = TBOND.matcher(clause); // select by torsional bond
		if (matcher.find()) {
			String str = clause.substring(matcher.end()).trim();
			BitSet selection = null;
			if (LOGICAL_OPERATOR.matcher(str).find()) {// logical expressions
				selection = parseLogicalExpression(str, BY_TBOND);
			}
			else {
				selection = selectTBonds(str);
			}
			if (!getAsTask())
				out(ScriptEvent.SUCCEEDED, (selection != null ? selection.cardinality() : 0)
						+ " torsional bonds are selected.");
			return true;
		}
		matcher = MOLECULE.matcher(clause); // select by molecule
		if (matcher.find()) {
			String str = clause.substring(matcher.end()).trim();
			BitSet selection = null;
			if (LOGICAL_OPERATOR.matcher(str).find()) { // logical expressions
				selection = parseLogicalExpression(str, BY_MOLECULE);
			}
			else {
				selection = selectMolecules(str);
			}
			if (!getAsTask())
				out(ScriptEvent.SUCCEEDED, (selection != null ? selection.cardinality() : 0)
						+ " molecules are selected.");
			return true;
		}
		out(ScriptEvent.FAILED, "Unrecognized keyword in: " + clause);
		return false;
	}