GSoC 2026: Week 9 & 10 - Ease of CLI

The final phase of the project is nearing! With everything in place, WESTPAParser and WESTPAReader as well as the save_to_west_h5() tool can be used as a library through importing and writing code. However, not everyone would want to write code just to get their analysis results.

Here is where the CLI tool comes in place! Users can directly import their west.h5 file, select standard MDAnalysis analysis tools or use custom analysis tools, extract a certain column from their dataset, select atoms and run the analysis and get the results all in the terminal itself.

Users can also use the CLI tool to save back their analysis results by using –save and overwrite any current datasets. The CLI tool also supports multiprocessing for faster parallel compute!

This CLI tool essentially acts as a wrapper for all that was previously built. WESTPAParser and WESTPAReader create the Universe in the background, and the CLI uses the imported analysis tool and runs it on the Universe. Saving back uses save_to_west_h5().

Here is the w_mdacrawl CLI tool in action by running RMSD through multiprocessing and saving back the results:

> w_mdacrawl west.h5 MDAnalysis.analysis.rms.RMSD --select "all" --verbose -j 4 --save rmsd --overwrite     
-- INFO     [w_mdacrawl] -- Importing analysis class: MDAnalysis.analysis.rms.RMSD
-- INFO     [w_mdacrawl] -- Loaded: <class 'MDAnalysis.analysis.rms.RMSD'>
-- INFO     [w_mdacrawl] -- Loading Universe from west.h5
-- INFO     [w_mdacrawl] -- Universe loaded: 4010 atoms, 100 frames
-- INFO     [MDAnalysis.analysis.rmsd] -- RMS calculation for 4010 atoms.
-- INFO     [w_mdacrawl] -- Running with multiprocessing backend, n_workers=4
-- INFO     [w_mdacrawl] -- Analysis complete
-- INFO     [w_mdacrawl] -- Results shape: (100, 3), dtype: float64

============================================================
Analysis : RMSD
Frames   : 100
Results  : shape=(100, 3), dtype=float64
First 5  :
[[0.00000000e+00 0.00000000e+00 7.61987563e-07]
 [1.00000000e+00 1.00000000e+00 9.34381562e+00]
 [2.00000000e+00 2.00000000e+00 9.51002413e+00]
 [3.00000000e+00 3.00000000e+00 1.02333884e+01]
 [4.00000000e+00 4.00000000e+00 9.23652375e+00]]
Last 5   :
[[95.         95.         24.18570912]
 [96.         96.         24.12541852]
 [97.         97.         24.17300443]
 [98.         98.         23.92954011]
 [99.         99.         24.05942715]]
============================================================

-- INFO     [w_mdacrawl] -- Saving results as auxdata/rmsd (overwrite=True)
In iter_00000001, Created auxdata/rmsd with shape (25, 3, 3)
In iter_00000002, Created auxdata/rmsd with shape (25, 3, 3)
-- INFO     [w_mdacrawl] -- Successfully saved to west.h5::auxdata/rmsd
Results saved to west.h5 under auxdata/rmsd

Summary

  • Created the CLI tool w_mdacrawl which acts as a wrapper for WESTPAParser and WESTPAReader.
  • Users can use it to compute analysis results and save auxdata back into west.h5.
  • Created a small test case for this CLI tool.