Skip to main content

Chain decomposition and order parameters for ReO3-type anion ordering

Project description

CI

chainorder

Chain decomposition and order parameters for ReO3-type anion ordering.

What this is

chainorder is a small NumPy + ASE library for analysing anion ordering of ReO3-type solid solutions (NbO2F, TiOF2, and any other cubic MX3-topology system). It takes an on-lattice ASE Atoms object in an orthorhombic supercell, decomposes the three edge-midpoint anion sublattices into per-direction chains, and exposes a small set of order parameters computed either over the full 3D occupation (coherent structure factor) or along individual chain directions (Fourier spectra, pair correlation, motif frequencies, inter-chain correlation).

Installation

Requires Python 3.11+, NumPy, and ASE.

pip install chainorder

To install the latest development version directly from GitHub:

pip install git+https://github.com/bjmorgan/chainorder.git

For development, clone and install in editable mode with the test and type-checking extras:

git clone git@github.com:bjmorgan/chainorder.git
cd chainorder
pip install -e ".[dev]"

Quickstart

from ase.io import read
from chainorder import SublatticeOccupation, order_params

atoms = read("frame.xyz")                                   # any ASE-readable format
occ = SublatticeOccupation.from_atoms(atoms, N=6, species="F")  # supercell size (cubic shorthand)

sf = order_params.structure_factor(occ)                      # 3D structure factor
spectrum = order_params.chain_fft(occ.x)                     # per x-chain FFT
g_r = order_params.along_chain_correlation(occ.x)            # g(r) along x-chains
freqs = order_params.motif_frequencies(occ.x, window_length=3)   # length-3 motif frequencies
G = order_params.inter_chain_correlation(occ.x, period=3)   # period-p phase correlation

A full trajectory is just a loop: per frame, build a SublatticeOccupation and call whichever order parameter(s) you need.

Public API at a glance

chainorder:

  • SublatticeOccupation -- frozen dataclass holding the decomposed anion occupation. Construct it from an ASE Atoms with SublatticeOccupation.from_atoms(atoms, N=...). The primary field .occupation is a read-only (3, Nx, Ny, Nz) integer array; .x, .y, .z are chain-layout transpose views suited to the single-direction tools below.
  • order_params -- submodule of order parameters:
    • structure_factor(occ) -- coherent 3D structure factor of the full anion sublattice.
    • chain_fft(arr) -- discrete Fourier transform along each chain.
    • along_chain_correlation(arr) -- pair correlation g(r) along chains, grand-averaged over the chain-plane.
    • motif_frequencies(arr, window_length=N) -- per-chain frequency of each distinct length-window_length motif (bit pattern).
    • inter_chain_correlation(arr, period=p) -- spatial autocorrelation of the period-p Fourier component across the chain plane.

structure_factor takes the whole SublatticeOccupation; the other four take a single chain-layout array (occ.x, occ.y, or occ.z).

Each function's docstring covers shape conventions, normalisation, and edge cases in detail.

Related material

  • docs/concepts.md -- problem framing, data model, and what each order parameter measures, with concrete example cases.
  • docs/tutorial.ipynb -- end-to-end worked example applying all five order parameters to four reference structures, with plots.

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

chainorder-0.1.0.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

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

chainorder-0.1.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file chainorder-0.1.0.tar.gz.

File metadata

  • Download URL: chainorder-0.1.0.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for chainorder-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4a7b7210d0c696363d0367946e997772f376aead30c3fc38e0ff5d4fb2473c72
MD5 9d1763b1f1c252062c523ff8f90b318d
BLAKE2b-256 ef7a40c339f28a4208571e08e487f7b45b773edac73a2b08b0fe3612030b4497

See more details on using hashes here.

Provenance

The following attestation bundles were made for chainorder-0.1.0.tar.gz:

Publisher: publish.yml on bjmorgan/chainorder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chainorder-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: chainorder-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for chainorder-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9dcbe883667d5e2bf53354e3017bed1a3a2c652952772fe85cbf221bb47de41f
MD5 878ab63307e58c63653e4086237c98a1
BLAKE2b-256 3b100e153af03c7877b8002705c866a7307002cbfea79d831da4ae56395bb8ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for chainorder-0.1.0-py3-none-any.whl:

Publisher: publish.yml on bjmorgan/chainorder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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