Hello everyone!

I want to calculate self diffusion for helium (3d).

I used msd example and tried to change it for 3d. But the results are not correct…

Could you please tell what command I should add/change?

Code:

variable x equal 10

variable y equal 10

variable z equal 10

variable t equal 273.0

variable V equal vol

variable rc equal 7.325

variable pr equal 1.0

variable dt equal 4.0

units real

dimension 3

boundary p p p

atom_style atomic

lattice fcc 34.5

region box block 0 $x 0 $y 0 $z

create_box 1 box

create_atoms 1 box

pair_style lj/cut ${rc}

pair_coeff * * 0.02144 2.588

mass * 4.0026

velocity all create $t 97287 #mom yes rot yes dist gaussian

fix 1 all npt temp $t t 40 iso {pr} ${pr} 400

fix 2 all langevin $t $t 40 498094

thermo 1000

run 50000

unfix 2

reset_timestep 0

compute msd all msd com yes

variable twopoint equal c_msd[4]/9/(step*dt+1e-6)

fix 9 all vector 1 c_msd[4]

variable fitslope equal slope(f_9)/9/(dt)

thermo_style custom step temp press c_msd[4] v_twopoint v_fitslope

thermo 1000

run 3000000