lammps/examples/DIFFUSE/in.msd.2d

63 lines
1.3 KiB
Plaintext

# sample LAMMPS input script for diffusion of 2d LJ liquid
# mean-squared displacement via compute msd
# settings
variable x equal 40
variable y equal 40
variable rho equal 0.6
variable t equal 1.0
variable rc equal 2.5
# problem setup
units lj
dimension 2
atom_style atomic
neigh_modify delay 0 every 1
lattice sq2 ${rho}
region simbox block 0 $x 0 $y -0.1 0.1
create_box 1 simbox
create_atoms 1 box
pair_style lj/cut ${rc}
pair_coeff * * 1 1
mass * 1.0
velocity all create $t 97287
fix 1 all nve
fix 2 all langevin $t $t 0.1 498094
fix 3 all enforce2d
# equilibration run
thermo 1000
run 5000
unfix 2
# data gathering run
reset_timestep 0
# factor of 4 in 2 variables is for 2d
compute msd all msd com yes
variable twopoint equal c_msd[4]/4/(step*dt+1.0e-6)
fix 9 all vector 10 c_msd[4]
variable fitslope equal slope(f_9)/4/(10*dt)
thermo_style custom step temp c_msd[4] v_twopoint v_fitslope
# only need to run for 10K steps to make a good 100-frame movie
#dump 1 all custom 1 tmp.dump id type vx vy vz
#dump 2 all image 100 image.*.jpg type type zoom 1.6 adiam 1.2
thermo 1000
run 100000