Regarding RDF and MSD calculation

Hi all

I want to calculate the RDF and MSD for a heterogeneous system.

For RDF calculation- I want to calculate the distance of gas molecules from surface. In LAMMPS I have used the command like this

group gas id 5017:5317

compute RDF gas rdf 500
fix 1 gas ave/time 100 500 1000000 c_RDF[*] file rdf.txt mode vector

I am bit confuse that whether this calculating the RDF of gas with the respect of surface or not.

regarding to MSD calcultation I have used the command like this

compute MSD gas msd com yes
fix 2 gas ave/time 100 1 100 c_MSD file msd.txt mode vector

Is it calculatiing the displacement of the gas molecules in the system with time?

Thanks in advance

Anderson

Houston University

I suggest you dump out some snapshots of a small system

to a dump file. Maybe it just has 2 or 10 atoms.
Then compute for yourself the RDF and MSD

values you expect to get. If you write a script/program
to do this, you can run it on any size dump file.
See if LAMMPS is producing the same values.

If something doesn’t seem right, then post a Q.

There are a 1000 variations on the Q: Is this LAMMPS command

doing what I want it to? Knowing how to check for yourself

that you are getting valid values is a great skill to acquire.

Steve

Hi all

I want to calculate the RDF and MSD for a heterogeneous system.

For RDF calculation- I want to calculate the distance of gas molecules
from surface. In LAMMPS I have used the command like this

group gas id 5017:5317

compute RDF gas rdf 500
fix 1 gas ave/time 100 500 1000000 c_RDF[*] file rdf.txt mode vector

I am bit confuse that whether this calculating the RDF of gas with the
respect of surface or not.

​you seem to be confused about what a *radial* distribution function is as
well.
what you describe that you want to look at sounds like a 1-d density
profile, which is a *very* different thing.​

regarding to MSD calcultation I have used the command like this

compute MSD gas msd com yes
fix 2 gas ave/time 100 1 100 c_MSD file msd.txt mode vector

Is it calculatiing the displacement of the gas molecules in the system
with time?

​compute msd computes what the documentation says.​ as steve already said,
to be certain to understand what you are doing, you need to make tests with
extremely simple input decks an compare them to manual computations (or
scripts).

axel.