TileCycles
Tile an even graph with cycles. It is the core part of GenIce2 to make a hydrogen-disordered ice structure.
The contents are now moved to the GenIce-core repository.
What is the tiling by cycles?
It is to arrange cycles randomly so that every edge of the graph belongs to one and only one cycle. Such an arrangement of cycles is always possible for an even graph.
Requirement
- numpy
API
import tilecycles as tc
cycles = tc.tile(pairs, Nnode)
Inputs
- pairs: A 2D numpy array of size m x 2. The values must be numpy.int32. Each value must be in range [0,Nnode) and is the label for a node of the graph.
- Nnode: Number of nodes in a graph.
Output
- cycles: A list of numpy arrays of arbitrary size. Each array contains the list of labels constituting a cycle.
Benchmarks
Run TileCycles.ipynb on Jupyter or Google Colaboratory.
Algorithms and how to cite them.
The algorithms to make a depolarized hydrogen-disordered ice are explained in:
M. Matsumoto, T. Yagasaki, and H. Tanaka, "Novel Algorithm to Generate Hydrogen-Disordered Ice Structures.", J. Chem. Info. Modeling, (2021). DOI:10.1021/acs.jcim.1c00440
@article{Matsumoto:2021,
author = {Matsumoto, Masakazu and Yagasaki, Takuma and Tanaka, Hideki},
title = {Novel Algorithm to Generate Hydrogen-Disordered Ice Structures},
journal = {Journal of Chemical Information and Modeling},
volume = {},
pages = {},
year = {2021}
}
Note
I rewrote the algorithm in C++, which is available as the tilecycles_c module. However, I decided to unuse it in GenIce2 2.1 because the contribution to the improvement in speed is found to be only a little. Python version is fast enough for the purpose.
Release files for tilecycles 0.2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tilecycles-0.2.6.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tilecycles-0.2.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / tilecycles-0.2.6.tar.gz
| Download URL | tilecycles-0.2.6.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18ac3b646524e35178c0e9a671cbde75014c0e7718a0a2e1a6bb6ec12796d666
|
|
BLAKE2b-256 checksum How to use checksums |
f8fed4c7d1db12ada0a6b7203f60adc7cc9af08356a3e4f840b192b8eb39b2f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.11.4 Darwin/23.2.0
|
Release files / tilecycles-0.2.6-py3-none-any.whl
| Download URL | tilecycles-0.2.6-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8bd087246e820bcda89d92a01e83ac95e05fd8c3f01650ba408129ee51275810
|
|
BLAKE2b-256 checksum How to use checksums |
9d63d749766999959c35666b1cbedc8fdf14d834cfb57c5b6391b1e10eda4c16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.11.4 Darwin/23.2.0
|