Issue of outputting msd using fix ave/time command

Dear all,

I am using ‘compute msd’ command to get diffusion coefficient. What I am interested is the fourth element of msd array. Therefor, I used the following command:

group tenlipids molecule 1:1:10
compute 1 tenlipids msd
fix 1 tenlipids ave/time 1 1 5 c_1[4] file msd.dumpfile mode vector

However, it gives an error of ‘Fix ave/time compute does not calculate an array’.
By changing c_1[4] to c_1, I got a format like:

476235 4
1 1.22065
2 0.918748
3 1.60794
4 3.74734
476240 4
1 1.01229
2 1.13773
3 1.62627
4 3.77629

Is there a way by using lammps only without using matlab or c++ to post-processing the data to get the fourth array? I’m not sure why the lammps command gives error.

Thanks,
Sean!

Dear all,

I am using 'compute msd' command to get diffusion coefficient. What I am
interested is the fourth element of msd array. Therefor, I used the
following command:

group tenlipids molecule 1:1:10
compute 1 tenlipids msd
fix 1 tenlipids ave/time 1 1 5 c_1[4] file msd.dumpfile mode vector

However, it gives an error of 'Fix ave/time compute does not calculate
an array'.
By changing c_1[4] to c_1, I got a format like:
476235 4 1 1.22065 2 0.918748 3 1.60794 *4 3.74734* 476240 4 1
1.01229 2 1.13773 3 1.62627 *4 3.77629* Is there a way by using lammps
only without using matlab or c++ to post-processing the data to get the
fourth array? I'm not sure why the lammps command gives error.

​you get the error because you use "mode vector". you need "mode scalar",
i.e. the default.

axel.