Comput msd V.S. compute msd/chunk

Hi everyone,
I would like to ask for your help with a question I have about computing MSD from compute msd and compute msd/chunk. I have noticed that the result from msd/chunk are significantly different from msd. While compute msd shows a liner relationship between timestep and MSD, compute msd/chunk was expected to show a similar result because the system is uniform everywhere. However, I have observed strong tfluctuations in the MSD values of each chunk from compute msd/chunk, and the maximum MSD values are much larger than those from compute msd. I am wondering if there might be an error in my code that is causing these discrepancies. Thank you very much in advance for your help.

This is part of my code and results:

# define bins and compute for "compute msd/chunk"----------------------------
group								O type 1
group								Si type 2
group								Al type 3
group								Ca type 4
variable						cx equal "(xhi+xlo)/2"
variable						cy equal "(yhi+ylo)/2"
variable						cz equal "(zhi+zlo)/2"

compute							bins_O O chunk/atom bin/sphere ${cx} ${cy} ${cz} 10 50 40
compute							bins_Si Si chunk/atom bin/sphere ${cx} ${cy} ${cz} 10 50 40
compute							bins_Al Al chunk/atom bin/sphere ${cx} ${cy} ${cz} 10 50 40
compute							bins_Ca Ca chunk/atom bin/sphere ${cx} ${cy} ${cz} 10 50 40

compute							msd_O all msd/chunk bins_O
compute							msd_Si all msd/chunk bins_Si
compute							msd_Al all msd/chunk bins_Al
compute							msd_Ca all msd/chunk bins_Ca
# define "compute msd"-------------------------------------------------------------
compute							msd_all_O O msd
compute							msd_all_Si Si msd
compute							msd_all_Al Al msd
compute							msd_all_Ca Ca msd

# run a simulation--------------------------------------------------------
reset_timestep			        0
fix								1 all nve
fix 							2 all ave/time 1 1 10 c_msd_O[4] c_msd_Si[4] c_msd_Al[4] c_msd_Ca[4] file msd_chunk_matrix.txt mode vector
fix 							3 all ave/time 1 1 10 c_msd_all_O[4] c_msd_all_Si[4] c_msd_all_Al[4] c_msd_all_Ca[4] file msd_all_matrix.txt mode scalar
run								10000

This is the MSD of compute msd, a liner relationship can be seen:

  • msd.png
    This is the MSD in chunk 20 for Ca:
    msdchunk.png

The documentation states* that compute msd/chunk calculates the mean square displacement of the centre-of-mass of each chunk.

Consider a set of concentric spherical shells (since you are chunking using bin/sphere). Where will their centres of mass be? How will these centres of mass move over time?

*not explicitly in the first paragraph, but the description of output quantities is very clear on this.

In addition, the assignment of atoms to the chunks/bins will change over time, since the bins don’t move. The msd/chunk command is most suitable when the chunks are molecules. It used to be compute msd/molecule before we introduced the chunk system with its large flexibility. But with all those permutations of possible combination of chunk assignments and per-chunk computations, some just don’t make sense.

Besides a per-bin chunked MSD has a conceptual problem: which atoms do you include? those that are within the same bin (or chunk) at the beginning of an interval? or at the end? or stay in the same chunk all the time? The first two options make little sense when you extend the computation over a long time (as required by the MSD algorithm) and the third option is not possible with compute chunk/atom and also is biased toward atoms that don’t move (and stay within the same bin).

Thank you, Mr Srtee.

Thank you for your reply.