feature: Pipelining/Chaining Commands
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
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.
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