RDF and MSD calculation

Dear LAMMPS users,

I am a new user with LAMMPS. And I would like to use LAMMPS to calculate radial distribution function (RDF) and mean square displacement (MSD).
Unfortunately, the trajectories weren’t calculated in LAMMPS. I used VMD to observe and convert to the format of LAMMPS trajectories.
To calculate RDF and MSD, I think I have to:
- read data in trajectory file.
- run commands to calculate RDF and MSD.
However, I found that read_data command only reads initial coordinate. My trajectory includes several hundred frames.
How can I read data for this trajectory?
And is it possible to calculate RDF and MSD using LAMMPS if the trajectory weren’t calculated in LAMMPS?

Best regards,
Ha Linh |

Dear LAMMPS users,

I am a new user with LAMMPS. And I would like to use LAMMPS to calculate
radial distribution function (RDF) and mean square displacement (MSD).
Unfortunately, the trajectories weren't calculated in LAMMPS. I used VMD to
observe and convert to the format of LAMMPS trajectories.
To calculate RDF and MSD, I think I have to:
- read data in trajectory file.
- run commands to calculate RDF and MSD.
However, I found that read_data command only reads initial coordinate. My
trajectory includes several hundred frames.
How can I read data for this trajectory?

You cannot.

And is it possible to calculate RDF and MSD using LAMMPS if the trajectory
weren't calculated in LAMMPS?

No, it is not possible.
      Axel

Best regards,
Ha Linh

Dear Ha Linh,

LAMMPS’s built-in tools for calculating RDF’s and MSD’s are only useful in the context of actually running a simulation.

You’d be much better off writing your own code, or using a tool like Pizza.py (which is also distributed alongside LAMMPS on the website) as a starting point. However, adding the overhead of LAMMPS to post-processing your existing data sounds like an ill-advised idea.

—AEI

Dear LAMMPS users,

I am a new user with LAMMPS. And I would like to use LAMMPS to calculate
radial distribution function (RDF) and mean square displacement (MSD).
Unfortunately, the trajectories weren't calculated in LAMMPS. I used VMD
to observe and convert to the format of LAMMPS trajectories.

since you have used VMD, why not use VMD for you analysis.
it *does* have a tool to compute radial distribution functions integrated
and using Tcl scripting in VMD to compute mean squared displacements
isn't that difficult either. i may even have a Tcl script fragment doing
this somewhere on my hard drive.

axel.