Project

General

Profile

Bug #1813

gmx dos

Added by Marcelo Depolo Poleto over 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
analysis tools
Target version:
-
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

gmx dos (version 5.0.6) yields in a fatal error, even though previous versions (5.0.1 and 5.0.4) can run the command line below.

@echo BEN | gmx dos -s ben.DOS.tpr -f ben.DOS.trr -g ben.log -dos dos.xvg -vacf vacf.xvg -mvacf mvacf.xvg

/home/marcelodepolo/Downloads/BACKUP-softwares/gromacs-5.0.6/src/gromacs/gmxana/gmx_dos.c, line: 93
Fatal error:Index contains atom numbers larger than the topology*
@

Looking into gmx_dos.c on 5.0.6 and 5.0.4 versions, I've found many modifications, but this insertion might be the issue:

(line 67 on 5.0.6v)

@static int calcMoleculesInIndexGroup(t_block *mols, int natoms, atom_id *index, int nindex) {
int i = 0;
int mol = 0;
int nMol = 0;
int j;

while (i < nindex)
    {
while (index[i] > mols->index[mol]) {
mol++;
if (mol >= mols->nr) {
gmx_fatal(FARGS, "Atom index out of range: %d", index[i]+1);
}
}
for (j = mols->index[mol]; j < mols->index[mol+1]; j++) {
if (index[i] != j) {
gmx_fatal(FARGS, "The index group does not consist of whole molecules");
}
i++;
if (i == natoms) {
gmx_fatal(FARGS, "Index contains atom numbers larger than the topology");
}
}
nMol++;
}
return nMol;
}@

I would upload a trajectory, but it demands a .trr and it is quite large. Is there anything else I could provide for this case?

bad_run.txt (2.15 KB) bad_run.txt Marcelo Depolo Poleto, 08/26/2015 12:08 AM
ben.DOS.trr (563 KB) ben.DOS.trr Marcelo Depolo Poleto, 08/26/2015 12:20 AM
ben.DOS.tpr (286 KB) ben.DOS.tpr Marcelo Depolo Poleto, 08/26/2015 12:20 AM

Associated revisions

Revision 2a1052e2 (diff)
Added by David van der Spoel over 3 years ago

Introduce fatal error for too few frames in gmx dos.

To prevent gmx dos from crashing with an incomprehensible error
message when there are too few frames, test for this.

Part of #1813

Change-Id: Ie2f23d68cb3d4570944c4ade5ced49873dc98a29

History

#1 Updated by Justin Lemkul over 4 years ago

A single frame of the .trr should suffice to reproduce it, in concert with the .tpr file.

#2 Updated by Marcelo Depolo Poleto over 4 years ago

Respective .trr and .tpr uploaded

#3 Updated by David van der Spoel about 4 years ago

  • Assignee set to David van der Spoel

#4 Updated by Marvin Bernhardt over 3 years ago

This bug seems to be still around in 5.1.2.

I fixed it locally by putting the incrementor "i++;" behind the "if (i == natoms)" block. I am not entirely sure, but i think it belongs there.

#5 Updated by Gerrit Code Review Bot over 3 years ago

Gerrit received a related patchset '1' for Issue #1813.
Uploader: David van der Spoel ()
Change-Id: Ie2f23d68cb3d4570944c4ade5ced49873dc98a29
Gerrit URL: https://gerrit.gromacs.org/6025

#6 Updated by David van der Spoel over 3 years ago

The original bug was fixed already.

#7 Updated by Erik Lindahl over 3 years ago

  • Status changed from New to Fix uploaded

#8 Updated by David van der Spoel over 3 years ago

  • Status changed from Fix uploaded to Closed

Also available in: Atom PDF