Trajectory Analysis Tutorial

GROMACS provides a framework that enables flexible trajectory analysis. This framework consists of several components, which can be used individually, but in most cases, it is best to use the functions of all components to make full use of this framework. The main features of the framework are as follows:

  • Supports flexible selection of a set of coordinates for analysis, these coordinates can be dynamic, that is, different atoms are selected in different trajectory frames.
  • Support the analysis of the mass center/geometric center of a group of atoms.
  • Supports parallel processing of each frame. The framework is designed to support parallel analysis in the case of multiple frames (different frames can be processed independently).
  • Access to the basic analysis library. The reusable module provides functions such as calculating average values and histograms.
  • Tool code can focus on actual analysis. These tools implement functions by subclassing an abstract class and implementing purely virtual methods of choice.


High-level framework

The trajectory analysis framework (trajectory analysis) module provides a high-level framework that integrates all parts. It provides an abstract base class for the analysis tool module (gmx::TrajectoryAnalysisModule trajectory analysis module), and serves as a command-line tool for running such a module ( gmx::TrajectoryAnalysisCommandLineRunner trajectory analysis command line converter) provides the code. For more details, please refer to the analysis template and trajectory analysis module documentation.


The analysis and evaluation (selection) module of analysis selection provides support for selection. Most of the work of managing selection is done by command line running programs and frameworks. There are only two major categories of analysis tool codes: gmx::SelectionOption selection options and associated classes are used to declare the number and types of choices accepted by the tool. The tool receives a set of gmx::Selection objects as the value of the selection options. These classes provide evaluation values for the selection during the analysis process. The framework evaluates the value of the options in each frame, so that when the tool is called, it can be the current The frame accesses the selection in the selection object owned by gmx::Selection.

The parallelizable processing of output data (analysis data) module provides two things:

  • Supports uniform provision of output data from analysis tools. The tool calculates its output values and puts them into data objects for further processing. This allows two things:

✓ The reusable data module can be used for routine post-processing with different tools.

✓ Data objects provide parallelization support.

  • Set up reusable data modules for post-processing data. These functions include averaging data, calculating histograms, and plotting data to files, etc. Many of these modules also provide their output as data objects, allowing further data modules to be attached to them.

Input options

The extensible processing (option) module of options can be used to declare the input data of the tool (usually command-line options, including input files and selections). The analysis tool code receives one of the instances of the gmx::IOptionsContainer option container for its initialization method, and use it to provide its input options. Basic options are declared in basicoptions.h, and gmx::SelectionOption selection options are also used in the same way. The option declarations filled into the gmx::IOptionsContainer option container object are also used to provide help to the user (also handled by the framework). For more details, please refer to gmx::TrajectoryAnalysisModule trajectory analysis module documentation and option module documentation.

* For Research Use Only.