A collection of utilities to manipulate atomic structures
Project description
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: | :x: | 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 | :x: | :white_check_mark: | |
Quantum Espresso | .qe | :x: | :white_check_mark: | pw.x format |
pyMultislicer | .mslice | :x: | :white_check_mark: |
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
Built Distribution
File details
Details for the file atomlib-0.3.tar.gz
.
File metadata
- Download URL: atomlib-0.3.tar.gz
- Upload date:
- Size: 87.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75792ce56ac26add188fb9ba11e30c6c424ca46906999aaa499717eabc72eba5 |
|
MD5 | 6ebbcb222aec7e5ad47e0db6f4516760 |
|
BLAKE2b-256 | e30dfdb55a5d419b8efef2b9ac55393a8eed8ec268d8b41dde8f75b5a21da4f9 |
File details
Details for the file atomlib-0.3-py3-none-any.whl
.
File metadata
- Download URL: atomlib-0.3-py3-none-any.whl
- Upload date:
- Size: 95.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e13f91d60067428af6d58d44f1319507cd4ae51b93335278b7d1a7841b484bc |
|
MD5 | 7cd4199cdd795533fda93616392171fb |
|
BLAKE2b-256 | 38fa846fcefe6b7b6c83b4412112e2e6105b381d2d03fc7b221a561759ac8688 |