Skip to main content

A set of tools for parsing Lammps and ReaxFF output

Project description

Installation

For the core CLI tools to be installed as scripts it is reccomended that you install them using uv. This can be done by running the command:

uv tool install ben-lammps-utils

The tools can also be installed using the standart pip installation in a conda or venv environment:

pip install ben-lammps-utils

To use the package in your own applications the ben-lammps-utils functions can be imported afer pip installation, or using uv add functionality.

Use and Features

CLI Tools

ben-lammps-utils comes with two built in CLI tools that can be installed and used system wide.

spec2csv

The spec2csv command can be used to convert ReaxFF species out files to a more human readable csv format. It can be used on one species out file, or a range of species out files that match a pattern.

spec_qp

The spec_qp command can be used to generate a quick plot of species from species out data using either the species out file or a csv. It has built in functionality to either plot specified species, or plot N species that have a maximum count.

Package Functions

read_species_out()

Reads a reaxff formatted species out file and gives a pandas dataframe

Parameters

file_name (str): The Path to the species out file

Returns

pandas dataframe holding all of the data

read_in_stdout()

Reads a Lammps formatted standardout file and gives a list of pandas dataframes for each run section thermo data

Parameters

file_name (str): The Path to the species out file

Returns

a list of pandas dataframes holding all of the thermo data

convert_to_csv()

converts a species out file to a csv file

Parameters

input_file_name (str): The name that matches the species file.

output_file_name (str): The name of the csv file to output to.

Returns

None: creates a csv file

convert_all_to_csv()

converts all species out files that match a pattern to a csv of the same name

Parameters

input_file_pattern (str): the pattern that matches the species files.

Returns

None: creates csv files

species_to_csv_UI()

Identical to using the spec2csv

read_in_data()

Reads in a data file from a species out file or csv

Parameters

file_name (str): the name of the file to read in

Returns

Pandas Dataframe

get_n_max()

Gets The N species that have maximum counts

Parameters

dataframe (pandas.DataFrame): the data frame read in from a species out file.

num_vals (int): The numberr of species to plot

ignore (list[str]): A list of species to ignore for maximums

Returns

list[str]: a list of N species that have maximum counts

get_n_max_cycle()

Gets The N species that have maximum counts interactively

Parameters

dataframe (pandas.DataFrame): the data frame read in from a species out file.

num_vals (int): The numberr of species to plot

ignore (list[str]): A list of species to ignore for maximums

Returns

list[str]: a list of N species that have maximum counts

species_vs_time_quickplot()

Quickly plots species out. Parameters

dataframe (pandas.DataFrame): a dataframe containing information from the species out file.

keys_to_plot (list[str]): a list of the species of interest.

time_step_lower (int): the lower bound for time steps to plot

time_step_upper (int): the upper bound of time steps to plot

is_transparent (bool): Wether or not the background should be transparent

outfile_name (str): The name of the file figure will be saved to.

figure_title (str): The Title at the top of the figure.

Returns

The matplotlib figure and axis. Saves a figure.

plot_species_UI()

Identical to calling spec_qp command

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ben_lammps_utils-0.9.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ben_lammps_utils-0.9.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file ben_lammps_utils-0.9.0.tar.gz.

File metadata

  • Download URL: ben_lammps_utils-0.9.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.2

File hashes

Hashes for ben_lammps_utils-0.9.0.tar.gz
Algorithm Hash digest
SHA256 9cfb3fdebce52ae8bfceddda6abed4a0dc1d0d351fbb56c6cdc6c7b7d65bd1b9
MD5 10cef0d07dc9ccecab8f64ad67917372
BLAKE2b-256 3b602f86ea8304de51fa90181a2f8cbf3a063d9d126194570b8f81c800da7211

See more details on using hashes here.

File details

Details for the file ben_lammps_utils-0.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ben_lammps_utils-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c5c0dcef0fcb6f9698f85f170363a152a24e283b9d2729b19a89e2ed39ed9c65
MD5 c22632f147d0ba528e5ea93de50c5544
BLAKE2b-256 27d4f258bd1f204b26e63b634a2aadffe4f099d62d066f4a5d40c30e15c7ca65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page