packmol_util
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
- 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.
- 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}.
- 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
- 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.
- Extremely simple high-level API
- By using
AmorphousBuilder, the cumbersome file relay workflow (.inpconstruction $\rightarrow$ external execution $\rightarrow$ coordinate conversion) can be condensed into only a few lines of script.
- By using
📁 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.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| packmol_util-0.2.4.tar.gz | 24.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| packmol_util-0.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.4 kB
Release files / packmol_util-0.2.4.tar.gz
| Download URL | packmol_util-0.2.4.tar.gz |
|---|---|
| Size | 24.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb9f1e57e9979b59931d7a8091840ec109487f7c1e26744a771945c5c0ab5e62
|
|
BLAKE2b-256 checksum How to use checksums |
be75270fe17e5b27652c905ffb18ec7219aa9066f1382a9d281f703d4109551f
|
| 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 7, 2026.
Transparency logRelease files / packmol_util-0.2.4-py3-none-any.whl
| Download URL | packmol_util-0.2.4-py3-none-any.whl |
|---|---|
| Size | 26.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1252ebbf91f88e68d0e21452cb9a3eed3051f79acbb57015cc274b3a900acdc9
|
|
BLAKE2b-256 checksum How to use checksums |
59e8cb5a69ead382a2df251afac499784ad5039f80561a281e4860e6d75b5032
|
| 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 7, 2026.
Transparency log