Question on fix brownian/sphere command

Hello! I am trying to run the following script:

------------- Initialization

units lj
dimension 2
atom_style atomic
boundary f f p
pair_style lj/cut 1.123
pair_modify shift yes

------------- System definition

region testbox block -30 30 -30 30 -0.25 0.25
create_box 2 testbox
group 1 region testbox
group 2 region testbox
create_atoms 1 random 5000 344783 testbox
create_atoms 2 random 5000 804883 testbox
fix 1 1 brownian/sphere 100.0 20568659 rng gaussian
fix 2 2 brownian/sphere 500.0 44223005 rng gaussian
fix 3 1 viscous 1.8849555921538759
fix 4 2 viscous 1.8849555921538759
pair_coeff 1 1 0.00861733326200 1.00000000000000 1.12246152962189
pair_coeff 1 2 0.02585199978600 1.00000000000000 1.12246152962189
pair_coeff 2 2 0.04308666631000 1.00000000000000 1.12246152962189
timestep 0.005
run 1
dump m0 all movie 1 movie.m4v type type size 200 200

But I get the output:

LAMMPS (29 Sep 2021 - Update 3)
Created orthogonal box = (-30.000000 -30.000000 -0.25000000) to (30.000000 30.000000 0.25000000)
1 by 1 by 1 MPI processor grid
0 atoms in group 1
0 atoms in group 2
Created 5000 atoms
using lattice units in orthogonal box = (-30.000000 -30.000000 -0.25000000) to (30.000000 30.000000 0.25000000)
create_atoms CPU = 0.001 seconds
Created 5000 atoms
using lattice units in orthogonal box = (-30.000000 -30.000000 -0.25000000) to (30.000000 30.000000 0.25000000)
create_atoms CPU = 0.001 seconds
ERROR: Illegal fix brownian command. (…/fix_brownian_sphere.cpp:42)
Last command: fix 1 2 brownian/sphere 100.0 20568659 rng gaussian

What is the illegality of my command? (What am I doing wrong?)

Multiple things. You should read the documentation more carefully and - if that fails to provide an explanation - the corresponding source code (i.e. the error happens on line 42 of the file fix_brownian_sphere.cpp).

  • your atom style is not correct for the fix
  • you are not setting gamma for either translation or rotation and both are required