Generator for LAMMPS two-body and three-body tabulated potentials.
Project description
Tablegen
LAMMPS potential table generator for LAMMPS, developed by Vasilii Maksimov at the Functional Glasses and Materials Modeling Laboratory (FGM²L) at the University of North Texas, under the supervision of Dr. Jincheng Du.
Tablegen is a command-line utility for generating two-body and three-body potential tables for use with LAMMPS simulations. It supports several interaction models commonly used in materials science and glass chemistry, including:
- SHIK potential (Buckingham + Wolf summation)
- Classical Buckingham potential
- Extended Buckingham potential with softening
- Truncated harmonic three-body interactions
🔧 Features
- Command-line interface with
argparse-based subcommands - Supports plotting potential curves with
matplotlib - Generates
.tableand.3bfiles directly usable in LAMMPS - Fully modular: new potentials can be added as new handler classes
- Handles numeric precision using
mpmath - Actively developed for materials modeling workflows
📦 Installation
Install from PyPI (preferred)
The package is now published on PyPI you can install the latest stable release with:
pip install lammps-tablegen
Install directly from GitHub (bleeding‑edge)
If you need the most recent commit:
pip install git+https://github.com/superde1fin/tablegen.git
Clone & install locally
For local experimentation or contributing:
git clone https://github.com/superde1fin/tablegen.git
cd tablegen
# Standard install (no dev extras)
pip install .
# OR editable install (auto‑reload while editing)
pip install -e .
Tip : add the
[dev]extra to pull in testing, type‑checking, and release tools:pip install .[dev]This installs
pytest,ruff,mypy,twine, and other developer utilities declared in pyproject.toml.
Requires Python ≥ 3.9 and a working C/Fortran toolchain if installing numpy from source.
🥪 Usage
After installation, invoke the CLI with:
tablegen [subcommand] [options]
Available subcommands:
shik: Generate two-body tables using the SHIK potentialbuck: Generate tables using the standard Buckingham potentialbuck_ext: Use the extended Buckingham potential with softened short-range repulsion3b_trunc: Generate three-body truncated harmonic tables
Example usage:
tablegen shik structure_file.lmp Si O -t SHIK.table -p
tablegen buck Na-O Si-O -c 10 -d 5000 -t buck.table -p -10 10
📚 Documentation
All subcommands support -h or --help flags for detailed usage:
tablegen shik --help
🧠 Design Overview
The project is modular:
cli.py: Main entry point, defines CLI and parses argumentshandlers/: Contains one handler class per potential type (SHIK,BUCK, etc.)constants.py: Shared constants (e.g., cutoffs, physical constants, default coefficients)__init__.py: Exposes handler classes and version metadatapyproject.toml: Build and dependency metadata
Each handler:
- Parses user-provided arguments
- Validates species/pair/triplet input
- Prompts for coefficients
- Provides
eval_forceandeval_potmethods used bytwo_body()orthree_body()
📈 Plotting
If the --plot option is passed, matplotlib will be used to visualize the potential curves for the specified pairs or triplets.
🥪 Development
Install dev dependencies:
pip install .[dev]
Run tests:
pytest
🔖 License
GNU General Public License v3.0 (GPLv3). See LICENSE for details.
👤 Author
Vasilii Maksimov
University of North Texas
✉️ VasiliiMaksimov@my.unt.edu
🌐 Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lammps_tablegen-0.1.1.tar.gz.
File metadata
- Download URL: lammps_tablegen-0.1.1.tar.gz
- Upload date:
- Size: 22.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ff8604d0b2ffa1146b728938b04fb300674109f6ac3a701cc24520c5232934b
|
|
| MD5 |
ae64cf2dccf0176c388a156042c253ea
|
|
| BLAKE2b-256 |
eab254f926b86e07517e04f7d3aa40e97d18dd99e31637f25a98a81c62b92b93
|
File details
Details for the file lammps_tablegen-0.1.1-py3-none-any.whl.
File metadata
- Download URL: lammps_tablegen-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
864f9e6f64d0de7c50b845441f6946d7f679e35e8779c98ec7715038c19671c0
|
|
| MD5 |
6ee14a32beacecb2c78052db8eead016
|
|
| BLAKE2b-256 |
fa1dd9b390902da89050da4bc56c97df813e161d416e777af757f0a72358e70e
|