Project

General

Profile

Bug #1802

g_chi segfault with system

Added by Rafael de la Vega about 2 years ago. Updated over 1 year ago.

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

Description

When I run g_chi on this system, it segfaults, usually after writing the chiXXX.xvg files. I tried removing the non-standard residue, that didnt help.

test.xtc (7.26 MB) test.xtc Rafael de la Vega, 08/11/2015 11:27 PM
topol.tpr (1.22 MB) topol.tpr Rafael de la Vega, 08/11/2015 11:28 PM

Associated revisions

Revision e7dc5714 (diff)
Added by Justin Lemkul about 2 years ago

Avoid segmentation fault in gmx chi.

If a system containing a custom residue is being analyzed, gmx chi
would seg fault if that residue was not in residuetypes.dat. This
can occur, for instance, when the topology is created in some
directory and analysis in another, or if the analysis is done on
a different machine.

Fixes #1802

Change-Id: I85df855381c8e233020fd1e1f73165d4e1215ab9

History

#1 Updated by Mark Abraham about 2 years ago

Can you please describe what's in your system?

#2 Updated by Rafael de la Vega about 2 years ago

The system is a protein with a cysteine/flavin covalent adduct as a non-standard amino acid, called FMC. The force field is amber99-ildn.

#3 Updated by Mark Abraham about 2 years ago

g_chi has a lot of options - which ones are you using?

#4 Updated by Rafael de la Vega about 2 years ago

I tried a lot of options, none of them worked. I did get the system to work without the non-standard amino acid, so I think the problem is with the FMC residue somehow.

#5 Updated by Justin Lemkul about 2 years ago

Trying a lot of things doesn't help anyone debug the issue. We need an exact command that you're issuing in order to reproduce it.

#6 Updated by Rafael de la Vega about 2 years ago

I must have been a little unclear, any combination of options that I tried caused a segfault, including just the defaults. The error is reproducible on multiple linux machines, including a campus cluster

#7 Updated by Justin Lemkul about 2 years ago

  • Category set to analysis tools
  • Status changed from New to Feedback wanted

I suspect you did not add FMC to residuetypes.dat and define it as a Protein residue. The failure comes from gmx_residuetype_get_index(), which sets the residue index in dlist[] in gmx chi. In the case that FMC is not defined as Protein, the index is set to -1 and you get a seg fault. Adding FMC to residuetypes.dat solves the problem. I don't know if there is a graceful solution to this, really, but in principle we could check for (dlist[i].index == -1) and exit with an error if that is the case.

#8 Updated by Rafael de la Vega about 2 years ago

That did the job, thanks. I did have FMC in a copy of residuetypes.dat but the file got lost in the creation of new directories.

#9 Updated by Gerrit Code Review Bot about 2 years ago

Gerrit received a related patchset '1' for Issue #1802.
Uploader: Justin Lemkul ()
Change-Id: I85df855381c8e233020fd1e1f73165d4e1215ab9
Gerrit URL: https://gerrit.gromacs.org/4994

#10 Updated by Justin Lemkul about 2 years ago

  • Status changed from Feedback wanted to Fix uploaded
  • Assignee set to Justin Lemkul

#11 Updated by Justin Lemkul about 2 years ago

  • Status changed from Fix uploaded to Resolved
  • % Done changed from 0 to 100

#12 Updated by Erik Lindahl over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF