Quick start
Installation
PyPi install
pip install readlammpsdata
Github install
git clone git@github.com:eastsheng/readlammpsdata.git cd readlammpsdata pip install .
Tests
print version
import readlammpsdata as rlt print(print_version()) """ -------------------------------------------------- @readlammpsdata-1.0.9 >>> A script for reading and modifying LAMMPS data! -------------------------------------------------- """
read data
Atoms = read_data(lmp="PVP.lmp", data_sub_str = "Atoms") print(Atoms) """ >>> Read data Atoms successfully ! 1 1 1 -0.35160000 1.000 1.00000 0.00000 2 1 2 0.13720000 -0.337 1.00000 0.00000 3 1 3 -0.79220000 -1.134 1.00000 1.11526 ... 13 1 13 0.10870000 0.222 0.44931 2.64132 14 1 14 0.11370000 -1.868 0.86334 4.30672 15 1 15 0.11370000 -1.804 -0.58670 3.28942 16 1 16 0.14040000 -3.408 1.94658 2.77089 17 1 17 0.14040000 -3.873 0.22675 2.53818 """ Masses = read_data(lmp="PVP.lmp", data_sub_str = "Masses") PairCoeffs = read_data(lmp="PVP.lmp", data_sub_str = "Pair Coeffs") Bonds = read_data(lmp="PVP.lmp", data_sub_str = "Bonds")