Name | pylattica JSON |
Version |
0.1.3
JSON |
| download |
home_page | |
Summary | pylattica is a package for fast prototyping of lattice models for chemistry and materials science |
upload_time | 2024-03-13 18:40:32 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | MIT |
keywords |
cellular
automaton
lattice
simulation
chemistry
materials
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
|
# pylattica - A Framework for Lattice and Cellular Automata Simulation
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/mcgalcode/pylattica/testing.yaml?branch=master)
[![Codecov](https://img.shields.io/codecov/c/github/mcgalcode/pylattica?style=for-the-badge)](https://app.codecov.io/gh/mcgalcode/pylattica)
pylattica is a Python library for prototyping and constructing cellular automaton and lattice models. The core features of these models are:
- There is a simulation state that evolves over time by repeatedly applying some unchanging rule
- The state of the simulation has a topology defined by a network of sites (i.e. each site has an unchanging set of neighbor sites)
- Each site has a state value associated with it that could change at each simulation step
- The future state of a site is determined by the state of its neighbor sites
These rules capture many common models in chemistry and materials science. For instance, in the Ising Model, spins are updated with probabilities related to the neighboring spins. In a Lattice Gas Automaton, the velocities of particles are determined collisions with neighboring particles. In lattice Monte Carlo simulations of surface catalysis, adsorption, desorption, and surface diffusion are dependent on the occupancy of neighboring sites.
pylattica aims to provide a general framework for prototyping these types of lattice simulations. It prioritizes providing a straightforward method for experimenting with different interaction rules and interaction neighborhoods. It provides some simple utilities for analyzing simulation states, and in the case of square grid systems, it provides visualization tools for the system state itself. Additionally, since this tool is focused on materials science, there is functionality for mapping system states to CIF files (for use in crystal lattice simulations).
## Installation
`pylattica` can be installed from the [PyPi source](https://pypi.org/project/pylattica/) by running:
```
pip install pylattica
```
It can also be installed by cloning this repository, then running the following in the root of the repository:
```
pip install .
```
### Documentation
Detailed documentation for this library can be found [here](https://mcgalcode.github.io/pylattica/).
### Jupyter Notebook Examples
Example notebooks are included in [docs/guides](https://github.com/mcgalcode/pylattica/tree/master/docs/guides).
### Note about Windows
`pylattica` makes use of Python's fork functionality in the multiprocessing library. This functionality is not available on windows, so certain features (the `parallel` keyword for the `SynchronousRunner`) will not be available on Windows platforms.
## Development
### Installation for development
To install pylattica for development purposes, use the standard editable installation command:
```
pip install -e .
```
from the root of the repository.
### Running tests
After you have installed the repository, ensure that `pytest` is installed, then run:
```
pytest
```
from the root of the repository.
### Building Documentation
The docs for this project are built using mkdocs. To build the documentation
```
pip install '.[docs]'
mkdocs build
```
To run the documentation server locally:
```
mkdocs serve
```
### Linting
This project uses the `black` package for style and formatting, and `prospector` for type checking and other lint warnings. These packages are not listed as dependencies of this project, so you can install them manually. This is partially because this project doesn't rely on specific versions of them, and we expect developers to have their own installations already. You can run them as follows:
To assess the changes that will happen if you run the `black` linter, run the following:
```
black --check src
```
To automatically make the changes, remove the `--check` flag:
```
black src
```
To run all other linters with prospector, use this:
```
prospector
```
In the top of this repository.
Raw data
{
"_id": null,
"home_page": "",
"name": "pylattica",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "cellular,automaton,lattice,simulation,chemistry,materials",
"author": "",
"author_email": "Max Gallant <maxg@lbl.gov>",
"download_url": "https://files.pythonhosted.org/packages/1c/d4/69da5c9d940c0d518665f7dd2d004feba26cfee28ca0749e6bcdc989e3d3/pylattica-0.1.3.tar.gz",
"platform": null,
"description": "# pylattica - A Framework for Lattice and Cellular Automata Simulation\n\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/mcgalcode/pylattica/testing.yaml?branch=master)\n[![Codecov](https://img.shields.io/codecov/c/github/mcgalcode/pylattica?style=for-the-badge)](https://app.codecov.io/gh/mcgalcode/pylattica)\n\npylattica is a Python library for prototyping and constructing cellular automaton and lattice models. The core features of these models are:\n\n- There is a simulation state that evolves over time by repeatedly applying some unchanging rule\n- The state of the simulation has a topology defined by a network of sites (i.e. each site has an unchanging set of neighbor sites)\n- Each site has a state value associated with it that could change at each simulation step\n- The future state of a site is determined by the state of its neighbor sites\n\nThese rules capture many common models in chemistry and materials science. For instance, in the Ising Model, spins are updated with probabilities related to the neighboring spins. In a Lattice Gas Automaton, the velocities of particles are determined collisions with neighboring particles. In lattice Monte Carlo simulations of surface catalysis, adsorption, desorption, and surface diffusion are dependent on the occupancy of neighboring sites.\n\npylattica aims to provide a general framework for prototyping these types of lattice simulations. It prioritizes providing a straightforward method for experimenting with different interaction rules and interaction neighborhoods. It provides some simple utilities for analyzing simulation states, and in the case of square grid systems, it provides visualization tools for the system state itself. Additionally, since this tool is focused on materials science, there is functionality for mapping system states to CIF files (for use in crystal lattice simulations).\n\n## Installation\n\n`pylattica` can be installed from the [PyPi source](https://pypi.org/project/pylattica/) by running:\n\n```\npip install pylattica\n```\n\nIt can also be installed by cloning this repository, then running the following in the root of the repository:\n\n```\npip install .\n```\n\n### Documentation\n\nDetailed documentation for this library can be found [here](https://mcgalcode.github.io/pylattica/).\n\n### Jupyter Notebook Examples\n\nExample notebooks are included in [docs/guides](https://github.com/mcgalcode/pylattica/tree/master/docs/guides).\n\n### Note about Windows\n\n`pylattica` makes use of Python's fork functionality in the multiprocessing library. This functionality is not available on windows, so certain features (the `parallel` keyword for the `SynchronousRunner`) will not be available on Windows platforms.\n\n## Development\n\n### Installation for development\n\nTo install pylattica for development purposes, use the standard editable installation command:\n\n```\npip install -e .\n```\n\nfrom the root of the repository.\n\n### Running tests\n\nAfter you have installed the repository, ensure that `pytest` is installed, then run:\n\n```\npytest\n```\n\nfrom the root of the repository.\n\n\n### Building Documentation\n\nThe docs for this project are built using mkdocs. To build the documentation\n\n```\npip install '.[docs]'\nmkdocs build\n```\n\nTo run the documentation server locally:\n\n```\nmkdocs serve\n```\n\n### Linting\n\nThis project uses the `black` package for style and formatting, and `prospector` for type checking and other lint warnings. These packages are not listed as dependencies of this project, so you can install them manually. This is partially because this project doesn't rely on specific versions of them, and we expect developers to have their own installations already. You can run them as follows:\n\nTo assess the changes that will happen if you run the `black` linter, run the following:\n\n```\nblack --check src\n```\n\nTo automatically make the changes, remove the `--check` flag:\n\n```\nblack src\n```\n\nTo run all other linters with prospector, use this:\n\n```\nprospector\n```\n\nIn the top of this repository.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "pylattica is a package for fast prototyping of lattice models for chemistry and materials science",
"version": "0.1.3",
"project_urls": {
"changelog": "https://github.com/mcgalcode/pylattica/blob/main/docs/CHANGELOG.md",
"documentation": "https://mcgalcode.github.io/pylattica/",
"homepage": "https://mcgalcode.github.io/pylattica/",
"repository": "https://github.com/mcgalcode/pylattica"
},
"split_keywords": [
"cellular",
"automaton",
"lattice",
"simulation",
"chemistry",
"materials"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d93484593c903cc4c56ba3ade81ba4419790e2e3079b2610e71299382b398172",
"md5": "8fe30b59ec64038e7963a9de8861c2f3",
"sha256": "c715976b67b7d29c86f9d0300ae150aa1301e49f044ea147ea283908ccf77372"
},
"downloads": -1,
"filename": "pylattica-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8fe30b59ec64038e7963a9de8861c2f3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 51314,
"upload_time": "2024-03-13T18:40:29",
"upload_time_iso_8601": "2024-03-13T18:40:29.978463Z",
"url": "https://files.pythonhosted.org/packages/d9/34/84593c903cc4c56ba3ade81ba4419790e2e3079b2610e71299382b398172/pylattica-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1cd469da5c9d940c0d518665f7dd2d004feba26cfee28ca0749e6bcdc989e3d3",
"md5": "ba662c367f839c4af09faeba64b7dff2",
"sha256": "6364e8e9e9c32036916e4ed521255bbf7e10c88470db2e91203821b801823674"
},
"downloads": -1,
"filename": "pylattica-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "ba662c367f839c4af09faeba64b7dff2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 37678,
"upload_time": "2024-03-13T18:40:32",
"upload_time_iso_8601": "2024-03-13T18:40:32.450371Z",
"url": "https://files.pythonhosted.org/packages/1c/d4/69da5c9d940c0d518665f7dd2d004feba26cfee28ca0749e6bcdc989e3d3/pylattica-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-13 18:40:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mcgalcode",
"github_project": "pylattica",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "pylattica"
}