# How to prepare equilibratation for REMD?

**URL:** <https://gromacs.bioexcel.eu/t/how-to-prepare-equilibratation-for-remd/3101>\
**Category:** User discussions\
**Created:** [November 8, 2021, 12:23pm UTC](https://gromacs.bioexcel.eu/t/how-to-prepare-equilibratation-for-remd/3101 "2021-11-08T12:23:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sadr](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@sadr](https://gromacs.bioexcel.eu/u/sadr)\
**Post date:** [November 8, 2021, 12:23pm UTC](https://gromacs.bioexcel.eu/t/how-to-prepare-equilibratation-for-remd/3101/1 "2021-11-08T12:23:41Z")

</div>

I have a problem in understanding the inputs for equilibrate as i read i have to equilibrate the initial structure at every temperature before starting the REMD simulation. so if I have 10 temperatures I should have 10 files with.mdp with ref-temp in the setting .mdp file contains different temperatures each file of them… I made a for loop for this but couldn’t run the second command will it be like that ?

> count=1  
> for temp in 300.00 306.37 312.84 319.42 326.11 332.92 339.85 346.89 354.06  
> do
> 
> echo "; RUN CONTROL PARAMETERS  
> ###the settings parameters ###
> 
> gmx grompp -f nvt$count.mdp -c nvt.gro -t nvt.cpt -p topol.top -o nvt$count.tpr  
> count=$((count+1))  
> done  
> mpirun -np 36 gmx\_mpi mdrun -v -deffnm nvt$count -multidir nvt1 nvt2 nvt3 nvt4 nvt5 nvt6 nvt7 nvt8 nvt9 nvt10 $

but i got File input/output error:  
`nvt13.tpr`

---

<div class="post-metadata">

**Author:** ![sadr](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@sadr](https://gromacs.bioexcel.eu/u/sadr)\
**Post date:** [November 8, 2021, 4:29pm UTC](https://gromacs.bioexcel.eu/t/how-to-prepare-equilibratation-for-remd/3101/2 "2021-11-08T16:29:53Z")

</div>

is there any help please ? as the documentation and tutorial is not obvious in using multiply temperatures

---

<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:** [November 8, 2021, 6:29pm UTC](https://gromacs.bioexcel.eu/t/how-to-prepare-equilibratation-for-remd/3101/3 "2021-11-08T18:29:18Z")

</div>

The problem is coming from the fact that somehow your counter is reaching 13 when it shouldn’t, hence you are telling `mdrun` to process a file (`nvt.tpr`) that does not exist. Equilibration is performed like any other simulation and does not necessarily require the use of `-multidir`.

---

<div class="post-metadata">

**Author:** ![sadr](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@sadr](https://gromacs.bioexcel.eu/u/sadr)\
**Post date:** [November 8, 2021, 7:22pm UTC](https://gromacs.bioexcel.eu/t/how-to-prepare-equilibratation-for-remd/3101/4 "2021-11-08T19:22:18Z")

</div>

apperciate your reply … Thanks a lot  
so the code should be like that

> count=1  
> for temp in 300.00 306.37 312.84 319.42 326.11 …  
> echo "; RUN CONTROL PARAMETERS  
> ###the settings parameters ###  
> do  
> mx grompp -f nvt$count.mdp -c nvt.gro -t nvt.cpt -p topol.top -o nvt$count.tpr;
> 
> gmx mdrun -v -deffnm nvt$count -nb gpu
> 
> count=$((count+1))

as i got

> Changing nstlist from 10 to 80, rlist from 0.9 to 1.041  
> On host lambda-quad 2 GPUs selected for this run.  
> Mapping of GPU IDs to the 2 GPU tasks in the 2 ranks on this node:  
> PP:0,PP:1  
> PP tasks will do (non-perturbed) short-ranged and most bonded interactions on the GPU  
> PP task will update and constrain coordinates on the CPU  
> Using 2 MPI threads  
> Using 8 OpenMP threads per tMPI thread
> 
> WARNING: This run will generate roughly 2022 Mb of data
> 
> NOTE: DLB will not turn on during the first phase of PME tuning  
> starting mdrun ‘UNNAMED in water’  
> 15000000 steps, 30000.0 ps.  
> step 0:

Is there any way to make it faster as I have 2 gpu and 10 temperatures and that code creates 6 files for the first temperature with extensions `edr , xtc , log . mdp, tpr , trr` and it will take 3 months to finish the first temperature only !

---

<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:** [November 8, 2021, 7:57pm UTC](https://gromacs.bioexcel.eu/t/how-to-prepare-equilibratation-for-remd/3101/5 "2021-11-08T19:57:02Z")

</div>

Your system is probably too small to benefit from trying to split the run over two GPUs (only really big systems will parallelize well) so try using only one GPU for the run with an appropriate `-gpu_id` to `mdrun`.

---

<div class="post-metadata">

**Author:** ![sadr](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@sadr](https://gromacs.bioexcel.eu/u/sadr)\
**Post date:** [November 8, 2021, 8:02pm UTC](https://gromacs.bioexcel.eu/t/how-to-prepare-equilibratation-for-remd/3101/6 "2021-11-08T20:02:01Z")

</div>

excuse me do you mean like that

> gmx mdrun -v -deffnm nvt$count -gpu\_id 0

as i got

> starting mdrun ‘UNNAMED in water’  
> 15000000 steps, 30000.0 ps.  
> step 100, will finish Wed Jan 12 07:58:52 2022

i think it still same time :-(

my nvidia-smi like that

```auto
NVIDIA-SMI 470.74 Driver Version: 470.74 CUDA Version: 11.4 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA TITAN RTX On | 00000000:1A:00.0 Off | N/A |
| 41% 40C P2 65W / 280W | 236MiB / 24220MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
| 1 NVIDIA TITAN RTX On | 00000000:68:00.0 Off | N/A |
| 41% 43C P8 19W / 280W | 183MiB / 24217MiB | 0% Default |
| | | N/A

```

---

<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:** [November 8, 2021, 8:36pm UTC](https://gromacs.bioexcel.eu/t/how-to-prepare-equilibratation-for-remd/3101/7 "2021-11-08T20:36:33Z")

</div>

Without any details on what you’re doing (number of atoms, `.mdp` settings, etc) there’s not much anyone can suggest to speed things up.

---

<div class="post-metadata">

**Author:** ![sadr](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@sadr](https://gromacs.bioexcel.eu/u/sadr)\
**Post date:** [November 9, 2021, 5:13am UTC](https://gromacs.bioexcel.eu/t/how-to-prepare-equilibratation-for-remd/3101/8 "2021-11-09T05:13:45Z")

</div>

```auto
echo "; RUN CONTROL PARAMETERS
integrator = md
tinit = 0 ; Starting time
dt = 0.002 ; 2 femtosecond time step for integration
nsteps = 15000000 ; Make it 200 ns
; OUTPUT CONTROL OPTIONS
nstxout = 500 ; Writing full precision coordinates every nanosecond
nstvout = 500 ; Writing velocities every nanosecond
nstfout = 0 ; Not writing forces
nstlog = 500 ; Writing to the log file every step
nstenergy = 500 ; Writing out energy information every step
nstxtcout = 500 ; Writing coordinates every 5 ps
; Pressure coupling is off
pcoupl = no ; no pressure coupling in NVT
; Periodic boundary conditions
pbc = xyz ; 3-D PBC
; Dispersion correction
DispCorr = EnerPres ; account for cut-off vdW scheme
; Velocity generation
gen_vel = no ; Velocity generation is off
; OPTIONS FOR BONDS
continuation = yes ; Restarting after Nvt
constraints = all-bonds
constraint-algorithm = Lincs
lincs-order = 4
lincs-iter = 1

; Temperature coupling is on
tcoupl = V-rescale ; modified Berendsen thermostate
tc-grps = Protein Non-Protein ; two coupling groups - more accurate
echo "ref_t = $temp $temp ; reference temperature

gmx grompp -f nvt$count.mdp -c nvt.gro -t nvt.cpt -p topol.top -o nvt$count.tpr;

gmx mdrun -v -deffnm nvt$count -gpu_id 0

count=$((count+1))

```

9 residues of peptide with 143 atom in explicit solvent

---

<div class="post-metadata">

**Author:** ![sadr](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@sadr](https://gromacs.bioexcel.eu/u/sadr)\
**Post date:** [November 11, 2021, 10:03am UTC](https://gromacs.bioexcel.eu/t/how-to-prepare-equilibratation-for-remd/3101/10 "2021-11-11T10:03:09Z")

</div>

i could make the gpu work by

```
gmx mdrun -v -deffnm nvt$count -ntmpi 2 -ntomp 18 -gpu_id 01

```

but it will finish 20 temperatures after 40 days … is that right ? i need to make it faster … how can i do that
