GEMDAT-repos / GEMDAT

Python toolkit for molecular dynamics analysis
https://gemdat.readthedocs.io
Apache License 2.0
21 stars 3 forks source link

Add LAMMPS trajectory reader #327

Closed stefsmeets closed 1 month ago

stefsmeets commented 1 month ago

This PR implements a lammps reader for #47

Usage:

from gemdat import Trajectory
traj = Trajectory.from_lammps(
    coords_file='lammps_coords.xyz',  # trajectory data
    data_file='lammps_data.txt',      # box file, contains lattice
    temperature=700,
    time_step=2,
)

The file loading is fairly quick (couple of seconds for 100k steps with 80 atoms). The trajectory is cached for repeated loads.

image

Todo