项目作者: tjof2

项目描述 :
Modelling continuous-time random walks on fractals
高级语言: C++
项目地址: git://github.com/tjof2/ctrwfractal.git
创建时间: 2016-05-11T14:52:49Z
项目社区:https://github.com/tjof2/ctrwfractal

开源协议:GNU General Public License v3.0

下载


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
.

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

To build the Python package from source:

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

Usage

  1. from ctrwfractal import CTRWfractal
  2. est = CTRWfractal(
  3. grid_size=64,
  4. lattice_type="square",
  5. n_walks=1,
  6. n_steps=100,
  7. )
  8. est.run()
  9. # Attributes:
  10. # est.lattice_
  11. # est.clusters_
  12. # est.walks_
  13. # est.analysis_
  14. # 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.