Code Monkey home page Code Monkey logo

kmc's Introduction

KMC

Kinetic Monte Carlo Code for Lithium Diffussion By no means a general or transferable piece of code. For all academic purposes, the reader is refered to: A. Van der Ven, G. Ceder, M. Asta, and P. D. Tepesch. Phys. Rev. B 64, 184307 โ€“ Published 25 October 2001

General Structure of the code:

Creats a 2d Hexagonal lattice (defined by "size/dimension") with a random distribution of Li atoms on it. Performs a number of KMC steps on the lattice, each step consists of:

  1. determining which Li atoms can hop
  2. for each of those, hand the local lattice to a dictionary that returns the hop probability.
  3. randomly (weighted by the probabilities) making one atom hop
  4. repeating steps 1-3 as many times as there are atoms

once enough steps are done, the code calculates the diffusion coefficient(get_diffusion_coeficient) of the material

What is behind each step:

  1. checks all the endpoints of a hop to see which ones are empty
  2. reads from dictionary. The probabilities in the dictionary are determined fro the energy of the local lattice in the original state (get_config_energy) and at the highest energy point on the hop (get_excited_energy) to get the energy barrier, and then puts that into exp(-E_barrier/kbT) (get_hop_probability). the probabilities are written to a matrix the same size as the lattice.
  3. cumsum all of the probabilities, normalize these values so they are between 0-1, then pick a random number between 0-1, choose the corresponding hop
  4. for loops all the way down

That gives you a single KMC cycle, these are done multiple times at each concentration to get a statistically significant data set.

kmc's People

Contributors

quentinstoyel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.