choderalab/msm-tis — pull request #30 by dwhswenson (2014-10-13 14:15:42+00:00)
Title: ExitsXEnsemble/EntersXEnsemble

Ensembles that check whether you enter or exit a given volume during the trajectory.

The previously existing VolumeEnsembles only check whether a frame is inside/outside of the given volume. Identifying a crossing requires the assumption that you started on the other side; i.e., they can't distinguish between [out, in] and [in, out]: the first contains no exits and one entrance, the second contains one exit and no entrances. The ensembles in this PR do distinguish between those cases.

This PR also includes a rather extensive unit test setup for ensembles. So far I've only implemented the tests for these two ensembles, but it should be easy to add tests for our other volume ensembles. Includes some tricks to minimize test lines of code, maximize test code readability, and still generate clear error messages when tests fail.