Skip to main content

Small, dependency-light command-line tools for working with LAMMPS data/trajectory files.

Project description

lammps-md-tools

Small, dependency-light command-line tools for working with LAMMPS data/trajectory files.

This project is intentionally tiny:

  • minimal dependencies
  • deterministic behavior (good for automation/agents)
  • clear input/output contracts

Install / run

Run without installing (recommended)

Using uvx (from Astral's uv):

uvx --from lammps-md-tools lammps-fix-box --help

Install into an environment

python -m pip install -U lammps-md-tools

Commands

lammps-fix-box

Rewrite the box bounds in a LAMMPS data file to match a cubic box length L.

Typical use case: tools that convert XYZ -> LAMMPS data may leave default bounds (e.g. 0..100 Å) that do not match the actual packing box.

# rewrite bounds to 0..L and wrap atoms into the box
lammps-fix-box --in input.data --out output.boxfix.data --L 60.69 --wrap

# use a different origin (origin..origin+L)
lammps-fix-box --in input.data --out output.data --L 60.69 --origin -30.345

What it does

  • Rewrites header lines like xlo xhi, ylo yhi, zlo zhi to origin..origin+L.
  • If a xy xz yz tilt line is present, it is rewritten to 0 0 0 xy xz yz.
  • If --wrap is passed, wraps x y z coordinates into [lo, hi).

Assumptions / limitations

  • Assumes a common LAMMPS data layout with an Atoms section containing at least: atom-ID atom-type x y z [extra...]
  • It does not try to interpret/repair bonds, angles, velocities, etc.

Development

Build (wheel + sdist):

python -m pip install -U build
python -m build

License

MIT (see LICENSE).

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_md_tools-0.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

lammps_md_tools-0.1.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lammps_md_tools-0.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lammps_md_tools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ff84c29f27e4c59cb017e3630ae9e04a270f2e425c0b582fe3b1a720908a5c39
MD5 edeb24edc8143c84275418205b73a9ee
BLAKE2b-256 c7f19af0b8a125eed909b61b08c986350d2e6af1eeab28303e03ffc884ec4949

See more details on using hashes here.

Provenance

The following attestation bundles were made for lammps_md_tools-0.1.0.tar.gz:

Publisher: publish.yml on hcustc/lammps-md-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for lammps_md_tools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a33bf7cf865ba57eb25979bc659dd5e55bb6abedebdfc0da3aa51ca13d773a9f
MD5 d8c7048783b598229737424b7f96a46d
BLAKE2b-256 a7c495ef52399c5f1715be92ee10087103f3a12df9762c281b75f27d6dfb99ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for lammps_md_tools-0.1.0-py3-none-any.whl:

Publisher: publish.yml on hcustc/lammps-md-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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