Files
lammps/examples/PACKAGES/brownian/spherical_ABP/in3d.ideal_abp
2021-06-29 11:23:47 -04:00

68 lines
1.9 KiB
Plaintext

# 3D overdamped active brownian dynamics with no interactions
variable gamma_t string 3.0
variable gamma_r string 1.0
variable temp string 1.0
variable seed equal 1974019
variable fp string 4.0
variable params string ${temp}_${gamma_t}_${gamma_r}_${fp}
units lj
atom_style hybrid dipole sphere
dimension 3
newton off
lattice sc 0.4
region box block -8 8 -8 8 -8 8
create_box 1 box
create_atoms 1 box
mass * 1.0
set type * dipole/random ${seed} 1.0
velocity all create 1.0 1 loop geom
pair_style none
# overdamped brownian dynamics time-step
fix step all brownian/sphere ${temp} ${seed} gamma_t ${gamma_t} gamma_r ${gamma_r}
# self-propulsion force along the dipole direction
fix activity all propel/self dipole ${fp}
compute press all pressure NULL virial
thermo_style custom step ke pe c_press
#equilibration
timestep 0.0000000001
thermo 100
run 5000
reset_timestep 0
# MSD to demonstrate expected diffusive behaviour for ideal active
# brownian motion, which is
#
# MSD = (2*d*kb*T/gamma_t + 2*fp**2*gamma_r/(kb*T*gamma_t**2*(d-1)))*t
# + 2*fp**2*gamma_r**2/(gamma_t**2*(d-1)**2*(kb*T)**2)*(e^(-(d-1)*t*kb*T/gamma_r)-1)
#
# with d being simulation dimension
compute msd all msd
thermo_style custom step ke pe c_msd[*] c_press
timestep 0.00001
thermo 1000
# main run
run 12000
# if you want to check that rotational diffusion is behaving as expected,
# uncomment next three lines for dump output and then plot <e(t).e(0)>,
# which should decay exponentially with timescale (d-1)*D_r (with d
# being simulation dimension)
#dump 1 all custom 2000 dump_ideal_${params}_3d.lammpstrj id type &
# x y xu yu mux muy muz fx fy fz
#dump_modify 1 first yes sort id
#run 120000