Path Simulators

The “main function” in OPS is contained in a PathSimulator object. Since the primary goal of OpenPathSampling is to perform Monte Carlo sampling of path space, the PathSampling variant of PathSimulator has been thoroughly developed for that case.

However, many approaches are very similar to the Monte Carlo path sampling, but not exactly the same. If you’re interested in implementing such a method, then you should create a new subclass of PathSimulator.

We have already implemented several such subclasses, and if this is your goal, we recommend you look at those as examples. In particular, CommittorSimulation, DirectSimulation, and FullBootstrapping will give you an idea of how to implement these.

In general, you need to initialize your custom PathSimulator with a Storage and any other initialization options you need. PathSimulator.__init__() takes the Storage as a parameter. The actual “main function” is called run(). Typically, this takes a number of steps n_steps as an argument.

By inheriting from PathSimulator (and calling its __init__ method) you automatically get a couple useful attributes:

  • save_frequency: Use this to control how often your subclass saves to disk

  • output_stream: Any output from your subclass should write to this.