Skip to main content

No project description provided

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tilecycles-0.2.4.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

tilecycles-0.2.4-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file tilecycles-0.2.4.tar.gz.

File metadata

  • Download URL: tilecycles-0.2.4.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.4 Darwin/22.6.0

File hashes

Hashes for tilecycles-0.2.4.tar.gz
Algorithm Hash digest
SHA256 9c7937e030f1980eff873327d67eae6a67fabb4e71bf61d7143eba29da3b3e56
MD5 759a90bfb0f84bbb313fbcefa59966fa
BLAKE2b-256 7b46600496f49af1e7f295424b92bac3e118394bc8b9038376f755e13950a3a7

See more details on using hashes here.

File details

Details for the file tilecycles-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: tilecycles-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.4 Darwin/22.6.0

File hashes

Hashes for tilecycles-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ef8ae538a98ae4e85048bd64f56db0d1941c309328d47f4e2124bb3a4c18f517
MD5 3f8f0ae8bd29a2e97f69803dec798ba1
BLAKE2b-256 418756738d2849d910860775b7c0ee98a39076732e3e3bf85d092e4b8a7fc478

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page