Structgen
LAMMPS structure 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.
Structgen is a command-line utility for generating initial atomic configurations for use with LAMMPS simulations of disordered systems, especially oxide glasses. It supports ATOM and CHARGE pair_style-based atom definitions and allows flexible control over atomic counts, charges, and overall density.
Features
- Command-line interface with
argparse-based subcommands - Generates LAMMPS
.structurefiles with atomic positions and box boundaries - Supports charged species via
atom_style charge - Automatically estimates simulation box size based on input density
- Modular design: atom placement strategies are handled via handler classes
- Written for reproducible initial structure generation workflows
Installation
Install from PyPI
Regular installation using pip:
pip install lammps-structgen
Install directly from GitHub (bleeding-edge)
For the latest development version:
pip install git+https://github.com/DuGroup-FGM2L/structgen.git
Clone & install locally
For local experimentation or contributing:
git clone https://github.com/DuGroup-FGM2L/structgen.git
cd structgen
# 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, linting, and publishing tools:pip install .[dev]
Requires Python ≥ 3.9 and numpy.
Usage
After installation, invoke the CLI with:
structgen [subcommand] [options]
Available subcommands:
charge: Generate an initial structure for charge atom_style
Example usage:
structgen charge -a 28.085 -a 16.00 2 -1.2 -d 2.2 -f 100 -o si_o_glass.structure
This generates a structure with 100 Si atoms (mass 28.085) and 200 O atoms (mass 16.00, charge -1.2), with an overall density of 2.2 g/cm³. The structure will be written to si_o_glass.structure.
Documentation
All subcommands support -h or --help flags for detailed usage:
structgen charge --help
Design Overview
The project is modular:
cli.py: Main entry point, defines CLI and parses argumentshandlers/: Contains one handler class per placement strategy (CHARGE, etc.)constants.py: Shared constants (default count and charge)__init__.py: Exposes version metadatapyproject.toml: Build and dependency metadata
Each handler:
- Parses user-provided atomic specs
- Calculates simulation box size from density
- Randomly places atoms while avoiding overlap
- Returns header and atom sections for LAMMPS input
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
Metadata
Release files for lammps-structgen 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lammps_structgen-0.1.6.tar.gz | 21.5 kB | Without provenance | Details for lammps_structgen-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lammps_structgen-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for lammps_structgen-0.1.6-py3-none-any.whl |
Total release size: 46.5 kB
Release files / lammps_structgen-0.1.6.tar.gz
| Download URL | lammps_structgen-0.1.6.tar.gz |
|---|---|
| Size | 21.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
634a0179faeb4d2300172e01f00b828f7755710d5ec18ac07b611dc5a6ee1cdb
|
|
BLAKE2b-256 checksum How to use checksums |
c7c67d5758334fa0472076fe21d167ba7ba4ddea1db89225d0b13eec43eab3c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / lammps_structgen-0.1.6-py3-none-any.whl
| Download URL | lammps_structgen-0.1.6-py3-none-any.whl |
|---|---|
| Size | 25.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd6d49a3463e8a1094448d56e0311b08203b7fe698dce68866bfb57c95223940
|
|
BLAKE2b-256 checksum How to use checksums |
e880ccea1bb8d634a95823e7e2bc473fd19ceac429073caee39bbe2b2edb4090
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Security for lammps-structgen 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.