Skip to main content

packmol_util

en ja

A Python utility kit for automatically generating amorphous initial structures (POSCAR) for first-principles calculations (VASP) and molecular dynamics (MD) simulations using Packmol.

By specifying only the stoichiometric ratio, density (mass density or number density), and total number of atoms, this tool automatically completes the full workflow: generating the Packmol input file, running Packmol, and outputting a POSCAR in VASP format with Direct coordinates.


💡 Features

  1. Intuitive density specification
    • Packmol itself does not interpret density or atomic weights, but this tool performs the required internal calculations and determines the cubic cell length $L$ that satisfies the specified density.
  2. Exclusion radius specification by element symbol
    • This hides Packmol's inconvenient atom-index-based specification inside XYZ files. Interatomic avoidance distances can be controlled using an intuitive element-name-based dictionary, such as {"P": 0.25, "O": 1.05}.
  3. Preservation of molecular units (geometries)
    • For systems such as $\text{Li}_3\text{PO}_4$, amorphization through mixing and packing can be performed while preserving intramolecular bond lengths, such as those in $\text{PO}_4$ tetrahedra.
  4. Extremely simple high-level API
    • By using AmorphousBuilder, the cumbersome file relay workflow (.inp construction $\rightarrow$ external execution $\rightarrow$ coordinate conversion) can be condensed into only a few lines of script.

📁 Directory structure

src/
├── packmol_util/
│
│   ├── __init__.py          # Package initialization file
│   ├── builder.py           # High-level integrated builder (AmorphousBuilder) ★NEW
│   ├── model.py             # Template XYZ generation and structure-definition module
│   ├── packmol.py           # Core density calculation, Packmol execution, and POSCAR conversion
│   ├── packmol_inp.py       # Parsing engine for constructing packmol.inp
│   ├── param.py             # Atomic weights and physical constants for the periodic table

└── example/                 # Location for material-specific generation scripts
    ├── Li3PO4/
    │   └── make_Li3PO4.py
    └── FeSiB/
        └── make_FeSiB.py

Metadata

Release files for packmol-util 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for packmol-util 0.2.5
File Size Uploaded
packmol_util-0.2.5.tar.gz 28.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for packmol-util 0.2.5
File Interpreter ABI Platform
packmol_util-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 59.6 kB

Release files / packmol_util-0.2.5.tar.gz

Download URL packmol_util-0.2.5.tar.gz
Size 28.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5eb1a4a050cebc206ee84cc9ab5e9e89cb3ccc9881fa177374606c057b0b4058
BLAKE2b-256 checksum
How to use checksums
e440f165aef2bebd0dab72747b4a0f2620a3b154d87fe00fa2ea22e348c87284
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / packmol_util-0.2.5-py3-none-any.whl

Download URL packmol_util-0.2.5-py3-none-any.whl
Size 31.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2edb0ada409acc4c5ca888f9e6f0a9677283cb89a1dddaf98c488d912b5ae9ae
BLAKE2b-256 checksum
How to use checksums
bf8ee896bfea4491079053a3e5466640b83021d55c85ca5444576bb728c6e57d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 release files

0.2.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page