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

Simple Example:

from wyckoff import WyckoffDatabase

wyckoff = WyckoffDatabase()
data = wyckoff.data

for items in data["2"].wyckoff_positions:
    print(items)

print("Spacegroup 3:") # which is 3-b varient
print(data["3"].wyckoff_positions)

for more complex example checkout the example file

Info

IMPORTANT: If variations are available for a spacegroup, and functions/dictionary are called/indexed without specifying the variation then first available 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:

data["3-b"]  # Space group 3 with b-axis as the unique axis
  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:

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

Example:

data["148-hexagonal"]  # Space group 148 with hexagonal cell

Data Source

This implementation is inspierd by a utility fuction in doped project. That version used a non-standard datafile for parsing the Wyckoff positions from bilbao crystallographic server. This implementation uses a standard JSON file for parsing the Wyckoff positions, add additional checks and validations to ensure data integrity, remove a bug that produces duplicate Wyckoff positions and custom wyckoff dataclass, etc,.

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.3.1.tar.gz (41.1 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.3.1-py3-none-any.whl (42.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for wyckoff-0.3.1.tar.gz
Algorithm Hash digest
SHA256 b8ab2a30fd1e4f6dafed39548d10c835782e0c9efdcdc79f183a7a3074c76d21
MD5 165cc8d9789458ff0e131f109889a4a1
BLAKE2b-256 5000dc98a91ca60037653eb47ac60fce2885205be0225d89e99edc17767bb186

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for wyckoff-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ac739d117a0fc177b3aea96ece577b96991673e84aeb34626e71f92ae92d5b5
MD5 dd3eed21c1e97f24d426c56a7068b9e0
BLAKE2b-256 5cddfa75202b9c1bf7ea3198f8621c3289f4265b780dab349dc32217c44a506c

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