sportran.i_o.read_lammps_log

Functions

data_length(file)

file_length(file)

is_string(string)

is_vector_variable(string)

main()

This script extracts the desired columns from a LAMMPS Log file and saves them into a Numpyz file for later use.

save_numpy_dict(lammpslogfile_obj, out_file)

Takes a LAMMPSLogFile object, a LAMMPS structure data file (optional), takes

Classes

LAMMPSLogFile(data_file[, run_keyword, ...])

A package that reads a LAMMPS Log file and organizes it into a dictionary according to the column headers.

sportran.i_o.read_lammps_log.data_length(file)
sportran.i_o.read_lammps_log.file_length(file)
sportran.i_o.read_lammps_log.is_string(string)
sportran.i_o.read_lammps_log.is_vector_variable(string)
sportran.i_o.read_lammps_log.main()

This script extracts the desired columns from a LAMMPS Log file and saves them into a Numpyz file for later use.

Example: start reading when “PRODUCTION RUN” is found, read “flux1” and “Press” columns from log.lammps log file and structure.data data file (containing structure):

python read_lammps_log.py log.lammps structure.data out.npz -k flux1 Press -d “PRODUCTION RUN”

sportran.i_o.read_lammps_log.save_numpy_dict(lammpslogfile_obj, out_file, select_ckeys=None, lammps_data_file=None)

Takes a LAMMPSLogFile object, a LAMMPS structure data file (optional), takes the desired columns and save data into a Numpyz file.

Parameters
  • lammpslogfile_obj = LAMMPSLogFile object

  • out_file = numpy output file to be saved

  • select_ckeys = name of variables to be saved

  • lammps_data_file = LAMMPS data file containing the structure information – (generated using the write_data command)

    # example to save data into a Numpyz file: save_numpy_dict(lammpslogfile_object, ‘flux.npy’, [‘flux’], ‘lammps.data’)