Energy minimization_ potential positive

GROMACS version:gromacs/2023.2
GROMACS modification: No
I have 500 dimethoxyethane molecules in a box and after the energy minimization, the potential is always a positive value. What am I doing wrong?
TIA, Newbie to Gromacs

Hi, it’s difficult to say but usually that’s due to overlaps (two atoms being closer than the hard-sphere vdW repulsion radius) that energy minimization hasn’t gotten rid of. Could you provide more information on your system?

I have 500 dme molecules in a box that I generated using gromacs with this initial pdb

HETATM 1 H10 G252 0 -2.856 0.511 1.177 1.00 0.00 H
HETATM 2 C4 G252 0 -2.763 0.397 0.085 1.00 0.00 C
HETATM 3 H8 G252 0 -3.213 1.266 -0.403 1.00 0.00 H
HETATM 4 H9 G252 0 -3.312 -0.509 -0.216 1.00 0.00 H
HETATM 5 O2 G252 0 -1.406 0.344 -0.321 1.00 0.00 O
HETATM 6 C3 G252 0 -0.717 -0.760 0.243 1.00 0.00 C
HETATM 7 H6 G252 0 -1.196 -1.708 -0.055 1.00 0.00 H
HETATM 8 H7 G252 0 -0.737 -0.708 1.344 1.00 0.00 H
HETATM 9 C2 G252 0 0.717 -0.760 -0.243 1.00 0.00 C
HETATM 10 H4 G252 0 0.736 -0.706 -1.344 1.00 0.00 H
HETATM 11 H5 G252 0 1.196 -1.708 0.054 1.00 0.00 H
HETATM 12 O1 G252 0 1.406 0.344 0.321 1.00 0.00 O
HETATM 13 C1 G252 0 2.763 0.397 -0.086 1.00 0.00 C
HETATM 14 H1 G252 0 3.211 1.272 0.394 1.00 0.00 H
HETATM 15 H2 G252 0 3.315 -0.504 0.224 1.00 0.00 H
HETATM 16 H3 G252 0 2.855 0.501 -1.178 1.00 0.00 H
CONECT 1 2
CONECT 2 1 3 4 5
CONECT 3 2
CONECT 4 2
CONECT 5 2 6
CONECT 6 5 7 8 9
CONECT 7 6
CONECT 8 6
CONECT 9 6 10 11 12
CONECT 10 9
CONECT 11 9
CONECT 12 9 13
CONECT 13 12 14 15 16
CONECT 14 13
CONECT 15 13
CONECT 16 13
END
I’m using opls/aa and itp was downloaded form ATP. Whole system is just dme organic molecule nothing else. Even with positive values after em I’m getting density closer to the expected value. But it change when I change the number of molecules I pack or change the box size.

There’s no guarantee that your minimized system will have negative energy, because 0 energy doesn’t have any special meaning in molecular mechanics. Potential energy usually gets very negative for systems where water is the solvent, just because water-water interactions are quite attractive, but for a random non-polar solvent there might be a balance between the repulsion, attraction and intramolecular strain that the resulting energy will be slightly positive.

Of course if the energy is very positive (like in the millions), that might indicate an issue. It will tell you more if you look at energy decomposition into electrostatic, LJ, bond/angle/torsional etc. Also check the maximum force - if it gets to less than 1000 kJ/nm, you’re likely good to go.