Fatal error: Not enough memory

GROMACS version: 2024.3
GROMACS modification: No

Hi everyone,

I am exploring the tcaf tool to compute shear viscosities. The command I’m using is:

gmx tcaf -f prod.trr -s topol.tpr -oc tcaf_cub.xvg

However, I systematically get the error:

Fatal error:
Not enough memory. Failed to calloc -2147483647 elements of size 4 for tcaf[k]

I searched how to solve it in the forum but I couldn’t find anything that could solve my problem. Do you have any ideas?

Hi! Looks like a bug in tcaf. Could you share your inputs?

Hi,

The input files are here: https://drive.google.com/drive/folders/1hWuzKB3FCfJtlRy31Z2ybMumPs6rpc4l?usp=sharing

Thank you!

Thanks, can reproduce that. I filed an issue, hopefully will be fixed in 2024.5.

The problem is that the trajectory needs to have both coordinates and velocities for TCAF analysis to work. Your file, however, has velocities but no coordinates.

We’ll improve error reporting in GROMACS 2024.5 to point this out.

All credit for tracking it down and fixing goes to @ebriand.

I see, thank you. Is there a way to obtain the coordinates in the trajectory file then?

You need to have both nstxout and nstvout set in your MDP file; then the trajectory would be written with both. You can’t add coordinates into trajectory if they were not saved during the md run.