# Error during energy minimization in GROMACS

**URL:** <https://gromacs.bioexcel.eu/t/error-during-energy-minimization-in-gromacs/6919>\
**Category:** User discussions\
**Created:** [July 29, 2023, 8:21am UTC](https://gromacs.bioexcel.eu/t/error-during-energy-minimization-in-gromacs/6919 "2023-07-29T08:21:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anjana](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@Anjana](https://gromacs.bioexcel.eu/u/Anjana)\
**Post date:** [July 29, 2023, 8:21am UTC](https://gromacs.bioexcel.eu/t/error-during-energy-minimization-in-gromacs/6919/1 "2023-07-29T08:21:14Z")

</div>

Could anyone help me to solve the following error during energy minimization in GROMACS

Step=10343, Dmax= 1.8e-05 nm, Epot= 2.99234e+06 Fmax= 4.45471e+04, atom= 14522  
Step=10348, Dmax= 1.4e-06 nm, Epot= 2.99234e+06 Fmax= 3.73969e+04, atom= 14522  
Energy minimization has stopped, but the forces have not converged to the  
requested precision Fmax \< 1000 (which may not be possible for your system).  
It stopped because the algorithm tried to make a new step whose size was too  
small, or there was no change in the energy since last step. Either way, we  
regard the minimization as converged to within the available machine  
precision, given your starting configuration and EM parameters.

Double precision normally gives you higher accuracy, but this is often not  
needed for preparing to run molecular dynamics.  
You might need to increase your constraint accuracy, or turn  
off constraints altogether (set constraints = none in mdp file)

writing lowest energy coordinates.

Steepest Descents converged to machine precision in 10349 steps,  
but did not reach the requested Fmax \< 1000.  
Potential Energy = 2.9923410e+06  
Maximum force = 4.4547062e+04 on atom 14522  
Norm of force = 3.4612451e+02

minim.mdp file is  
; minim.mdp - used as input into grompp to generate em.tpr  
; Parameters describing what to do, when to stop and what to save  
define = -DPOSRES\_LIPID  
integrator = steep ; Algorithm (steep = steepest descent minimization)  
emtol = 1000.0 ; Stop minimization when the maximum force \< 1000.0 kJ/mol/nm  
emstep = 0.01 ; Minimization step size  
nsteps = 50000 ; Maximum number of (minimization) steps to perform

; Parameters describing how to find the neighbors of each atom and how to calculate the interactions  
nstlist = 1 ; Frequency to update the neighbor list and long range forces  
cutoff-scheme = Verlet ; Buffered neighbor searching  
ns\_type = grid ; Method to determine neighbor list (simple, grid)  
coulombtype = PME ; Treatment of long range electrostatic interactions  
rcoulomb = 1.0 ; Short-range electrostatic cut-off  
rvdw = 1.0 ; Short-range Van der Waals cut-off  
pbc = xyz ; Periodic Boundary Conditions in all 3 dimensions

I pack this bilayer by using packmol, and added the upper slap and lower slap of water in gromacs, to avoid the water from a bilayer core. during minimization above arror is comming.

This is the initial bilayer

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/c/c2e35c867e92617903236eb220f6fc8c9e810491.jpeg)

After minimization

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/b/bfe59a567097fde3c6bd7bf68a4a63b4e67a2fde.jpeg)

---

<div class="post-metadata">

**Author:** ![Karis](https://avatars.discourse-cdn.com/v4/letter/k/ed8c4c/32.png) [@Karis](https://gromacs.bioexcel.eu/u/Karis)\
**Post date:** [August 3, 2023, 5:48pm UTC](https://gromacs.bioexcel.eu/t/error-during-energy-minimization-in-gromacs/6919/2 "2023-08-03T17:48:40Z")

</div>

Does it work if you remove the define = -DPOSRES\_LIPID? Going off of the mdp file used in [KALP-15 in DPPC](http://www.mdtutorials.com/gmx/membrane_protein/05_EM.html), I’m not sure you need the position restraints during the minimization step

---

<div class="post-metadata">

**Author:** ![Anjana](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@Anjana](https://gromacs.bioexcel.eu/u/Anjana)\
**Post date:** [August 3, 2023, 6:32pm UTC](https://gromacs.bioexcel.eu/t/error-during-energy-minimization-in-gromacs/6919/3 "2023-08-03T18:32:47Z")

</div>

No, it is not working

---

<div class="post-metadata">

**Author:** ![Karis](https://avatars.discourse-cdn.com/v4/letter/k/ed8c4c/32.png) [@Karis](https://gromacs.bioexcel.eu/u/Karis)\
**Post date:** [August 4, 2023, 5:49am UTC](https://gromacs.bioexcel.eu/t/error-during-energy-minimization-in-gromacs/6919/4 "2023-08-04T05:49:30Z")

</div>

Did removing the constraints change the result of minimization in any way or is it still the exact same result?

---

<div class="post-metadata">

**Author:** ![Anjana](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@Anjana](https://gromacs.bioexcel.eu/u/Anjana)\
**Post date:** [August 4, 2023, 10:11am UTC](https://gromacs.bioexcel.eu/t/error-during-energy-minimization-in-gromacs/6919/5 "2023-08-04T10:11:30Z")

</div>

Yesss
