Run gromacs in loop

GROMACS version:2020.4
i’m on ubnutu 18.4.5 with nvidia rtx 2060 with cuda 11.1 i’m trying to use gromacs for loop of numbers with this commands by running shell file

gmx grompp run_$count.mdp topol.top -c em.gro -o run_$count.tpr ;

gmx mdrun -deffnm run_$count

i got

Error in user input:
Invalid input values
In option s
Required option was not provided, and the default file ‘topol’ does not
exist or is not accessible.
The following extensions were tried to complete the file name:
.tpr

i want to ensure also that gpu is working

Thanks in advance

Hello,

if this line is in the script

gmx grompp run_$count.mdp topol.top -c em.gro -o run_$count.tpr

the grompp command is likely not executing properly and thus not creating the tpr files. The line lacks the -f and -p flags to specify the mdp and top files. A corrected line would be:

gmx grompp -f run_$count.mdp -p topol.top -c em.gro -o run_$count.tpr

Regards,
Petter

thanks for replying. i updated the lines and error exists , i tried also these lines

gmx grompp -f run_$count.mdp -p topol.top -c em.gro -o run_$count.tpr -nb gpu;

gmx mdrun -deffnm run_$count -nb gpu

error exits