KMC_Lattice v2.0

KMC_Lattice v2.0: An Object-Oriented C\texttt{++} Library for Custom Kinetic Monte Carlo Simulations - Published in JOSS (2019)

https://github.com/mikeheiber/kmc_lattice

Science Score: 93.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: arxiv.org, researchgate.net, aps.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

kinetic-monte-carlo kmc

Scientific Fields

Physics Physical Sciences - 60% confidence
Last synced: 4 months ago · JSON representation

Repository

A lightweight, object-oriented C++ library that contains a general framework for creating custom kinetic Monte Carlo simulation software tools.

Basic Info
  • Host: GitHub
  • Owner: MikeHeiber
  • License: mit
  • Language: C++
  • Default Branch: master
  • Homepage:
  • Size: 1.19 MB
Statistics
  • Stars: 21
  • Watchers: 3
  • Forks: 7
  • Open Issues: 7
  • Releases: 17
Topics
kinetic-monte-carlo kmc
Created over 8 years ago · Last pushed over 5 years ago
Metadata Files
Readme Changelog Contributing License Code of conduct Codeowners

README.md

KMC_Lattice

General Information

This object-oriented C++ library contains a general framework for lattice kinetic Monte Carlo (KMC) simulations. This framework consists of a number of utility functions and base classes that must be extended to create a fully operational KMC simulation. The goal of this package is to be robust, reliable, and flexible so that users can easily develop KMC simulations for a wide variety of different scientific problems without the need to start from scratch.

KMCLattice implements the BKL algorithm and the Gillespie first-reaction method with several event recalculation options for creating computationally efficient simulations. The package is designed to be usable on a personal computer and on high performance computing clusters. For a simple, well-documented example of how to use this library, please see the KMCLatticeexample repository. For an example of a more complex and fully functional computational research tool constructed using KMCLattice, check out the Excimontec software package, which is designed for simulating organic semiconductor devices.

For further reading about kinetic Monte Carlo simulations, nice overviews of the theory and algorithms can be found here: - Introduction to the Kinetic Monte Carlo Method by Arthur Voter, Los Alamos National Lab - Monte Carlo and kinetic Monte Carlo methods – a tutorial by Peter Kratzer, University of Duisburg-Essen

Major Features

  • Can construct cubic lattice simulation models
  • Adjustable periodic boundary conditions in all three directions allow users to perform 1D, 2D, or 3D simulations
  • Choose between several KMC algorithms (first reaction method, selective recalculation method, or full recalculation method)
  • Can define custom rate constant calculation functions to include particle-particle interactions or particle-environment interactions
  • Can utilize MPI to create pleasingly parallel simulations to quickly gather statistics about the simulation model
  • Data analysis utility functions can be used to generate and analyze histograms for describing the behavior of the simulation model

Current Status

The latest stable release is KMC_Lattice v2.1.0. Please report any remaining bugs or submit feature requests for future releases in the Issues section.

To keep track of upcoming changes or review prior changes to the codebase, please see the Changelog.

Continuous Integration and Testing Status:

KMC_Lattice is currently being tested on Ubuntu (v16.04 and v18.04) with the GCC compiler (v5, v6, v7, v8, and v9) the clang compiler (v7) and on both Open MPI (v1.10.2) and MPICH (v3.2 and v3.3) using Travis CI.

| Branch | Status | | :------: | ------ | | Master | Build Status | | Development | Build Status |

Code is being tested using googletest with test coverage assessment by Coveralls.

| Branch | Status | | :------: | ------ | | Master | Coveralls github branch | | Development | Coveralls github branch |

Contributing

If you would like to contribute to the development of this project, please see the contributing instructions. If you would like some help in using or customizing the tool for your research, please contact me (heiber@mailaps.org) to discuss a collaboration. You can check out my research using this tool and other work on Researchgate.

Using KMC_Lattice

Package Contents

Event class - This base class can be extended to represent any process/mechanism/transition that one would like to simulate. It could represent a hopping motion event, a reaction event, etc. depending on the application. Typically, derived events are associated with a particular derived object. The Event class contains the fundamental properties and back-end operations that any given state transition would require.

Lattice class - This class implements a lattice, its boundary conditions, and keeps track of its occupancy.

Object class - This base class can be extended to represent any entity that one would like to simulate. It could represent an electron, atom, molecule, organism, etc. depending on the application. The Object class contains the fundamental properties and back-end operations that any given entity simulation would require.

Parameters_Lattice class - This class contains all of the parameters needed to construct a Lattice object.

Parameters_Simulation class - This class contains all of the parameters needed to construct a Simulation object.

