Skip to main content

kMC modeling on steroids

Project description

https://img.shields.io/badge/license-GPLv3-brightgreen.svg?style=flat-square):targetCOPYING Documentation Status

kmcos: Kinetic Monte Carlo of Systems

kmcos is designed for lattice based Kinetic Monte Carlo simulations to understand chemical kinetics and mechanisms. It has been used to produce more than 10 scientific publications. A quickstart as well as tutorials and other documentation are below.

QUICKSTART

Prepare a minimal input file with the following content and save it as mini_101.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}

In the same directory run kmcos export mini_101.ini. You should now have a folder mini_101_local_smart in the same directory. cd into it and run kmcos benchmark. If everything went well you should see something like

Using the [local_smart] backend.
1000000 steps took 1.51 seconds
Or 6.62e+05 steps/s

In the same directory try running kmcos view to watch the model run or fire up kmcos shell to interact with the model interactively. Explore more commands with kmcos help and please refer to the documentation how to build complex model and evaluate them systematically. To test all bells and whistles try kmcos edit mini_101.ini and inspect the model visually.

DOCUMENTATION

Please refer to

or links therein for tutorials, user guide, reference, and troubleshooting hints.

HELP, BUGS, ISSUES, TROUBLE

This code is research code for scientists by scientists. If you believe you have hit a bug, have a feature request get in touch with us either via the mailing list, or open an issue .

CONTRIBUTORS

Current Project Leaders:

  • Karsten Reuter

  • Aditya (Ashi) Savara

Creator:

  • Max J. Hoffmann

Developers:

  • Sebastian Matera

  • Juan M. Lorenzi

  • Mie Andersen

  • Michal Bajdich

  • Andreas Garhammer

Other:

  • Thomas Danielson

  • Jonathan Sutton

  • Joseba Alberdi

  • Steve Erwin & NB

THANKS

This project draws on several other great Python modules, which are in turn each free software and we would like to thank each of these projects for making their code freely avalaible, namely:

FILES

├── COPYING # Copy of GPLv3
├── INSTALL.rst # installation instructions
├── README.rst # This document
├── TODO.rst # Ideas for improvement and new features
├── requirements.txt # Dependencies which can be installed via pip
├── setup.py # setuptools using setup script
├── index.html # landing website
├── kmcos/ # the core kmcos python modules
│   ├── cli.py # the command line interface
│   ├── config.py # configuration of some project wide paths
│   ├── fortran_src/ # static Fortran 90 source files
│   │   ├── assert.ppc # assertion macro
│   │   ├── base.f90 # the default kMC solver
│   │   ├── base_lat_int.f90 # slightly modified kMC solver for lat_int backend
│   │   ├── kind_values.f90 # definition of project wide kind values
│   │   └── main.f90 # source template for standalone Fortran 90 clients
│   ├── gui/ # kmcos.gui module
│   │   ├── forms.py # view definitions (MVC) of editor GUI
│   │   └── __init__.py # controller definitions (MVC) of editor GUI
│   ├── __init__.py # root import module
│   ├── io.py # conversion between format: contains main Code Generator
│   ├── kmc_editor.glade # Glade XML definiton for form interfaces
│   ├── kmc_project_v0.1.dtd # Document Type Definition file of kMC project v0.1
│   ├── kmc_project_v0.2.dtd # Document Type Definition file of kMC project v0.2
│   ├── run.py # High-level API for compiled models
│   ├── species.py # Convenient interface for some reaction intermediates
│   ├── types.py # The basic classes for building kMC models
│   ├── units.py # Definition of conversion factor (CODATA 2010)
│   ├── utils/ # Utility function that didn’t fit elsewhere
│   │   ├── __init__.py
│   │   ├── ordered_dict.py
│   │   ├── progressbar.py
│   │   └── terminal.py
│   └── view.py # The runtime GUI for compiled models
├── doc/ # user guide, documentation, and reference
│   └── source/ # documentation source file for compilation with Sphinx
├── examples/ # demoing non-standard features and useful idioms
│   ├── AB_model.py # small demo file
│   ├── benchmark_compilers_and_backends.sh # demo file
│   ├── crowded.xml # demo file
│   ├── dreiD.xml # demo file for 3d model
│   ├── dummy.xml # mininal model
│   ├── model_Pt111_surface.py # demo file for non-rectangular lattice
│   ├── multidentate.py # basic example for multidentate adsorption
│   ├── render_bigcell.py # demo containing many sites
│   ├── render_co_oxidation_ruo2.py # demoing th CO Oxidation at RuO2(110) model
│   ├── render_diffusion_model.py # idioms for describing lateral interaction
│   ├── render_einsD.py # simple 1-dimensional model
│   ├── render_multispecies.py # render many species
│   ├── render_pairwise_interaction.py # idioms for describing lateral interaction
│   ├── render_Pt_111.py # another non-rectangular lattice
│   ├── render_sand_model.py # a neat diffusion model for non-trivial boundary conditions
│   ├── run_in_multi_process.py # an example for parallelization over processes
│   ├── run.py # a high-level run script using the ModelRunner metaclass
│   ├── ruptured_Pd.xml # a fcc(100) like surface with some sites missing
│   └── small.xml # demo file
├── tests/ # Unit tests and test data
└── tools # Entry points for command line interface
├── kmcos
├── kmcos.bat
├── kmcos-build-standalone
└── kmcos-install-dependencies-ubuntu

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kmcos-0.0.15.tar.gz (258.2 kB view hashes)

Uploaded Source

Built Distribution

kmcos-0.0.15-py3-none-any.whl (284.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page