Skip to main content

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 :white_check_mark: :white_check_mark: CIF1 & CIF2. Isotropic B-factor only
XCrysDen .xsf :white_check_mark: :white_check_mark:
AtomEye CFG .cfg :white_check_mark: :white_check_mark: Currently basic format only
Basic XYZ .xyz :white_check_mark: :white_check_mark:
Ext. XYZ .exyz :white_check_mark: :white_check_mark: Arbitrary properties not implemented
Special XYZ .sxyz :x: :x: To be implemented
LAMMPS Data .lmp :white_check_mark: :white_check_mark:
Quantum Espresso .qe :x: :white_check_mark: pw.x format
pyMultislicer .mslice :white_check_mark: :white_check_mark: Currently XML format only

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)

Source distribution for atomlib 0.4
File Size Uploaded
atomlib-0.4.tar.gz 107.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for atomlib 0.4
File Interpreter ABI Platform
atomlib-0.4-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.4 This release

2 release files

0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page