COmmand for continuing mdrun after completion

GROMACS version: 2020.3

Is this the right command for continuing mdrun once the first run has completed?

Run 1
gmx grompp -f md.mdp -c npt.gro -t npt.cpt -p -o md.tpr -maxwarn 1

gmx mdrun -v -deffnm md -stepout 100

Run 2 after run 1 is complete
gmx convert-tpr -s md.tpr -until 10000 -o md.tpr

gmx mdrun -v -deffnm md -stepout 100 -cpi md.cpt

Run 2 has been running for a day now and i noticed that the md.log file is now empty.
However, im able to view the trajectory from Run 2, and number of steps in the visuals seems to be right.
Is there a reason why md.log file is empty or did i miss something out? I assumed that the command i input will simply append to the correct files.

How often the files are written to depends on the size of the output being sent to them and the settings of your operating system. The operating system will have a particular size of output that it will write to a file, if the amount being sent to md.log is below that then nothing will be written yet. If the job is still running, then that may be the reason md.log is empty.

I’m not too sure what you mean by the size of output being too small to be written to the file.
I suppose if for the same system, md.log is written after certain number of step intervals during the first run, then it should be doing so for the continued run because the system is the same size?

Yes, my run is still ongoing. Is this normal that an ongoing run does not get written for continued simulations?

If content to be written to a file is less than the buffer size, then it is held in the buffer until it is larger than that size. Once that size has been exceeded, then it is written to the file. That is why you will typically see a trajectory file updated on a much shorter interval than you will a log file.

Continued runs, unless specified otherwise, will append the results to the existing files.

The extending option you used is one of the recommended ways -

ah ok i understand better now. I used the -until keyword instead of -extend. Not sure if the empty md.log file is due to this keyword or the buffer size. If the trajectory looks alright, is that safe enough to say that the contents in md.log will appear once the run is completed? And that everything else is running fine?

The command for continuing the md is
gmx convert-tpr -s *.tpr -o *1.tpr -extend
gmx mdrun -v -s *1.tpr -deffnm -append -cpi md.cpt

Comparing with the commands i used, it seems that for gmx convert-tpr, i had the same file name for -s and -o. Would the file be overwritten in this way?

As for gmx mdrun, i did not include -s function. What is the consequence of this? I initially assumed that with -deffnm function, the newly created md.tpr with time extension would be incorporated into mdrun. Does gromacs detect that time is extended if ‘-s’ is not used?

-deffnm sets the prefix for all input and output options. When used as shown above, it takes the place of -s md.tpr.