Gmx covar error

GROMACS version: 2020
GROMACS modification: /No
Here post your question

Dear all,

I am following the link below to do dihedral PCA:

However, I came up with the segmentation fault when I am trying to do gmx covar:

Command line:
gmx_mpi covar -f traj_comp.xtc -n covar.ndx -ascii -xpm -nofit -nomwa -noref -nopbc -s resized.gro

WARNING: Masses and atomic (Van der Waals) radii will be guessed
based on residue and atom names, since they could not be
definitively assigned from the information in your input
files. These guessed numbers might deviate from the mass
and radius of the atom type. Please check the output
files if necessary.

Choose a group for the covariance analysis
Warning: file does not end with a newline, last line:
1587 1567 1565 1563
Group 0 ( test) has 4 elements
There is one group in the index
Calculating the average structure …
Reading frame 0 time 0.000
WARNING: number of atoms in tpx (4) and trajectory (98559) do not match
Reading frame 1300 time 39000.000

Back Off! I just backed up average.pdb to ./#average.pdb.6#
[login-0-0:110527:0:110527] Caught signal 11 (Segmentation fault: address not mapped to object at address 0x9883a50)
==== backtrace ====
0 0x0000000000dd9d71 write_pdbfile_indexed() ???:0
1 0x0000000000d93eb4 write_sto_conf_indexed() ???:0
2 0x00000000007f3f48 gmx_covar() ???:0
3 0x000000000060d3dc gmx::CommandLineModuleManager::run() ???:0
4 0x0000000000404f4c main() ???:0
5 0x0000000000021c05 __libc_start_main() ???:0
6 0x0000000000405011 _start() ???:0

Segmentation fault (core dumped)

Can someone enlighten me how to solve this problem?



Hi Ben,

This should not happen - can you find a way to share your input files with me? Then I can have a look into what is going wrong. I would guess that there is a mismatch with the information in the structure file (resized.gro) and your trajectory, but we should not segfault.

Just to reconfirm - I assume that you used a recent gromacs version?


I have put majority file here and shorten the .xtc file:

Yes, I am using the GROMACS 2020.


‘WARNING: number of atoms in tpx (4) and trajectory (98559) do not match’
It means that there is a difference between the number of atoms in topol.tpr (only 4 ) and in the xtc file (98559). Thus the topol do not represent the system it your xtc file.
Try to use a topol file that corresponds to your trajectory.
Kind regards

We still shouldn’t segfault even in this case, but it doesn’t seem to be a too serious bug then.

Thanks for the files! Find a bug report here:

where you can follow our progress in fixing the segfault issue.