Molecule distortion after enery minimization

Dear Gromacs Users,

I am performing energy minimization on my molecule.
I obtained the parameters of the molecule from CGenFF server.
Since the molecule is protonated, I added chloride ion to make the system neutral.
Following is the command which I have used:
gmx genion -s SOLVATED.tpr -nname CL -nn 1 -neutral -p -o NEUTRALIZED.gro

Following is the parameters of the mdp file:

integrator = steep
dt = 0.001
nsteps = 10000
nstlog = 100
nstenergy = 100
nstxout-compressed = 100

continuation = yes
;constraints = h-bonds
constraints = none
constraint-algorithm = lincs

cutoff-scheme = Verlet

coulombtype = PME
rcoulomb = 1.1
vdwtype = cut-off
rvdw = 1.1
DispCorr = No
periodic-molecules = yes
lincs-order = 1
tcoupl = no
tc-grps = System
tau-t = 0.1
ref-t = 300
pcoupl = no
tau-p = 2.0
compressibility = 4.5e-5
ref-p = 1.0

After performing energy minimization, the molecule appears to be distorted.
Attached is the snapshot of distorted molecule.

Is your Nitrogen bonded to 5 atoms?


Attached is initial configuration of the molecule.


I am getting same problem. The complex.gro file is fine, but after energy minimizations there are some different bonds forming same as yours. The no of atoms are same

initial structure

new structure

This setting is likely inappropriate. It is only for infinite species like graphene, CNT, etc.

Your cutoffs are also wrong for the CHARMM (or CGenFF) force field, but this is not the cause of distortion.

Presumably you have converted the coordinates and topology to GROMACS format with the conversion script we supply via Alex MacKerell’s website? Do the initial coordinates look correct, prior to minimization? Did grompp issue any warnings about mismatched atom names, which implies an incompatibility between coordinates and topology?

Hi Prof. Lemkul,

Thank you so much for your reply.

I changed “periodic-molecules” from yes to “no”.
grompp returns 1 note and 1 warning which are following:

NOTE 1 [file, line 388]:
System has non-zero total charge: 0.000600
Total charge should normally be an integer. See
Floating point arithmetic — GROMACS webpage documentation
for discussion on how close it should be to an integer.

WARNING 1 [file, line 388]:
You are using Ewald electrostatics in a system with net charge. This can
lead to severe artifacts, such as ions moving into regions with low
dielectric, due to the uniform background charge. We suggest to
neutralize your system with counter ions, possibly in combination with a
physiological salt concentration.

The initial coordinates were fine before the energy minimization.


The collapse of the ring and the appearance of an H atom in the physical location where a heavy atom should be still suggests an issue with the topology. The partial net charge is a little troubling but could be simply due to rounding error and may not be a concern. It’s certainly not the cause of such distortion in the connectivity.


Did you find solution for the problem.
I am trying to fix the issue for quiet a long time and, yet, I am not able to rectify the topology problem.


No I am not able to rectify the issue. I am trying now to make the topology using Ambertools

It would be easier to provide helpful advice if either (or both) of you would upload all input files for grompp (coordinates, all relevant topologies, .mdp file, and any necessary index file) for others to investigate.

Hi Prof. Lemkul,

Thank you so much for your reply.

Since I am a new user in the forum, I am not able to upload the files.
Following is the link of dropbox where all files are present:


Prof. Lemkul,
I am pasting a link containing my files. I have used the same steps as provided in your tutorial, except I have used SwissParam for ligand topology generation. I have pasted my ligand.mol2 as well as itp files.If you require any other files for debugging kindly let me know.

I used GAFF for minimization, however this time i got changes in structure but on other atoms. So my problem is not resolved.

I think Justin probably already answered this correctly a few posts back. It seems likely that your topology either has atoms mixed up intrinsically (hopefully an unlikely scenario), or the order in which atoms appear in the topology is not the same as in your coordinates. If you gave the CGenFF server a molecule and got parameters, did you also get a structure? Is it possible that CGenFF gave you back atoms in a different order? If so, suggest to use the CGenFF output structure instead of the CGenFF input structure in your EM input.

Hi, thanks for your reply. I did get both the ligand topology and a structure from SwissParam website. I used that for my input.


  1. The mol2 file of ligand was generated, Swissparam was used for generating the pdb and itp file.

  2. The topol top files was created like this

; File ‘’ was generated
; By user: unknown (1000)
; This is a standalone topology file
; Created by:
; :-) GROMACS - gmx pdb2gmx, 2020.1-Ubuntu-2020.1-1 (-:
; Executable: /usr/bin/gmx
; Data prefix: /usr
; Working dir: /mnt/c/Users/Savio Cardoza/Desktop/GROMACS systems/7lif_1_sp_b
; Command line:
; gmx pdb2gmx -f protein.pdb -o protein_processed.gro -ignh
; Force field was read from current directory or a relative path - path added.

; Include forcefield parameters
#include “./charmm36-mar2019.ff/forcefield.itp”

; Include ligand topology
#include “lig.itp”

; Include water topology
#include “./charmm36-mar2019.ff/spc.itp”

; Position restraint for each water oxygen
[ position_restraints ]
; i funct fcx fcy fcz
1 1 1000 1000 1000

; Include topology for ions
#include “./charmm36-mar2019.ff/ions.itp”

[ system ]
; Name
lig in water

[ molecules ]
; Compound #mols
lig 1

SOL 797

  1. gmx pdb2gmx was used to create a .gro file for ligand.

  2. solvent and ions were added (however no ions were added by gromacs)

  3. gmx grompp -f em.mdp -c solv_ions.gro -p -o em.tpr AND
    gmx mdrun -v -deffnm em WERE RUN

  4. I got same distortion as earlier.

7.CHANGED emtol = 5000.0, in the em.mdp file,. I again ran energy minimization and although the energy is not converged but after 4 steps i saw the em.gro file and structure did not distort.

  1. Is the steep descent algorithm incompatible for the molecule? and can I restrain the molecule? How can we detect issues in the topology of our ligand as Prof. Lemkul pointed out?

@abhinav.sri89 the issue is your small-molecule topology. It defines bonds and pairs but no angles or dihedrals. The entire PYP molecule collapses in on itself because the topology is simply wrong. It appears it was manually created; don’t do this. Use the script from Alex MacKerell’s website (as in my protein-ligand tutorial) and it will generate an appropriate topology. You also have #include statements within the [system] directive, which I have no idea how it works, but you should generate a more sensible and syntactically correct topology. This one is essentially unusable and you should start over.

@SavioC you did not provide all the necessary files.

Program:     gmx grompp, version 2021.3
Source file: src/gromacs/gmxpreprocess/gmxcpp.cpp (line 298)

Fatal error:
Topology include file "topol_Protein_chain_A.itp" not found

For more information and tips for troubleshooting, please check the GROMACS
website at