# Energy minimizing multiple frames of an MD trajectory

**URL:** <https://gromacs.bioexcel.eu/t/energy-minimizing-multiple-frames-of-an-md-trajectory/12638>\
**Category:** User discussions\
**Tags:** analysis-tools, gmx-trjconv\
**Created:** [September 12, 2025, 7:33pm UTC](https://gromacs.bioexcel.eu/t/energy-minimizing-multiple-frames-of-an-md-trajectory/12638 "2025-09-12T19:33:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![a.hazarika](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@a.hazarika](https://gromacs.bioexcel.eu/u/a.hazarika)\
**Post date:** [September 12, 2025, 7:33pm UTC](https://gromacs.bioexcel.eu/t/energy-minimizing-multiple-frames-of-an-md-trajectory/12638/1 "2025-09-12T19:33:59Z")

</div>

GROMACS version: 2024.6  
GROMACS modification: No

Greetings,

I’m currently running some LSI calcs on simulated water, which needs inherent structures, so I need energy minimized structures. As of right now, my main workflow is:

1. Post MD, using .trr or .xtc files, use _gmx trjconv -sep_ to dump the individual frames
2. Using a template energy minimization mdp, run _grompp_ and _mdrun_ on those individual frames one by one.
3. Use the resulting energy minimized structures (confout.gro) to run my script on, one at a time again.

There are a couple of pain points here, the biggest one being that minimizing thousands of frames from the real trajectory one by one takes a long time. Currently, every frame is being processed one by one, where _mdrun_ launches with 1 GPU and 16 OMP threads. Will it be quicker if I process 16/8 frames in one go, using 1/2 OMP threads respectively?

The other issue is storage. Every _grommp_ and _mdrun_ operation creates cpt, edr, trr, tpr and log files, and they add up quickly. Worse, for a thousand frames, I’m dealing with multiple thousands of small files, about a megabyte in size. This makes file sync and transfers really slow, compared to copying one trajectory file that’s a thousand frames big. Is there a way to get around this?

My LSI script (I’m using mdanalysis) can handle multi-frame trajectories, so ideally, I would like to set up a minimization workflow which takes in a multi-frame trajectory of real structures and puts out a multi-frame trajectory of minimized structures. Unfortunately, _trjcat_ doesn’t work with _.gro_ files, so I couldn’t use that solution without further experimentation.

Ideas are suggestions are much appreciated.
