packmol_util
packmol_util is a Python library for preparing initial amorphous structures using Packmol.
Starting from composition, total atom count, density, and minimum separation constraints, it handles Packmol input generation, execution, and conversion of generated structures to POSCAR format.
Contents
- Design Philosophy
- Tutorial
- Build a structure from single-atom templates
- Specify number density
- Place molecular or structural units
- Low-level API
- Installing Packmol
- Packmol input files and the low-level API
- Density, composition ratios, and total atom count
- Structure recipes and templates
- Tetrahedral templates and RMC_POT FNC
- Output files and implementation constraints
- Installing bundled scripts and examples
- Reference
- packmol_util
Installing bundled scripts and examples
After pip install packmol-util, run the following commands in the working directory where you want the files:
packmol_util install scripts
packmol_util install example
The first command copies the contents of the repository’s scripts/ directory, while the second copies example/. Subdirectory structures are preserved. For example, example/Li3PO4/non_builder/make_Li3PO4.py becomes ./Li3PO4/non_builder/make_Li3PO4.py.
Existing files are not overwritten by default. To overwrite files with the same name, use --force:
packmol_util install scripts --force
packmol_util install example --force
Files are copied into the current working directory. Unrelated files are not deleted. This feature does not install the external Packmol executable.