Skip to main content

Generator for LAMMPS initial atomic structures for glassy systems.

Project description

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 CHARGE-style atom definitions and allows flexible control over atomic counts, charges, and overall density.

Features

  • Command-line interface with argparse-based subcommands
  • Generates LAMMPS .structure files 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 (coming soon)

This package will be published to PyPI. Once available, you'll be able to install it with:

pip install lammps-structgen

Install directly from GitHub (bleeding-edge)

For the latest development version:

pip install git+https://github.com/superde1fin/structgen.git

Clone & install locally

For local experimentation or contributing:

git clone https://github.com/superde1fin/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 arguments
  • handlers/: Contains one handler class per placement strategy (CHARGE, etc.)
  • constants.py: Shared constants (default count and charge)
  • __init__.py: Exposes version metadata
  • pyproject.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 (if defined):

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


Download files

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

Source Distribution

lammps_structgen-0.1.0.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

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

lammps_structgen-0.1.0-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file lammps_structgen-0.1.0.tar.gz.

File metadata

  • Download URL: lammps_structgen-0.1.0.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for lammps_structgen-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ccefbc450f906aef204af19116fef4f63b017728f453277bcc275871b123e329
MD5 9d82f601cec7ba9339997c5a23cb2fa0
BLAKE2b-256 e56c605e1abab0ab6eafb37505dd73371facc38eaa0f7c49c71ed1511d02def1

See more details on using hashes here.

File details

Details for the file lammps_structgen-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lammps_structgen-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b42b004b0b7b75b16f3b4e2f907befd4cbf984f1bc299c8ab1d007106ae664b
MD5 c8269b4606361b15af5554459df82724
BLAKE2b-256 09c53de9e3f39c0b2ca22bcb3e9a6cf40109ff112fe46108f29ead5669622de5

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