Dear users

I have a question about how to compute the diffusion coefficient when involved with the diffusion process for an
interface system by using lammps ?
as you know , In inhomogeneous systems, molecules will stay in the region of interest only for a finite time and then will explore other regions. Since the diffusion coefficient will be different for different regions, the time dependence of the MSD, computed for particles initially in the region of interest, will become linear only at times long enough for the molecules to sample all regions, and then its slope will give the diffusion coefficient averaged over all regions.
How then will we be able to determine the diffusion coefficient for

the region of interest?

thanks very much
With regards !

Hi Da, I think if you are interested in the self-diffusion of atoms in interfacial region, you can just group the atoms in that area and then simulate a long enough time. During the diffusion process, the atoms will probably move out of the region you defined, but still they belong to the region you defined before diffusion (LAMMPS can do that). The warning is that you need average the MSD overall multiple time origins to obtain statistical accurate results (you can find more details in this document: http://utkstair.org/clausius/docs/mse614/pdf/diffusion_intro_v02.pdf). Thanks


Thank you very much, wang . Your advice is very useful to me.
I will learn what you share and do it .

Hello, Mr. Wang

I would like to ask you if the method you mentioned for calculating the self-diffusion coefficients of different regions is compute MSD /chunk?Then you can process the data according to the data you mentioned.

The simple expression is as follows:

compute cc1 all chunk/atom molecule

compute myChunk all msd/chunk cc1

fix 1 all ave/time 100 1 100 c_myChunk[*] file tmp.out mode vector

Sorry to trouble you.Thank you very much

Hello Da,

I am not meaning the compute chuck command. What I normally do is just using the “group” command, to group the atoms at the very beginning of the simulation. I.e., if you want to calculate the diffusion of atom in the interfacial region, then define a region (using region command) that includes the atoms in the interface, and then “group region…”, then obtain the MSD of the grouped atoms over the simulation period you run.

I normally just output the xyz coordinates of atoms, and using my own MATLAB code to extract the self-diffusivity, since the MSD output by LAMMPS only considers one time origin which is t=0 (the beginning of simulation). If your atoms are not moving (just lattice vibration), then your will not be able to extract self-diffuvisity. Thanks.


Hello jiaqi

Thank you very much for your kind answer. But there are several types of molecules in the interface area, I just want to work with one type of self diffusion coefficient of molecules, the group defined region is so type of molecular interface area.
Thank you very much for your advice, I think you use only output coordinates, then matlab processing method could achieve it.