Welcome to the ZacrosTools documentation
ZacrosTools is a versatile toolkit designed to simplify the preparation and analysis of Kinetic Monte Carlo (KMC) simulations with Zacros.
Key features
Automatize the creation of Zacros input files
Quickly read, analyze, and process Zacros output files
Perform scans over different pressures and temperatures
Extensive documentation with detailed examples to help users get started
How to cite
If you use ZacrosTools in your research, please cite:
Prats, H. ZacrosTools: A Python Library for Automated Preparation, Analysis, and Visualization of Kinetic Monte Carlo Simulations with Zacros. J. Phys. Chem. A 2025, 129, 6608–6614. DOI: 10.1021/acs.jpca.5c02802
Installation
ZacrosTools is available on PyPI and can be installed using pip:
pip install zacrostools
Prerequisites:
Alternatively, the latest development version can be installed from GitHub as follows:
git clone https://github.com/hprats/ZacrosTools.git
cd ZacrosTools
pip install .
Recent changes
Version 2.11 — 2025-11-04
Changed
Mode rename and new definition in
dtof.py:The former
difference_type='relative'mode (which computed the ratio|TOF(main)/TOF(ref)|) has been renamed todifference_type='ratio'.A new
difference_type='relative'is introduced to compute the percent difference:
ΔTOF_rel = (TOF(main) − TOF(ref)) / TOF(ref) × 100
Added
New
difference_typeoptions inplot_dtime:Added support for
difference_type='ratio':
Δt = t(main) / t(ref)The colorbar is logarithmic, spanning [10⁻ᴺ, 10⁺ᴺ], and centered at 10⁰.
Added support for
difference_type='speedup':Uses the same ratio definition as above, but the colorbar spans [10⁰, 10⁺ᴺ], showing only values ≥ 1.
Version 2.10 — 2025-11-03
Changed
Redefined relative ∆TOF calculation in
dtof.py:The
difference_type='relative'mode now computes |TOF(main) / TOF(ref)| instead of the previous fractional form (TOF(main) - TOF(ref)) / |TOF(ref)|The colorbar for relative ∆TOF is now logarithmic by default, centered at 10⁰ (ratio = 1).
The range automatically adapts to the nearest order of magnitude of the data (e.g., from 10⁻² to 10²).
Users may still specify
max_dtofto manually set the range; the colorbar will then span[10^{-N}, 10^{+N}], where10^Nis the closest power of ten to the given value.
When using
difference_type='relative', thescaleparameter is automatically forced to'log'.
Improved automatic titles in heatmaps::
In
heatmaps.time,auto_title=Truenow omits units from the title.In
heatmaps.coverageandheatmaps.phasediagram,auto_title=Truenow omits the site type name if a default lattice is used.
Removed
Deprecated
percentparameter:The
percentkeyword is no longer supported inplot_dtof().
Version 2.9 — 2025-10-07
Fixed
Missing heatmaps subpackage in PyPI builds: The
zacrostools.heatmapsfolder is now correctly included in the package distribution.Added an
__init__.pyfile to ensure it is recognized as a subpackage.Users can now successfully import plotting functions such as:
from zacrostools.heatmaps.tof import plot_tof from zacrostools.heatmaps.coverage import plot_coverage from zacrostools.heatmaps.phasediagram import plot_phasediagram
This fix ensures compatibility when installing ZacrosTools via
pipor from PyPI.
Version 2.8 — 2025-10-01
Added
Monoatomic gas species support:
GasModelnow accepts a thirdtypevalue:"monoatomic".For monoatomics, rotational partition is treated as 1, so
sym_numberandinertia_momentsmay be omitted or set toNone.CSVs that contain only monoatomic species no longer need
sym_numberorinertia_momentscolumns.Works seamlessly with
ReactionModeland the updated partition/pre-exponential functions.
Changed
Fixed pre-exponential factors are now step-level fields: Instead of passing
fixed_pre_expon/fixed_pe_ratiotoReactionModel.write_mechanism_input(), define them per step (like other optional columns).New optional columns on each step:
fixed_pre_expon(float): forward pre-exponential written as-isfixed_pe_ratio(float): ratiope_fwd/pe_revwritten as-is
When provided together for a step, ZacrosTools does not apply manual scaling or graph multiplicity to that step’s pre-exponential.
Incompatibilities are enforced:
stiffness_scalable_steps='all'is not allowed if any step is fixedA fixed step cannot appear in
stiffness_scalable_stepsA fixed step cannot appear in
stiffness_scalable_symmetric_steps
Version 2.7 — 2025-09-25
Added
Fixed pre-exponential option: Users can now fix the pre-exponential factor (
pre_expon) and ratio (pe_ratio) of selected steps by providingfixed_pre_exponandfixed_pe_ratiodictionaries toReactionModel.write_mechanism_input(). This bypasses automatic computation.Incompatible with
stiffness_scalable_steps='all'.Incompatible with listing fixed steps in either
stiffness_scalable_stepsorstiffness_scalable_symmetric_steps.
Full details are available in the ZacrosTools CHANGELOG.
What’s next
We plan to continue improving ZacrosTools with additional features, optimizations, and support for more advanced Zacros functionalities. Contributions are welcome!
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributors
Hector Prats - hector.prats@tuwien.ac.at
Acknowledgements
Zeyu Wu