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"]:
    print(items)

print("Spacegroup 3 (which is 3-b varient):")
print(data["3"][0])

for more complex example checkout the example file

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:

wyckoff_positions = WyckoffDatabase().wyckoff_positions
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 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.2.5.tar.gz (44.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.2.5-py3-none-any.whl (46.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for wyckoff-0.2.5.tar.gz
Algorithm Hash digest
SHA256 14411a899344b2ed0701778003ac95f0e88f80ba2e47a3713529060788b96c7b
MD5 56aab8efe9cd7e27c4c38445591b3dc1
BLAKE2b-256 f599810603447ce1d0602cf1814d9e8ffb36ab284abbc1e5a7fb4eda71099c96

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for wyckoff-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e81288b73f52865d1b46996b76707040ca0dc42264f3533e7ab2bcbac56beb58
MD5 5f89b416a947c4a83ddea018ab754c43
BLAKE2b-256 4139e950e6b1d31a6653b57a4965f431f6104e2b499021126b8b3dd3b7b28595

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