ASE Interface for the H5MD format.
Project description
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:
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.
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 withnp.nan
. Using varying species counts might break the compatibility with other H5MD tools. - support varying
pbc
within a single particle group by introducingparticles/<group>/box/pbc/value
in addition to theparticles/<group>/box
attributes. By default, this is enabled viaIO(pbc_group=True)
. Theparticles/<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.
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
znh5md-0.3.6.tar.gz
(16.4 kB
view details)
Built Distribution
znh5md-0.3.6-py3-none-any.whl
(17.5 kB
view details)
File details
Details for the file znh5md-0.3.6.tar.gz
.
File metadata
- Download URL: znh5md-0.3.6.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.5 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e077c9227b111bc5d659486f0c547ae1448aa26f125304b5872957885fa4ef83 |
|
MD5 | b3edd9d26033576eed87244b6134692b |
|
BLAKE2b-256 | 502719f064eb828c626c11dbee2a1cc79e5c8885e02c0d2eadf2d78cf42c19d1 |
File details
Details for the file znh5md-0.3.6-py3-none-any.whl
.
File metadata
- Download URL: znh5md-0.3.6-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.5 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10cac087933d3e6538152c867b882604aecd6dfc60e0ed344a1619adac2a341d |
|
MD5 | 90c4fff1bda3309779c435ecc413b0f5 |
|
BLAKE2b-256 | 9f701e64883d459cd5252238a0b7459f790952f9da91aeb05f7e15054665e534 |