vmd-l: Calculating Diffusion Coefficient Using VMD

Thank you all so far for your contributions.

Axel, I have grouped the molecules I want to perform the MSD calculations on. But I found that the results are going against conventional wisdom; I found that the group of light molecules that I defined diffused lesser than the bigger group. I tried to output the trajectories for the different groups during the MSD calculation to be sure that the groups are rightly defined. Then, I found that the molecules in every group were not really moving. Instead, they were just vibrating in a single position during the entire 8ns run.

Here is what my input file looks like and I’m hoping maybe anyone can help identify what I did wrong since I have reread the commands and examples several times and looked in the mailing list for solutions but can’t find any. Thank you

#put dimethylnapthalene molecule in a group
group dimethyl molecule 6:35

velocity dimethyl create 300 97287
fix 1 dimethyl nve

data gathering run

reset_timestep 0

factor of 4 in 2 variables is for 2d (from manual, 4 is changed to 6 for 3D)

compute msd dimethyl msd com yes
variable twopoint equal c_msd[4]/6/(stepdt+1.0e-6)
fix 9 dimethyl vector 10 c_msd[4]
variable fitslope equal slope(f_9)/6/(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 dimethyl custom 10000 dimethyl-300K.dump id type vx vy vz

#dump 2 all image 100 image.*.jpg type type zoom 1.6 adiam 1.2

dump VMD dimethyl custom 1000 dump_msd_dimethyl.lammpstrj id mol type x y z ix iy iz

thermo 1000

run 8000000

Thank you all so far for your contributions.

Axel, I have grouped the molecules I want to perform the MSD calculations on. But I found that the results are going against conventional wisdom; I found that the group of light molecules that I defined diffused lesser than the bigger group. I tried to output the trajectories for the different groups during the MSD calculation to be sure that the groups are rightly defined. Then, I found that the molecules in every group were not really moving. Instead, they were just vibrating in a single position during the entire 8ns run.

Here is what my input file looks like and I’m hoping maybe anyone can help identify what I did wrong since I have reread the commands and examples several times and looked in the mailing list for solutions but can’t find any. Thank you

#put dimethylnapthalene molecule in a group
group dimethyl molecule 6:35

velocity dimethyl create 300 97287
fix 1 dimethyl nve
fix 2 all langevin 300 300 100 498094

data gathering run

reset_timestep 0

factor of 4 in 2 variables is for 2d (from manual, 4 is changed to 6 for 3D)

compute msd dimethyl msd com yes
variable twopoint equal c_msd[4]/6/(stepdt+1.0e-6)
fix 9 dimethyl vector 10 c_msd[4]
variable fitslope equal slope(f_9)/6/(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 dimethyl custom 10000 dimethyl-300K.dump id type vx vy vz

#dump 2 all image 100 image.*.jpg type type zoom 1.6 adiam 1.2

dump VMD dimethyl custom 1000 dump_msd_dimethyl.lammpstrj id mol type x y z ix iy iz

thermo 1000

run 8000000