serde_xyz
Serialize and deserialize molecular structure .xyz files.
pip install serde_xyz
(or uv add serde_xyz).
from serde_xyz import Atom, XYZ
atoms = [
Atom("O", 0, 0, 0),
Atom("H", 1, 0, 0),
Atom("H", 0, 1, 0),
]
xyz = XYZ(atoms, "this is a comment")
xyz
>>> XYZ(atoms=[
Atom { element: "O", x: 0.0, y: 0.0, z: 0.0 },
Atom { element: "H", x: 1.0, y: 0.0, z: 0.0 },
Atom { element: "H", x: 0.0, y: 1.0, z: 0.0 }
],
comment='this is a commment'
)
print(xyz)
>>> "3\n\nO 0.000000 0.000000 0.000000\nH 1.000000 0.000000 0.000000\nH 0.000000 1.000000 0.000000\n"
str(xyz)
>>> '"3\\n\\nO 0.000000 0.000000 0.000000\\nH 1.000000 0.000000 0.000000\\nH 0.000000 1.000000 0.000000\\n"'
Metadata
Release files for serde-xyz 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| serde_xyz-0.2.0.tar.gz | 12.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| serde_xyz-0.2.0-cp313-cp313-macosx_11_0_arm64.whl | CPython 3.13 | CPython 3.13 | macOS 11.0+ ARM64 | Details |
Total release size: 269.2 kB
Release files / serde_xyz-0.2.0.tar.gz
| Download URL | serde_xyz-0.2.0.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1de27e4409896d8656eccea5755763e511b8af7a2dd0aa59a5a7215a070b0f3
|
|
BLAKE2b-256 checksum How to use checksums |
23ea3fc5b97f27a424e7a06af571f88b6248eafb3c858f7b5965c9f8cc58c36a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.8.2
|
Release files / serde_xyz-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | serde_xyz-0.2.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 256.9 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
08c63b6ac3cfd4a6eb2f7d60843ff186e9fcfaab315275b1929e10da970d1384
|
|
BLAKE2b-256 checksum How to use checksums |
ba93dc221de1a0ee552a1f2c69d0933afdcf0e658408b4fd96358c85df985fde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.8.2
|