g_chi segfault with system
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.
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.
#7 Updated by Justin Lemkul over 3 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.