Simulation class - This base class can be extended to manage all derived objects and their associated events. The Simulation class contains the fundamental properties and back-end operations that most simulations would require.

Site class - This base class can be extended to represent the lattice sites that make up the simulation medium/environment. Added site properties can be used to implement interactions between the simulation environment and the objects, which then affect the events. For example, site energies can be assigned to derived site classes to account for inhomogeneous systems.

Utils - This file contains a number of useful utility functions, scientific constants, etc. that can then be used throughout the software package.

Version class - This class stores a valid software version string and has version comparison operators and can be used to compare different versions of things to check for compatibility.

API Documentation

Detailed API documentation for these classes and the entire KMC_Lattice package is generated using Doxygen and can be viewed here.

Building and Testing the KMC_Lattice Library

This software tool uses Message Passing Interface (MPI) to utilize parallel computing power. As a result, using KMCLattice requires that an MPI library is pre-installed on your system, and the final KMCLattice library must be built on your specific system. Contact your HPC admin to determine the protocols for building MPI applications on your specific HPC system. In many cases, the HPC system and environment will already be configured for you, and the package comes with a default makefile that can be used with the GCC compiler, the PGI compiler, or the clang compiler.

If you wish, you can also install MPI on your own personal workstation and then build the KMC_Lattice library there as well. For development and preliminary simulation tests, sometimes it is more efficient to run on your own workstation instead of an HPC system. More information about common MPI packages can be found here: - Open MPI, http://www.open-mpi.org/ - MPICH, http://www.mpich.org/

Once you have a compiler and an MPI library installed, to build KMCLattice, first copy the KMCLattice directory to your machine. On Linux this can be done using the command,

git clone --recurse-submodules https://github.com/MikeHeiber/KMC_Lattice

Then set KMC_Lattice as your working directory,

cd KMC_Lattice

and finally build the software package with the default makefile.

make

In the default makefile, compilation flags have been set for the GCC, PGI, and clang compilers. If you are using another compiler, you will need to edit the makefile and define your own compiler options. Once the normal build is successful, you should test KMC_Lattice on your own hardware using the unit and system tests provided before you use the tool. Build the testing executable by running

make test

Once the test build is complete, run the test executables.

./test/KMC_Lattice_tests.exe

and

mpiexec -n 4 ./test/KMC_Lattice_MPI_tests.exe

Please report any build or testing errors in the Issues section.

Citing this Work

If you find KMC_Lattice to be helpful for your research, please cite:

M. C. Heiber, J. Open Source Software 4, 1168 (2019). [ResearchGate]

Acknowledgments

Development of v2.0 was supported by financial assistance award 70NANB14H012 from U.S. Department of Commerce, National Institute of Standards and Technology as part of the Center for Hierarchical Materials Design (CHiMaD).

Owner

  • Name: Michael C. Heiber
  • Login: MikeHeiber
  • Kind: user
  • Location: Austin, TX
  • Company: Enthought

I develop scientific software tools for physics-based simulation, measurement automation, data analysis, and machine learning.

JOSS Publication

KMC_Lattice v2.0: An Object-Oriented C\texttt{++} Library for Custom Kinetic Monte Carlo Simulations
Published
January 29, 2019
Volume 4, Issue 33, Page 1168
Authors
Michael C. Heiber ORCID
Center for Hierarchical Materials Design (CHiMaD), Northwestern University, Evanston, Illinois 60208, USA
Editor
Kathryn Huff ORCID
Tags
kinetic Monte Carlo object-oriented MPI

GitHub Events

Total
  • Watch event: 1
  • Fork event: 1
Last Year
  • Watch event: 1
  • Fork event: 1

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 105
  • Total Committers: 2
  • Avg Commits per committer: 52.5
  • Development Distribution Score (DDS): 0.029
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Michael C. Heiber m****r@g****m 102
Michael C. Heiber h****r@m****g 3
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 34
  • Total pull requests: 43
  • Average time to close issues: about 1 month
  • Average time to close pull requests: about 5 hours
  • Total issue authors: 3
  • Total pull request authors: 2
  • Average comments per issue: 0.32
  • Average comments per pull request: 0.44
  • Merged pull requests: 41
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • MikeHeiber (31)
  • ahmad681 (2)
  • myousefi2016 (1)
Pull Request Authors
  • MikeHeiber (42)
  • kostergroup (1)
Top Labels
Issue Labels
enhancement (9) bug (7) documentation/tutorial (6) feature request (5) clean up (4) test (2) technical debt (2) non-software bug (1)
Pull Request Labels
enhancement (2) feature request (1)