SimTk/mdtraj — pull request #594 by rmcgibbo (2014-09-17 09:36:05+00:00)
Title: Mpharrigan selectionlang2

I've done some more tidying up of #593, including the tests and docs.

The [docs](https://github.com/SimTk/mdtraj/blob/f415a4ee6ea25d978a6ffb90b6791e84c58c8861/docs/atom_selection.rst) are up to date, and explain the scope of the PR.

A couple key things:
- Atom selection queries on the topology.
- Each query is parsed into a python expression that operates on the `Atom`s in the topology tree, as a predicate, and used in `Topology.select()` to find the indices of the atoms matching the predicate.
- No geometric information from the trajectory be considered in the selection queries -- it operates only on the topology
- Every selection query compiles to a python expression that operates on the `Atom`, and the equivalent python source code for that expression is available using `Topology.select_expression` or `mdtraj.core.selection.parse_selection`. So, this doesn't add any new features that are "hidden" behind this weird mini-language and not accessible from the vanila Topology object.
- The tests have ~96% coverage