Modelling and analyzing random nanowire networks in Python.
Project description
Random NWNs
Python package for modelling and analyzing random nanowire networks. This package was a summer research project lasting from May 2021 to August 2021 under the supervision of Dr. Claudia Gomes da Rocha.
Update: This project will now be continuing as of May 2024. If you are using this project, please note there will be active development on it and the functionality may change.
For future additions, feel free to fork the repository. Please cite Marcus Kasdorf if you wish to extend the project.
Table of Contents
Installation
Random NWNs can be installed from PyPI for quick use or installed manually for development.
Latest
The latest version can be installed from PyPI:
pip install randomnwn
Development
For convenience, one can use the environment.yml
file with Anaconda to create a new
virtual environment with all the required dependencies.
conda env create -f environment.yml
This will create a new environment named randomnwn
. To activate the environment, use:
conda activate randomnwn
Then, to install the package, use pip. One can install the package in the usual way above, or install it in editable mode to allow for local development. Navigate to the base folder and run:
pip install -e .
Usage
Nanowire network objects are simply NetworkX graphs with various attributes stored in the graph, edges, and nodes.
>>> import randomnwn as rnwn
>>> NWN = rnwn.create_NWN(seed=123)
>>> NWN
<networkx.classes.graph.Graph at 0x...>
>>> rnwn.plot_NWN(NWN)
(<Figure size 800x600 with 1 Axes>, <AxesSubplot:>)
See the wiki pages for more detail on usage.
Uninstallation
To uninstall the package, use:
pip uninstall randomnwn
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file randomnwn-0.4.1.tar.gz
.
File metadata
- Download URL: randomnwn-0.4.1.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2693cb53be50ccb09fef2ef7cff72a6af1986501bd60704836fc0b05859a2f47 |
|
MD5 | 7803b7f03dccef8d9c909eee8fc224fb |
|
BLAKE2b-256 | 76407b65efa873b6a422168d900d0b240bc1f55af6918850e617e6863dcda976 |
File details
Details for the file randomnwn-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: randomnwn-0.4.1-py3-none-any.whl
- Upload date:
- Size: 22.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d32b32611543c6a8d9387a483ffc45f2fcdd0ba06fd5cb4cf2d53474a9b2936f |
|
MD5 | ab52e1614aee667eb3882045959264f0 |
|
BLAKE2b-256 | d26267f83096a64fded266b3adc537508999d6d380d81be44bc1d5a7e5198fe9 |