# CHARMM-GUI script results in consecutive trajectories with the same start times

**URL:** <https://gromacs.bioexcel.eu/t/charmm-gui-script-results-in-consecutive-trajectories-with-the-same-start-times/4001>\
**Category:** User discussions\
**Created:** [April 12, 2022, 10:34am UTC](https://gromacs.bioexcel.eu/t/charmm-gui-script-results-in-consecutive-trajectories-with-the-same-start-times/4001 "2022-04-12T10:34:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sodiumnitrate](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@sodiumnitrate](https://gromacs.bioexcel.eu/u/sodiumnitrate)\
**Post date:** [April 12, 2022, 10:34am UTC](https://gromacs.bioexcel.eu/t/charmm-gui-script-results-in-consecutive-trajectories-with-the-same-start-times/4001/1 "2022-04-12T10:34:20Z")

</div>

GROMACS version: 2019.3  
GROMACS modification: No

Hi all,

I’m using the run script that CHARMM-GUI provides, which involves running 10 production simulations one after the other. The relevant `grompp` command is as follows:

`gmx grompp -f ${prod_prefix}.mdp -o ${istep}.tpr -c ${pstep}.gro -t ${pstep}.cpt -p topol.top -n index.ndx`

Here, `${pstep}` sets the name of the output of the previous simulation, and `${istep}` sets the name of the new (current) simulation. Please see the very bottom of this post for the full submission script. I would expect that each time, the new simulation continues where the previous one left off. However, when I run trjcat on the resulting `.trr` files:

`gmx trjcat -f step7*trr -o step7_all.trr`

I see the following:

```auto
Summary of files and start times used:

          File Start time Time step
---------------------------------------------------------
             step7_10.trr 0.000 ps 100.000 ps
              step7_1.trr 0.000 ps 100.000 ps WARNING: same Start time as previous
              step7_2.trr 0.000 ps 100.000 ps WARNING: same Start time as previous
              step7_3.trr 0.000 ps 100.000 ps WARNING: same Start time as previous
              step7_4.trr 0.000 ps 100.000 ps WARNING: same Start time as previous
              step7_5.trr 0.000 ps 100.000 ps WARNING: same Start time as previous
              step7_6.trr 0.000 ps 100.000 ps WARNING: same Start time as previous
              step7_7.trr 0.000 ps 100.000 ps WARNING: same Start time as previous
              step7_8.trr 0.000 ps 100.000 ps WARNING: same Start time as previous
              step7_9.trr 0.000 ps 100.000 ps WARNING: same Start time as previous
            step7_all.trr 0.000 ps 100.000 ps WARNING: same Start time as previous

```

Why are the starting times all 0 ps? What am I missing?

* * *

```auto
#!/bin/csh
#SBATCH --job-name=membrane3W
#SBATCH --output=out.dat
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --gres=gpu:1
#SBATCH -c 32
#SBATCH -p gpu
#SBATCH --time=2-00:00:00

set init = step5_input
set rest_prefix = step5_input
set mini_prefix = step6.0_minimization
set equi_prefix = step6.%d_equilibration
set prod_prefix = step7_production
set prod_step = step7

# minimization
module load GROMACS/2019.3-foss-2018a
gmx grompp -f ${mini_prefix}.mdp -o ${mini_prefix}.tpr -c ${init}.gro -r ${rest_prefix}.gro -p topol.top -n index.ndx
module unload GROMACS/2019.3-foss-2018a
module load GROMACS/2019.3-foss-2018b-CUDA-10.0.130
gmx mdrun -v -deffnm ${mini_prefix}

# equilibrattion
set cnt = 1
set cntmax = 6

while ( ${cnt} <= ${cntmax} )
    @ pcnt = ${cnt} - 1
    set istep = `printf ${equi_prefix} ${cnt}`
    set pstep = `printf ${equi_prefix} ${pcnt}`
    if ( ${cnt} == 1 ) set pstep = ${mini_prefix}

    module unload GROMACS/2019.3-foss-2018b-CUDA-10.0.130
    module load GROMACS/2019.3-foss-2018a

    gmx grompp -f ${istep}.mdp -o ${istep}.tpr -c ${pstep}.gro -r ${rest_prefix}.gro -p topol.top -n index.ndx

    module unload GROMACS/2019.3-foss-2018a
    module load GROMACS/2019.3-foss-2018b-CUDA-10.0.130
    gmx mdrun -ntmpi 1 -ntomp 32 -v -deffnm ${istep}
    @ cnt += 1
end

# production
set cnt = 1
set cntmax = 10

while ( ${cnt} <= ${cntmax} )
    @ pcnt = ${cnt} - 1

    module unload GROMACS/2019.3-foss-2018b-CUDA-10.0.130
    module load GROMACS/2019.3-foss-2018a
    set istep = ${prod_step}_${cnt}
    set pstep = ${prod_step}_${pcnt}

        if ( ${cnt} == 1 ) then
        set pstep = `printf ${equi_prefix} 6`
        gmx grompp -f ${prod_prefix}.mdp -o ${istep}.tpr -c ${pstep}.gro -p topol.top -n index.ndx
        else
	gmx grompp -f ${prod_prefix}.mdp -o ${istep}.tpr -c ${pstep}.gro -t ${pstep}.cpt -p topol.top -n index.ndx
        endif

    module unload GROMACS/2019.3-foss-2018a
    module load GROMACS/2019.3-foss-2018b-CUDA-10.0.130
    gmx mdrun -ntmpi 1 -ntomp 32 -v -deffnm ${istep}
    @ cnt += 1
end

```

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [April 13, 2022, 2:31am UTC](https://gromacs.bioexcel.eu/t/charmm-gui-script-results-in-consecutive-trajectories-with-the-same-start-times/4001/2 "2022-04-13T02:31:51Z")

</div>

> [@sodiumnitrate](#):
>
> Why are the starting times all 0 ps? What am I missing?

This is the expected outcome when one uses `grompp` to generate new inputs without changing the `tinit` variable. It’s a bit of an outdated approach, but you can overcome it with the `-settime` option of `trjcat`.

---

<div class="post-metadata">

**Author:** ![sodiumnitrate](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@sodiumnitrate](https://gromacs.bioexcel.eu/u/sodiumnitrate)\
**Post date:** [April 13, 2022, 7:52pm UTC](https://gromacs.bioexcel.eu/t/charmm-gui-script-results-in-consecutive-trajectories-with-the-same-start-times/4001/3 "2022-04-13T19:52:01Z")

</div>

Thank you so much for your response. As far as I can tell, `tinit` is an `.mdp` file option, and it can’t be changed while running `grompp`, right? I’m asking because the current script is set up in such a way that it uses the same` .mdp` file to generate consecutive `.tpr` files. In other words, to use the `tinit` option, I would have to create a different `.mdp` file for each run, right?

That being said, I suppose I could just run a single, longer production run and not deal with this at all.

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [April 14, 2022, 1:45am UTC](https://gromacs.bioexcel.eu/t/charmm-gui-script-results-in-consecutive-trajectories-with-the-same-start-times/4001/4 "2022-04-14T01:45:40Z")

</div>

> [@sodiumnitrate](#):
>
> That being said, I suppose I could just run a single, longer production run and not deal with this at all.

This would be a better approach. The CHARMM-GUI scripts are robust and work well but they rely on old conventions (because they are unlikely to change from version to version). There’s no requirement to use them, though they are a good reference for proper implementation.
