Hi all,
I am quite new to lammps and I am struggling to design my input file. I am studying diffusion properties of a material and for this reason I need to track the positions of each of the atoms at each timestep. Then,I would like to analyze them on python with some code I already have that I used for my vasp simulations.
My question is: how can I best extract this information from lammps? and how is this information loaded into python usually? (recommended libraries, etc)
thanks so much for your help!
Writing out a trajectory with every time step is going to be hugely inefficient and going to consume a lot of storage. Unlike with VASP, the force computation in LAMMPS is rather fast.
Also, information from adjacent timesteps is highly correlated, so it doesn’t really contribute much to the results. For most (statistical) analysis it is sufficient to write out every picosecond for very accurate results, which corresponds to roughly once every 1000 time steps
Writing trajectory data is done with the dump command. If you want to load trajectory data into python, you can use the python “dump” class in tools/python/pizza/dump.py
(for dump styles atom or custom) or you can use dump style yaml and use the python yaml support to load those files directly: 8.3.9. Output structured data from LAMMPS — LAMMPS documentation
Please note that LAMMPS also has a large variety of built in analysis commands, most of which can take advantage of running in parallel and thus tend to be superior to self-written tools. At the very least it is possible to already get pre-processed data for further processing.
The LAMMPS manual has some examples and Howto documents.
1 Like