atomlib: A modern, extensible library for creating atomic structures
atomlib is a package for creating, modifying, and controlling atomic structures. It draws heavy inspiration from previous tools like Atomsk and ASE, but attempts to provide a cleaner, more consistent interface that can be used from Python or a command line.
atomlib has minimal dependencies: numpy, scipy, and polars are required for core atom structure manipulation, and click is required for command line functionality.
Atomic representation & supported properties
Atomic structures are stored as polars DataFrames, providing a clean, immutable interface that maximizes expressiveness and minimizes errors.
For formats that allow arbitrary properties, these properties can be passed through transparently. atomlib has first-class support for fractional occupancy, Debye-Waller factors, atomic forces, and labels.
Translational symmetry is stored in Cell objects, which represent a fully generic cell. Atoms can be modified in any coordinate system that makes sense (global, local real-space, cell fraction, box fraction, etc.). Support for non-translational symmetry operations is limited at this point.
For more information, check out the example notebooks and the API documentation.
Currently supported file formats
File format support is still a work in progress. Where possible, parsers are implemented from scratch in-repo.
Most formats are implemented in two steps: Parsing to an intermediate representation which preserves all format-specific information, and then conversion to the generic Atoms & AtomCell types for manipulation & display.
This means you can write your own code to utilize advanced format features even if they're not supported out of the box.
| Format | Ext. | Read | Write | Notes |
|---|---|---|---|---|
| CIF | .cif | ✅ | ✅ | CIF1 & CIF2. Isotropic B-factor only |
| XCrysDen | .xsf | ✅ | ✅ | |
| AtomEye CFG | .cfg | ✅ | ✅ | Currently basic format only |
| Basic XYZ | .xyz | ✅ | ✅ | |
| Ext. XYZ | .exyz | ✅ | ✅ | Arbitrary properties not implemented |
| Special XYZ | .sxyz | ❌ | ❌ | To be implemented |
| LAMMPS Data | .lmp | ✅ | ✅ | |
| Quantum Espresso | .qe | ❌ | ✅ | pw.x format |
| pyMultislicer | .mslice | ✅ | ✅ | Currently XML format only |
Metadata
Release files for atomlib 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| atomlib-0.4.tar.gz | 107.9 kB | Without provenance | Details for atomlib-0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| atomlib-0.4-py3-none-any.whl | Python 3 | none | any | Details for atomlib-0.4-py3-none-any.whl |
Total release size: 229.2 kB
Release files / atomlib-0.4.tar.gz
| Download URL | atomlib-0.4.tar.gz |
|---|---|
| Size | 107.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6a604b7b86caaaacd01b2d2b8001359fab9ecdba62d8c4edcbb089abf2f7ffc
|
|
BLAKE2b-256 checksum How to use checksums |
be31e78ba71ef9aa7fe87e7f770de577808b5c2f6016338ee3ff964a4ba114cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|
Release files / atomlib-0.4-py3-none-any.whl
| Download URL | atomlib-0.4-py3-none-any.whl |
|---|---|
| Size | 121.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
235073e88fcb175bb60d69cabf41ed849a0b906f71736df0d217aad6c9c79c5a
|
|
BLAKE2b-256 checksum How to use checksums |
4cfd95736970818af8153da95c05fdc728815aa4ea1427fa4e0c2884a1f73777
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|
Security for atomlib 0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.