diffusion coefficient

Dear All users,

I have a box with gas liquid interface. I want to calculate diffusion coefficient of gas molecules in liquid (calculate msd of gas molecules in liquid layer).
How can I do?

Thanks!

Dear All users,

I have a box with gas liquid interface. I want to calculate diffusion
coefficient of gas molecules in liquid (calculate msd of gas molecules in
liquid layer).
How can I do?

that is a non-trivial task.

the general procedure is outlined here
http://lammps.sandia.gov/doc/Section_howto.html#howto_22
but you have to address the issue how you are going to handle
molecules that are leaving or entering the liquid phase as both
methods require to follow atoms for an extended period.

the easiest approach to that is probably to take note of the average
gas concentration in the bulk phase and then do a second simulation
that only simulates a bulk system with the same gas molecule
concentration and density. now you only have to worry about what part
of your system you consider bulk so that you have consistent
parameters for the second simulation.

axel.