Error in changing mdp options for a restart

GROMACS version: 2020.2
GROMACS modification: No
Here post your question

Hi,

I’m trying to restart my simulation using a check point file with modified mdp options, and when I run the following command (command from the User guide):

gmx_mpi grompp -f md.mdp -p topol.top -c md_0_60.cpt -o md_0_60.tpr

I get the following error:

Error in user input:
Invalid command-line options
In command-line option -c
File name ‘md_0_60.cpt’ cannot be used for this option.
Only the following extensions are possible:
.gro, .g96, .pdb, .brk, .ent, .esp, .tpr

In the command template, .cpt file is required for the option -c, so I’m not sure why I’m getting this error. All the files (md.mdp, topol.top and md_0_60.cpt) are in the working directory.
Thank you for your help in advance.

Hi,
As the error message says, cpt extension can not be used as input for grompp (see
gmx grompp — GROMACS 2021 documentation).

It depends which options you want to change in the mdp. You can generate a tpr in the following way

  1. if you want just to extend the simulation you can use gmx convert-tpr — GROMACS 2021 documentation
  2. if you want to change more option, you can use gmx grompp and -c last frame (of previous simulation) as input. If you want you use both positions and velocities of the last frame, put gen_vel= no as option in mdp file
    Best regards
    Alessandra

Hi Alessandra,

Thank you for your reply.
For the restart, I want to run the simulation with the smaller time step (originally 2fs, but I want to change it to 1fs), so I followed what the GROMACS 2020.2 User guide (Managing long simulations — GROMACS 2020.2 documentation) said as follows:

“”"""
If you wish to make changes to your simulations settings other than length, then you should do so in the mdp file or topology, and then call

gmx grompp -f possibly-changed.mdp -p possibly-changed.top -c state.cpt -o new.tpr gmx mdrun -s new.tpr -cpi state.cpt

to instruct [gmx grompp] to copy the full-precision coordinates in the checkpoint file into the new [tpr] file.
“”"""

However, cpt extension cannot be used with the option -c:

  1. You suggested to use “-c last frame” instead. Does this mean to get the last frame as .gro or .pdb file?
  2. I saw in the User guide you shared me that -t extension actually takes .cpt file. Since the error I got only said " In command-line option -c. File name ‘md_0_60.cpt’ cannot be used for this option.", would it be possible to use option -t and use .cpt file?

Thank you for your help.

Hi,
Yes, sure both option works.
Alessandra

Great, thank you.