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.4.tar.gz (44.0 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.4-py3-none-any.whl (46.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for wyckoff-0.2.4.tar.gz
Algorithm Hash digest
SHA256 e253e16554c42c446cbccfe606bcce99a8955aac7c291d270f1553f3bc9cb969
MD5 7766f1ee23df11a1017a7d412e9c63cb
BLAKE2b-256 7d241a6ec85a5380319ededb42275e3e0badc9a03bc92e29c9f7c19964d7c1d9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for wyckoff-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f38a65aa5c2a673734b3bb59e00a05f287e26470fa93ec06f2aff05295574680
MD5 e221718901f81d3bb1ed9a361f4a90a3
BLAKE2b-256 286d25d87cd4cea5ec5bd9267f0b5f0022441d4a2561815ea00b5496ae70c87e

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