Skip to main content

A modern, extensible library for creating 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: :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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

atomlib-0.4.tar.gz (107.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

atomlib-0.4-py3-none-any.whl (121.3 kB view details)

Uploaded Python 3

File details

Details for the file atomlib-0.4.tar.gz.

File metadata

  • Download URL: atomlib-0.4.tar.gz
  • Upload date:
  • Size: 107.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for atomlib-0.4.tar.gz
Algorithm Hash digest
SHA256 b6a604b7b86caaaacd01b2d2b8001359fab9ecdba62d8c4edcbb089abf2f7ffc
MD5 4b0e8d1a954d8873843dd131c1507d93
BLAKE2b-256 be31e78ba71ef9aa7fe87e7f770de577808b5c2f6016338ee3ff964a4ba114cd

See more details on using hashes here.

File details

Details for the file atomlib-0.4-py3-none-any.whl.

File metadata

  • Download URL: atomlib-0.4-py3-none-any.whl
  • Upload date:
  • Size: 121.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for atomlib-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 235073e88fcb175bb60d69cabf41ed849a0b906f71736df0d217aad6c9c79c5a
MD5 3f55e706b68c4d430759f74f53e2d3bf
BLAKE2b-256 4cfd95736970818af8153da95c05fdc728815aa4ea1427fa4e0c2884a1f73777

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page