Skip to main content

A package for working with Wyckoff positions in crystallography

Project description

Wyckoff

A Python package for working with Wyckoff positions in crystallography.

Installation

pip install wyckoff

OR

uv add wyckoff

Usage

from wyckoff import WyckoffDatabase
# OR
# from wyckoff import wyckoff_positions, wyckoff_database

wycoff = WyckoffDatabase()
data = wycoff.data # or wyckoff_database()
wyckoff_positions = wycoff.wyckoff_positions # or wyckoff_positions

# Get Wyckoff positions for a specific space group
positions = wyckoff_positions(1)  # Space group 1
print(positions)

# Get the entire database
data = wyckoff_database()
# Print first label and positions of space group 2
for item in data["2"]:
    print(f"{item.label}: {item.positions}")

Info

If spacegroup variations are available, and functions are called without specifying the variabtion then first variation will be returned.

Following variation types are included in the database:

  1. Unique axis settings: Suffixes like "-b" and "-c" typically indicate which crystallographic axis is chosen as the unique axis, especially in monoclinic and orthorhombic systems. For example:
    • "3-b" means space group 3 with b-axis as the unique axis
    • "3-c" means space group 3 with c-axis as the unique axis

Example:

positions = wyckoff_positions("3-b")  # Space group 3 with b-axis as the unique axis
print(positions)
  1. Origin choice: Suffixes like "-1" and "-2" usually indicate different origin choices for the same space group:
    • "48-1" is space group 48 with origin choice 1
    • "48-2" is space group 48 with origin choice 2

Example:

positions = wyckoff_positions("48-1")  # Space group 48 with origin choice 1
print(positions)
  1. Cell choices: Some suffixes may represent different conventional cell choices (hexagonal vs. rhombohedral settings in trigonal groups, for example).

Example:

positions = wyckoff_positions("148-hexagonal")  # Space group 148 with hexagonal cell
print(positions)

Data Source

This package is based on crystallographic data from bilbao crystallographic server. The inspiration for this package was drawn from the doped project: S. R. Kavanagh et al. doped: Python toolkit for robust and repeatable charged defect supercell calculations. Journal of Open Source Software 9 (96), 6433, 2024. Where they implemented a similar approach for handling wyckoff positions but they have custom data format.

License

MIT

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

wyckoff-0.2.3.tar.gz (43.5 kB view details)

Uploaded Source

Built Distribution

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

wyckoff-0.2.3-py3-none-any.whl (45.7 kB view details)

Uploaded Python 3

File details

Details for the file wyckoff-0.2.3.tar.gz.

File metadata

  • Download URL: wyckoff-0.2.3.tar.gz
  • Upload date:
  • Size: 43.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.1

File hashes

Hashes for wyckoff-0.2.3.tar.gz
Algorithm Hash digest
SHA256 76f5421a15c28ab6aa2b41e07ee017cfde4f7d530db87fc510180cb8dd59c396
MD5 ebc7804c8340f483e17763c313a5495e
BLAKE2b-256 a96a8b7777173648ecdcafa62d001da113ed34aaf1c280c12497f1ccc1391e94

See more details on using hashes here.

File details

Details for the file wyckoff-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: wyckoff-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 45.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.1

File hashes

Hashes for wyckoff-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d1d239d44060f20e1829692fa33a1a997d2d85add9ea5b1dbe4b9ece353c15fe
MD5 6e93e194a38d994089381d67c98327f9
BLAKE2b-256 d283cae03ab0645a17891825571ca12223ecdc9ae63476cca2c1cbd3ee7f7963

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