Name | znh5md JSON |
Version |
0.3.6
JSON |
| download |
home_page | None |
Summary | ASE Interface for the H5MD format. |
upload_time | 2024-09-16 08:25:14 |
maintainer | None |
docs_url | None |
author | zincwarecode |
requires_python | <4.0,>=3.10 |
license | Apache-2.0 |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[![zincware](https://img.shields.io/badge/Powered%20by-zincware-darkcyan)](https://github.com/zincware)
[![Coverage Status](https://coveralls.io/repos/github/zincware/ZnH5MD/badge.svg?branch=main)](https://coveralls.io/github/zincware/ZnH5MD?branch=main)
[![PyPI version](https://badge.fury.io/py/znh5md.svg)](https://badge.fury.io/py/znh5md)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/zincware/ZnH5MD/HEAD)
[![H5MD](https://img.shields.io/badge/format-H5MD-darkmagenta)](https://www.nongnu.org/h5md/)
# ZnH5MD - ASE Interface for the H5MD format.
ZnH5MD provides and interface from \[ASE\] to \[H5MD\] and vice versa. Install
via `pip install znh5md`. Similar to ASE ZnH5MD provides `read` and `write`
functionality:
```python
import znh5md
from ase.collections import s22
znh5md.write("s22.h5", list(s22))
print(list(znh5md.iread("s22.h5")))
# list[ase.Atoms]
```
Further, you can access any data from within the entire dataset through the
`znh5md.IO` class which provides a `MutableSequence`-like interface.
```python
import znh5md
from ase.collections import s22
io = znh5md.IO("s22.h5", particle_group="s22")
io.extend(list(s22))
print(io[5:10])
# list[ase.Atoms]
```
## Extended H5MD Format
ZnH5MD circumvents two current limitations of the H5MD standard.
- support `images` with varying particle counts by padding the dataset with
`np.nan`. Using varying species counts might break the compatibility with
other H5MD tools.
- support varying `pbc` within a single particle group by introducing
`particles/<group>/box/pbc/value` in addition to the `particles/<group>/box`
attributes. By default, this is enabled via `IO(pbc_group=True)`. The
`particles/<group>/box` attribute will be set to the PBC conditions of the
first frame. Using this feature will not typically not break ompatibility with
other H5MD tools but can lead to unexpected behaviour.
## Current limitations
This is a not necessarily complete list of Limitations that will be fixed
eventually. Any contributions are welcome.
- Step: ZnH5MD assumes a fixed time interval of 1.
- Units: There is no automatic unit conversion through e.g. the pint package
- performance tweaks: there are many places in ZnH5MD that can be optimized for
better performance. Currently most of the values are hard-coded, such as chunk
size. Nevertheless, ZnH5MD outperforms most other packages w.r.t. read and
write speed.
Raw data
{
"_id": null,
"home_page": null,
"name": "znh5md",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "zincwarecode",
"author_email": "zincwarecode@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/50/27/19f064eb828c626c11dbee2a1cc79e5c8885e02c0d2eadf2d78cf42c19d1/znh5md-0.3.6.tar.gz",
"platform": null,
"description": "[![zincware](https://img.shields.io/badge/Powered%20by-zincware-darkcyan)](https://github.com/zincware)\n[![Coverage Status](https://coveralls.io/repos/github/zincware/ZnH5MD/badge.svg?branch=main)](https://coveralls.io/github/zincware/ZnH5MD?branch=main)\n[![PyPI version](https://badge.fury.io/py/znh5md.svg)](https://badge.fury.io/py/znh5md)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/zincware/ZnH5MD/HEAD)\n[![H5MD](https://img.shields.io/badge/format-H5MD-darkmagenta)](https://www.nongnu.org/h5md/)\n\n# ZnH5MD - ASE Interface for the H5MD format.\n\nZnH5MD provides and interface from \\[ASE\\] to \\[H5MD\\] and vice versa. Install\nvia `pip install znh5md`. Similar to ASE ZnH5MD provides `read` and `write`\nfunctionality:\n\n```python\nimport znh5md\nfrom ase.collections import s22\n\nznh5md.write(\"s22.h5\", list(s22))\nprint(list(znh5md.iread(\"s22.h5\")))\n# list[ase.Atoms]\n```\n\nFurther, you can access any data from within the entire dataset through the\n`znh5md.IO` class which provides a `MutableSequence`-like interface.\n\n```python\nimport znh5md\nfrom ase.collections import s22\n\nio = znh5md.IO(\"s22.h5\", particle_group=\"s22\")\nio.extend(list(s22))\n\nprint(io[5:10])\n# list[ase.Atoms]\n```\n\n## Extended H5MD Format\n\nZnH5MD circumvents two current limitations of the H5MD standard.\n\n- support `images` with varying particle counts by padding the dataset with\n `np.nan`. Using varying species counts might break the compatibility with\n other H5MD tools.\n- support varying `pbc` within a single particle group by introducing\n `particles/<group>/box/pbc/value` in addition to the `particles/<group>/box`\n attributes. By default, this is enabled via `IO(pbc_group=True)`. The\n `particles/<group>/box` attribute will be set to the PBC conditions of the\n first frame. Using this feature will not typically not break ompatibility with\n other H5MD tools but can lead to unexpected behaviour.\n\n## Current limitations\n\nThis is a not necessarily complete list of Limitations that will be fixed\neventually. Any contributions are welcome.\n\n- Step: ZnH5MD assumes a fixed time interval of 1.\n- Units: There is no automatic unit conversion through e.g. the pint package\n- performance tweaks: there are many places in ZnH5MD that can be optimized for\n better performance. Currently most of the values are hard-coded, such as chunk\n size. Nevertheless, ZnH5MD outperforms most other packages w.r.t. read and\n write speed.\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "ASE Interface for the H5MD format.",
"version": "0.3.6",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9f701e64883d459cd5252238a0b7459f790952f9da91aeb05f7e15054665e534",
"md5": "90c4fff1bda3309779c435ecc413b0f5",
"sha256": "10cac087933d3e6538152c867b882604aecd6dfc60e0ed344a1619adac2a341d"
},
"downloads": -1,
"filename": "znh5md-0.3.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "90c4fff1bda3309779c435ecc413b0f5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 17548,
"upload_time": "2024-09-16T08:25:12",
"upload_time_iso_8601": "2024-09-16T08:25:12.804299Z",
"url": "https://files.pythonhosted.org/packages/9f/70/1e64883d459cd5252238a0b7459f790952f9da91aeb05f7e15054665e534/znh5md-0.3.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "502719f064eb828c626c11dbee2a1cc79e5c8885e02c0d2eadf2d78cf42c19d1",
"md5": "b3edd9d26033576eed87244b6134692b",
"sha256": "e077c9227b111bc5d659486f0c547ae1448aa26f125304b5872957885fa4ef83"
},
"downloads": -1,
"filename": "znh5md-0.3.6.tar.gz",
"has_sig": false,
"md5_digest": "b3edd9d26033576eed87244b6134692b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 16431,
"upload_time": "2024-09-16T08:25:14",
"upload_time_iso_8601": "2024-09-16T08:25:14.511963Z",
"url": "https://files.pythonhosted.org/packages/50/27/19f064eb828c626c11dbee2a1cc79e5c8885e02c0d2eadf2d78cf42c19d1/znh5md-0.3.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-16 08:25:14",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "znh5md"
}