Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ include kmos/*.dtd
include kmos/fortran_src/*f90
include kmos/kmc_editor.glade
include kmos/fortran_src/assert.ppc
include README.rst
include INSTALL.rst
include COPYING
175 changes: 175 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
# kmos

[![CI](https://github.com/mhoffman/kmos/actions/workflows/ci.yml/badge.svg)](https://github.com/mhoffman/kmos/actions/workflows/ci.yml)

**kMC modeling on steroids**

*A vigorous attempt to make lattice kinetic Monte Carlo modeling more accessible.*

kmos is a tool for kinetic Monte Carlo (kMC) modeling focused on lattice models for surface science applications.

Copyright (C) 2009-2025 Max J. Hoffmann <mjhoffmann@gmail.com>

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later
version.

## Features

- Lattice-based kinetic Monte Carlo simulations
- Support for complex surface chemistry models
- Written in Python with Fortran backend for performance
- Integration with ASE (Atomic Simulation Environment)
- Interactive GUI for model editing and visualization
- High-performance kMC solver with multiple backends

## Installation

```bash
pip install kmos
```

## Quickstart

Create a minimal input file `mini_101.ini`:

```ini
[Meta]
author = Your Name
email = you@server.com
model_dimension = 2
model_name = fcc_100

[Species empty]
color = #FFFFFF

[Species CO]
representation = Atoms("CO", [[0, 0, 0], [0, 0, 1.17]])
color = #FF0000

[Lattice]
cell_size = 3.5 3.5 10.0

[Layer simple_cubic]
site hollow = (0.5, 0.5, 0.5)
color = #FFFFFF

[Parameter k_CO_ads]
value = 100
adjustable = True
min = 1
max = 1e13
scale = log

[Parameter k_CO_des]
value = 100
adjustable = True
min = 1
max = 1e13
scale = log

[Process CO_ads]
rate_constant = k_CO_ads
conditions = empty@hollow
actions = CO@hollow
tof_count = {'adsorption':1}

[Process CO_des]
rate_constant = k_CO_des
conditions = CO@hollow
actions = empty@hollow
tof_count = {'desorption':1}
```

Then run:
```bash
kmos export mini_101.ini
cd mini_101_local_smart
kmos benchmark
```

You should see output like:
```
Using the [local_smart] backend.
1000000 steps took 1.51 seconds
Or 6.62e+05 steps/s
```

Try running `kmos view` to watch the model run, or `kmos shell` to interact with it interactively. Explore more commands with `kmos help`.

## Development

```bash
# Clone the repository
git clone https://github.com/mhoffman/kmos.git
cd kmos

# Install dependencies with uv
uv sync

# Run tests
uv run pytest tests/
```

## Requirements

- Python >= 3.9
- Tested on Python 3.9, 3.10, 3.11, 3.12, 3.13, and 3.14
- Fortran compiler (gfortran recommended)
- Meson build system (automatically installed with Python >= 3.12)

## Publishing

To publish a new version to PyPI:

```bash
# 1. Bump version
uv run bump-my-version bump patch # or minor, or major

# 2. Build the package
uv build

# 3. Upload to PyPI (requires PyPI credentials)
uv publish

# Or upload to Test PyPI first
uv publish --publish-url https://test.pypi.org/legacy/
```

After publishing, users can install with:
```bash
pip install kmos
# or
uv add kmos
```

## Documentation

For tutorials, user guides, API reference, and troubleshooting:

- [GitHub Pages](http://mhoffman.github.io/kmos/)
- [ReadTheDocs](http://kmos.readthedocs.org/)
- [TU Munich Documentation](https://www.th4.ch.tum.de/index.php?id=1321)
- [Introduction to kMOS](https://github.com/jmlorenzi/intro2kmos)

## Bugs, Issues, Questions

This is research software for scientists by scientists. If you encounter bugs, have feature requests, or need help:

- Open an [issue](https://github.com/mhoffman/kmos/issues/new)
- Join the [mailing list](https://groups.google.com/forum/#!forum/kmos-users)

## Acknowledgments

This project builds upon several excellent open-source Python projects:

- [Python](http://www.python.org)
- [ASE (Atomic Simulation Environment)](https://wiki.fysik.dtu.dk/ase/)
- [NumPy](https://numpy.org/)
- [f2py](http://cens.ioc.ee/projects/f2py2e/)
- [lxml](https://lxml.de/)

## License

GPL-3.0-or-later
189 changes: 0 additions & 189 deletions README.rst

This file was deleted.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "0.4.2" # Managed by bump-my-version
description = "kMC modeling on steroids"
readme = "README.md"
requires-python = ">=3.9"
license = {text = "GPL-3.0-or-later"}
license = "GPL-3.0-or-later"
authors = [
{name = "Max J. Hoffmann", email = "mjhoffmann@gmail.com"}
]
Expand All @@ -21,7 +21,6 @@ classifiers = [
"Environment :: Console",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
Expand Down