contact_map.frequency_task¶
Task-based implementation of ContactFrequency.
The overall algorithm is:
Identify how we’re going to slice up the trajectory into task-based chunks (
block_slices(),default_slices())- On each node
Load the trajectory segment (
load_trajectory_task())Run the analysis on the segment (
map_task())
Once all the results have been collected, combine them (
reduce_all_results())
Notes
Includes versions where messages are Python objects and versions (labelled with _json) where messages have been JSON-serialized. However, we don’t yet have a solution for JSON serialization of MDTraj objects, so if JSON serialization is the communication method, the loading of the trajectory and the calculation of the contacts must be combined into a single task.
Functions
|
Determine slices for splitting the input array. |
|
Calculate default slices from number of workers. |
|
Task for loading file. |
|
Task to be mapped to all subtrajectories. |
|
JSON-serialized version of |
|
Combine multiple |
|
JSON-serialized version of |