# BD stops after some steps

**URL:** <https://gromacs.bioexcel.eu/t/bd-stops-after-some-steps/918>\
**Category:** User discussions\
**Created:** [October 6, 2020, 3:54pm UTC](https://gromacs.bioexcel.eu/t/bd-stops-after-some-steps/918 "2020-10-06T15:54:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cintia.vequi](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/cintia.vequi/32/374_2.png) [@cintia.vequi](https://gromacs.bioexcel.eu/u/cintia.vequi)\
**Post date:** [October 6, 2020, 3:54pm UTC](https://gromacs.bioexcel.eu/t/bd-stops-after-some-steps/918/1 "2020-10-06T15:54:30Z")

</div>

GROMACS version: 2020.3  
GROMACS modification: No  
I am performing Brownian Dynamics with hard spheres. But the simulation stops after a random number of steps, Gromacs keeps running but I don’t have evolution on the number of steps in any output file.  
First I was using only the C12 part of the LJ potential and I thought this problem could be due to two particles getting to close together and the potential getting to big. So I added the C6 term, the problem took longer to appear, the simulation was able to run for a longer time, but it is still there.  
I am putting below the mdp file I am using, the itp for the particles and the topology.  
The system is 1000 particles in a box of 5 x 5 x 5 um3.  
Any help is greatly appreciated! Thank you so much!

_ **mdp file** _\_  
ld-seed = 55560 ; Use random seed  
;################################# INTEGRATOR ##################################  
integrator = bd ; Langevin thermostat  
dt = 1000 ; Timestep (ps)  
nsteps = 20000000 ; Simulation duration (timesteps)  
nstcomm = 0 ; Center of mass motion removal interval  
comm-mode = None ; Center of mass motion removal mode  
bd\_fric = 24000 ; The friction coefficient for each particle is calculated as mass/tau-t.  
;################################## ENSEMBLE ###################################  
ref\_t = 295 ; System temperature (K)  
tau\_t = 2.0 ; Thermostat time constant (ps)  
tc\_grps = system ; Apply thermostat to complete system  
;############################## IMPLICIT SOLVENT ###############################  
implicit\_solvent = no ; NO implicit solvent  
;########################### NONBONDED INTERACTIONS ############################  
cutoff\_scheme = Verlet ; Method of managing neighbor lists  
pbc = xyz ; Periodic Boundary Conditions in all directions  
coulombtype = cut-off ; Calculate coulomb interactions using PME  
rcoulomb = 10 ; Coulomb cutoff  
vdwtype = cut-off ; Calculate van der Waals interactions using PME  
rvdw = 10 ; Van der Waals cutoff  
rlist = 10 ; Neighbor list cutoff  
nstlist = 100 ;  
;################################### OUTPUT ####################################  
nstlog = 5000 ; Log output interval (timesteps)  
nstenergy = 5000 ; Energy output interval (timesteps)  
nstcalcenergy = 5000 ; Energy calculation interval (timesteps)  
nstxout = 1000 ; Trajectory output interval (timesteps)  
nstvout = 5000 ; Velocity outout interval (timesteps)  
nstfout = 5000 ; Force output interval (timesteps)  
nstxout-compressed = 0 ;

_ **itp file** _\_\_\_\_\_\_\_\_\_  
; Topology of solid particles.  
; No include forcefield parameters

[defaults]  
; nb-type combination-rule gen-pairs fudgeLJ fudgeQQ  
1 1 no

[atomtypes]  
;type mass charge ptype c6 c12  
FA 4.8e+04 0.000 A 3.898e+04 6.090e+08  
FB 3.0e+08 0.000 A 2.494e+12 2.494e+24  
FC 1.03e+3 0.000 A 1.818e+03 1.326e+06

[nonbond\_params]  
FA FA 1 3.898e+04 6.090e+08  
FB FB 1 2.494e+12 2.495e+24  
FC FC 1 1.818e+03 1.326e+06

[moleculetype]  
;name nrexcl  
F005 1 ; sigma=05nm Epsilon= 0.6236 kJmol-1 mass= 48000 Da C12= 6.08984e+08 kJmol-1nm12

[atoms]  
; nr type resnr residu atom cgnr charge mass  
1 FA 1 F005 FA 0 0.00 4.8e+04

[moleculetype]  
;name nrexcl  
F100 1 ; sigma=100nm Epsilon= 0.6236 kJmol-1 mass= 3.0e+08 Da C12= 2.49440e+24 kJmol-1nm12

[atoms]  
; nr type resnr residu atom cgnr charge mass  
1 FB 1 F100 FB 0 0.00 3.0e+08

[moleculetype]  
;name nrexcl  
F003 1 ; sigma=03nm Epsilon= 0.6236 kJmol-1 mass= 1029 Da C12= 1.32563e+06 kJmol-1nm12

[atoms]  
; nr type resnr residu atom cgnr charge mass  
1 FC 1 F003 FC 0 0.00 1.02914e+03

_ **top file** _\_\_\_  
; Topology of 1000 particles.

#include “solidParticlesC6.itp”

[system]  
; systemname  
1000 particles 005nm

[molecules]  
; molecule number  
F005 1000

---

<div class="post-metadata">

**Author:** ![cintia.vequi](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/cintia.vequi/32/374_2.png) [@cintia.vequi](https://gromacs.bioexcel.eu/u/cintia.vequi)\
**Post date:** [October 7, 2020, 6:52am UTC](https://gromacs.bioexcel.eu/t/bd-stops-after-some-steps/918/2 "2020-10-07T06:52:51Z")

</div>

I forgot to say I generated the initial configuration with:

gmx insert-molecules -ci 1particles5nm.gro -nmol 1000 -box 5000 5000 5000 -o 1000particles5nm.gro -radius 2.5

Thank again.

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [October 7, 2020, 11:31am UTC](https://gromacs.bioexcel.eu/t/bd-stops-after-some-steps/918/3 "2020-10-07T11:31:25Z")

</div>

It is a bit difficult to judge what the values of the parameters should be with your different than usual sizes and masses, but I think the timestep is many orders of magnitude too large. My guess is that atoms move thousands of box length and pbc corrections take forever.

---

<div class="post-metadata">

**Author:** ![cintia.vequi](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/cintia.vequi/32/374_2.png) [@cintia.vequi](https://gromacs.bioexcel.eu/u/cintia.vequi)\
**Post date:** [October 7, 2020, 1:01pm UTC](https://gromacs.bioexcel.eu/t/bd-stops-after-some-steps/918/4 "2020-10-07T13:01:12Z")

</div>

I get what you are saying but with BD ‘the system is assumed to be over-damped, large timesteps can be used’ as state in the Gromacs manual. So 1ns is too large?

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [October 8, 2020, 8:16pm UTC](https://gromacs.bioexcel.eu/t/bd-stops-after-some-steps/918/5 "2020-10-08T20:16:22Z")

</div>

What is relevant for BD is dt/gamma, so one can’t speak about dt in isolation. But I would guess that 1 ns is several orders of magnitude too large. Try and see.

---

<div class="post-metadata">

**Author:** ![cintia.vequi](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/cintia.vequi/32/374_2.png) [@cintia.vequi](https://gromacs.bioexcel.eu/u/cintia.vequi)\
**Post date:** [October 9, 2020, 11:24am UTC](https://gromacs.bioexcel.eu/t/bd-stops-after-some-steps/918/6 "2020-10-09T11:24:07Z")

</div>

Thank you so much for your clarifications. I am learning a lot.

I have dt/gamma around 1e-1.  
What would be reasonable values so I can adjust dt??

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [October 9, 2020, 11:44am UTC](https://gromacs.bioexcel.eu/t/bd-stops-after-some-steps/918/7 "2020-10-09T11:44:09Z")

</div>

If you read the manual, you see that the displacement in a step is  
force\*dt/gamma plus a random term. So you need to come up with a  
reasonable displacement and maximum force so you can estimate reasonable  
parameter values. The proper check is to see that you distribution of  
states is not affected by the time step.

---

<div class="post-metadata">

**Author:** ![cintia.vequi](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/cintia.vequi/32/374_2.png) [@cintia.vequi](https://gromacs.bioexcel.eu/u/cintia.vequi)\
**Post date:** [October 9, 2020, 1:18pm UTC](https://gromacs.bioexcel.eu/t/bd-stops-after-some-steps/918/8 "2020-10-09T13:18:40Z")

</div>

Thank you! I will do that.
