mdacli icon indicating copy to clipboard operation
mdacli copied to clipboard

feature: Pipelining/Chaining Commands

Open spyke7 opened this issue 2 months ago • 2 comments

Hi dear maintainers! I have been looking in the mdacli and wanted to contribute to it as well. So I wanted to implement the feature of chaining commands like -

 mda RMSD ... | mda RMSF ... | mda plot

It would be great if I can work on this feature and make the tool better. You can also tell me about adding different features as well. Like what operators to use in particular.

Basically it will cover -

  • Chain multiple analyses together in a single command
  • Pass results between analysis steps
  • Create reusable analysis workflows

@PicoCentauri @orbeckst @joaomcteixeira @lilyminium

spyke7 avatar Nov 03 '25 18:11 spyke7

Sounds like a nice feature to put analysis together, but I am not sure how this should work. How do you imagine the I/O to work?

Every input command needs a full trajectory to work on. An idea to stack many analysis classes was introduced by me in https://github.com/MDAnalysis/mdanalysis/pull/4017. But I had no time to finish it.

PicoCentauri avatar Nov 04 '25 09:11 PicoCentauri

Option 1: Single Pipeline Command

The Universe is loaded once and shared across all steps:

mda pipeline --input topology.pdb trajectory.xtc \
  --step rmsd --select backbone \
  --step rmsf --select "name CA"

### Option 2: Unix-style Piping
```bash
mda rmsd top.pdb traj.xtc --json | mda plot --output rmsd.png

spyke7 avatar Nov 04 '25 15:11 spyke7