Faster Path Density Analysis in OPS

A previous module introduced a path density analysis in OpenPathSampling. However, the interpolation scheme used in that was rather slow. This module makes it so that users can change interpolation schemes, and introduces two faster options.

Purpose of Module

As discussed in the module Path Density for OpenPathSampling, the path density is a useful tool for analyzing mechanisms in transition path sampling. One of the features of the path density, which distiguishes if from a frame-based density, is that it uses interpolation over the trajectory. That is, histogram bins that are traversed are included, even if no snapshot falls in them.

The interpolation approach introduced in the previous module worked by subdividing intervals to find all bins that are crossed. This approach is exact, but slow. This module refactors the path density so that the interpolation algorithm can be provided by the user, and also provides two new (and faster) interpolation approaches:

  • BresenhamInterpolation: Interpolation using the Bresenham line drawing algorithm
  • BresenhamLikeInterpolation: An interpolation scheme similar to Bresenham, but using floats instead of integers.

Background Information

This module builds on OpenPathSampling, a Python package for path sampling simulations. To learn more about OpenPathSampling, you might be interested in reading:

Testing

Tests in OpenPathSampling use pytest.

This module has been included in the OpenPathSampling core as of version 1.1. Its tests can be run by installing pytest and OPS, and running the command py.test --pyargs  openpathsampling.

Source Code

This module has been merged into OpenPathSampling. It is composed of the following pull request: