# Em stops working (Steepest Descents converged to Fmax \< 10)

**URL:** <https://gromacs.bioexcel.eu/t/em-stops-working-steepest-descents-converged-to-fmax-10/7193>\
**Category:** User discussions\
**Created:** [September 15, 2023, 2:20am UTC](https://gromacs.bioexcel.eu/t/em-stops-working-steepest-descents-converged-to-fmax-10/7193 "2023-09-15T02:20:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HyewonLee](https://avatars.discourse-cdn.com/v4/letter/h/6a8cbe/32.png) [@HyewonLee](https://gromacs.bioexcel.eu/u/HyewonLee)\
**Post date:** [September 15, 2023, 2:20am UTC](https://gromacs.bioexcel.eu/t/em-stops-working-steepest-descents-converged-to-fmax-10/7193/1 "2023-09-15T02:20:52Z")

</div>

GROMACS version: 2022.4  
GROMACS modification: Yes/No

I am simulating a molecule (without protein) in vacuum after obtaining an ITP file of a specific molecule from an automatic topology builder program.

In the mdp file, I specified `nsteps = 10000`, `emtol = 10.0` and then did energy minimization. It fails to run all 10000 steps and gets stuck in the middle (2016 steps) as shown in the message below.

```auto
Steepest Descents converged to Fmax < 10 in 2016 steps
Potential Energy = -2.1984878e+03
Maximum force = 9.8807087e+00 on atom 156
Norm of force = 3.4880597e+00
Finished mdrun on rank 0 Fri Sep 15 11:02:38 2023

```

I’m getting a “bond length not finite” error in the MD step after NVT, NPT, and subsequently. I think I’m getting this error because I don’t have enough EM. I’m checking the ITP file of the molecule now. Could you please check the em.mdp file I’m using is right, or advise what I can check to resolve this issue.

Thanks.

[em.mdp](https://gromacs.bioexcel.eu/uploads/short-url/tXs389mT9xXxsoGxzqcqx4D1sD1.mdp) (1.2 KB)

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [September 15, 2023, 2:57am UTC](https://gromacs.bioexcel.eu/t/em-stops-working-steepest-descents-converged-to-fmax-10/7193/2 "2023-09-15T02:57:42Z")

</div>

Energy minimization is doing what it’s supposed to. The values of `nsteps` and `emtol` are the exit conditions; if one or the other is satisfied, `mdrun` stops. You’ve satisfied the `emtol` value, so there’s no point running more iterations of minimization.

---

<div class="post-metadata">

**Author:** ![HyewonLee](https://avatars.discourse-cdn.com/v4/letter/h/6a8cbe/32.png) [@HyewonLee](https://gromacs.bioexcel.eu/u/HyewonLee)\
**Post date:** [September 15, 2023, 7:15am UTC](https://gromacs.bioexcel.eu/t/em-stops-working-steepest-descents-converged-to-fmax-10/7193/3 "2023-09-15T07:15:31Z")

</div>

Then, is the reason why energy minimization stops with `emtol` that not the system is weird but it’s done enough energy minimization to the value specified by `emtol`?

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [September 15, 2023, 1:39pm UTC](https://gromacs.bioexcel.eu/t/em-stops-working-steepest-descents-converged-to-fmax-10/7193/4 "2023-09-15T13:39:44Z")

</div>

Right, `mdrun` has satisfied the convergence criterion you defined, so it stops.
