Dear Lammps users,
I'd like to calculated velocity auto correlation function however
don't understand how to keep initial velocities
The straightforward script gives me 1. It always substitute v0 to
current velocity.
#Part of the script:
reset_timestep 0
variable vx0 atom vx
variable vy0 atom vy
variable vz0 atom vz
variable V0X2 atom (v_vx0*v_vx0)
variable V0Y2 atom (v_vy0*v_vy0)
variable V0Z2 atom (v_vz0*v_vz0)
compute J0X2 all reduce sum v_V0X2
compute J0Y2 all reduce sum v_V0Y2
compute J0Z2 all reduce sum v_V0Z2
run 1
reset_timestep 0
variable VX2 atom (v_vx0*vx)
variable VY2 atom (v_vy0*vy)
variable VZ2 atom (v_vz0*vz)
compute JX2 all reduce sum v_VX2
compute JY2 all reduce sum v_VY2
compute JZ2 all reduce sum v_VZ2
variable ACF equal (c_JX2+c_JY2+c_JZ2)/(c_J0X2+c_J0Y2+c_J0Z2)
thermo_style custom step temp press etotal pe v_ACF vol
run 50
I would appreciate any help.
Best,
German Samolyuk