# diffusion coefficient versus distance from surface,

Dear All users,

I want to calculate the water diffusion coefficient in the
directions perpendicular and parallel to the surface. Is it possible in lammps e.g with using fix ave/spatial command?

Dear Yanqing,

I knew and I have calculated successfully the diff coeff for a bulk of water. But I wanted to know when there is a bulk of water on a surface it is possible to calculate diff coeff

versus distance from the surface e.g in direction z or not.

Compute msd will give you the x,y,z components of MSD.

Steve

Dear Steve,
Thank you for your reply, but I meant I want to record diff coeff for every 1 angstrom intervals from the surface.

Dear Steve,
Thank you for your reply, but I meant I want to record diff coeff for every 1 angstrom intervals from the surface.

That just doesn’t make sense.

How would you want to treat an atom that diffuses from one layer to the next? Or crosses multiple?

Dear Axel,

There is some molecules near the surface which have been covered by those molecules and other molecules are located far from this layer.

Dear Axel,

There is some molecules near the surface which have been covered by those molecules and other molecules are located far from this layer.

So what?

What has this to do with your question?

I have studied an article including this analysis and I wanted to do this analysis for my system. They calculated diff coeff as a function of distance from the surface.

you are a hopeless case.
this *still* doesn't answer the question how you will be handling the
ambiguity i mentioned (or people in the paper did). unless you come up
with an answer for this very fundamental issue, nobody with integrity
will be able to provide a suggestion.

so put your thinking cap on and put that brain of yours to work.

axel.

Anyway, Axel

well, and you too.

I meant you are right, did you mean I was right?

is that a trick question?

take it easy Axel, you are always right.

just trying to show you how it is when people respond by not answering