Giter VIP home page Giter VIP logo

ctrwfractal's Introduction

Build Status Coverage Status DOI

ctrwfractal

Modelling continuous-time random walks on fractal percolation clusters

This code implements the hybrid model for spatial and temporal disorder on graphene oxide, as described in our paper in Chemical Physics Letters.

In site percolation on a regular 2D lattice, each site is occupied with probability p. Spatial disorder is incorporated as intermediate values of p, where clusters of accessible sites will exhibit fractal-like characteristics. Particles undertaking random walks on such clusters will exhibit anomalous diffusion. Our hybrid model extends this diffusive behaviour using the theory of continuous-time random walks (CTRW), where the waiting times between jumps are drawn from a power-law distribution.

If you use this code in a publication, please cite our work:

T. Furnival, R. K. Leary, E. C. Tyo, S. Vajda, Q. M. Ramasse, J. M. Thomas, P. D. Bristowe and P. A. Midgley, "Anomalous diffusion of single metal atoms on a graphene oxide support", Chem. Phys. Lett., vol. 683, pp. 370โ€“374, 2017. DOI:10.1016/j.cplett.2017.04.07.

ctrwfractal is released free of charge under the GNU General Public License (GPLv3).

Installation

Building from source

This library makes use of the Armadillo C++ linear algebra library, which needs to be installed first. It is recommended that you use a high-speed replacement for LAPACK and BLAS such as OpenBLAS, MKL or ACML; more information can be found in the Armadillo FAQs.

$ sudo apt-get install libarmadillo-dev
# Alternatively, download and build Armadillo from source
$ sh ./install-dependencies.sh

To build the Python package from source:

$ git clone https://github.com/tjof2/ctrwfractal.git
$ cd ctrwfractal
$ pip install -e .

Usage

from ctrwfractal import CTRWfractal

est = CTRWfractal(
   grid_size=64,
   lattice_type="square",
   n_walks=1,
   n_steps=100,
)
est.run()

# Attributes:
#   est.lattice_
#   est.clusters_
#   est.walks_
#   est.analysis_
#   est.occupied_fraction_

Both square and honeycomb (i.e. graphene) lattices are supported. The percolation clusters are generated using the periodic algorithm described in A fast Monte Carlo algorithm for site or bond percolation, M. E. J. Newman and R. M. Ziff, Phys. Rev. E 64, 016706 (2001).

Copyright (C) 2016-2020 Tom Furnival.

ctrwfractal's People

Contributors

tjof2 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  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.