Name | znh5md JSON |
Version |
0.4.2
JSON |
| download |
home_page | None |
Summary | ASE Interface for the H5MD format. |
upload_time | 2024-12-09 09:14:31 |
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/)
[![Discord](https://img.shields.io/discord/1034511611802689557)](https://discord.gg/7ncfwhsnm4)
# 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", particles_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.
## Supported
### `atoms.info` entry
`dict` and `list` entries assume python standard types if not otherwise specified.
| Type | ZnH5MD |
|--------------------------|--------|
| `np.ndarray` | ✅ |
| `float` | ✅ |
| `str` | ✅ |
| `dict` | ✅ |
| `list` | ✅ |
| `list[np.ndarray]` | ✅ |
| `dict[str, np.ndarray]` | ❌ |
| `list[dict]` | ❌ |
### `atoms.arrays`
| Type | ZnH5MD |
|--------------------------|--------|
| `np.ndarray` | ✅ |
| `float` | ✅ |
| `str` | ✅ |
| `dict` | ✅ |
| `list` | ✅ |
| `list[np.ndarray]` | ✅ |
| `dict[str, np.ndarray]` | ❌ |
| `list[dict]` | ❌ |
### `atoms.calc.results`
| Type | ZnH5MD |
|--------------------------|--------|
| `np.ndarray` | ✅ |
| `float` | ✅ |
| `str` | ✅ |
| `dict` | ✅ |
| `list` | ✅ |
| `list[np.ndarray]` | ✅ |
| `dict[str, np.ndarray]` | ❌ |
| `list[dict]` | ❌ |
## 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/28/1d/eb45288e8c3b3d51f88df37dfe36ed36c267b19e8361b2cde20fe7223684/znh5md-0.4.2.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[![Discord](https://img.shields.io/discord/1034511611802689557)](https://discord.gg/7ncfwhsnm4)\n\n# ZnH5MD - ASE Interface for the H5MD format.\n\nZnH5MD provides and interface from [ASE] to [H5MD] and vice versa. Install via\n`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\", particles_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## Supported\n\n### `atoms.info` entry\n\n`dict` and `list` entries assume python standard types if not otherwise specified.\n\n| Type | ZnH5MD |\n|--------------------------|--------|\n| `np.ndarray` | \u2705 |\n| `float` | \u2705 |\n| `str` | \u2705 |\n| `dict` | \u2705 |\n| `list` | \u2705 |\n| `list[np.ndarray]` | \u2705 |\n| `dict[str, np.ndarray]` | \u274c |\n| `list[dict]` | \u274c |\n\n### `atoms.arrays`\n\n| Type | ZnH5MD |\n|--------------------------|--------|\n| `np.ndarray` | \u2705 |\n| `float` | \u2705 |\n| `str` | \u2705 |\n| `dict` | \u2705 |\n| `list` | \u2705 |\n| `list[np.ndarray]` | \u2705 |\n| `dict[str, np.ndarray]` | \u274c |\n| `list[dict]` | \u274c |\n\n\n### `atoms.calc.results`\n\n| Type | ZnH5MD |\n|--------------------------|--------|\n| `np.ndarray` | \u2705 |\n| `float` | \u2705 |\n| `str` | \u2705 |\n| `dict` | \u2705 |\n| `list` | \u2705 |\n| `list[np.ndarray]` | \u2705 |\n| `dict[str, np.ndarray]` | \u274c |\n| `list[dict]` | \u274c |\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.4.2",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d3120b0b4b4570be6874ab81eb96d562973b2c14ddd160e032c96d3c819a2e6b",
"md5": "eca5c887ebe20b926544b8a460b9434e",
"sha256": "e264461a2b24acbeeabd863a3b8edc9df69854cec510ebd61d7a0fa52abe8989"
},
"downloads": -1,
"filename": "znh5md-0.4.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "eca5c887ebe20b926544b8a460b9434e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 22018,
"upload_time": "2024-12-09T09:14:29",
"upload_time_iso_8601": "2024-12-09T09:14:29.600025Z",
"url": "https://files.pythonhosted.org/packages/d3/12/0b0b4b4570be6874ab81eb96d562973b2c14ddd160e032c96d3c819a2e6b/znh5md-0.4.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "281deb45288e8c3b3d51f88df37dfe36ed36c267b19e8361b2cde20fe7223684",
"md5": "c15d9ec43ee3600fc1102e56d8dfbff0",
"sha256": "ff52a1037e148d64a5d8634def87f476549a6c4e645a29a2dff2b0f992d2a895"
},
"downloads": -1,
"filename": "znh5md-0.4.2.tar.gz",
"has_sig": false,
"md5_digest": "c15d9ec43ee3600fc1102e56d8dfbff0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 18997,
"upload_time": "2024-12-09T09:14:31",
"upload_time_iso_8601": "2024-12-09T09:14:31.224041Z",
"url": "https://files.pythonhosted.org/packages/28/1d/eb45288e8c3b3d51f88df37dfe36ed36c267b19e8361b2cde20fe7223684/znh5md-0.4.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-09 09:14:31",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "znh5md"
}