Skip to main content

OVITO Python modifier to compute Warren-Cowley parameters.

Project description

WarrenCowleyParameters

PyPI Version PyPI Downloads tests

OVITO Python modifier to compute the Warren-Cowley parameters, defined as:

$$\alpha_{ij}^m = 1-\frac{p_{ij}^m}{c_j},$$

where $m$ denotes the $m$-th nearest-neighbor shell, $p_{ij}^m$ is the average probability of finding a $j$-type atom around an $i$-type atom in the $m$-th shell, and $c_j$ is the average concentration of $j$-type atom in the system. A negative $\alpha_{ij}^m$ suggests the tendency of $j$-type clustering in the $m$-th shell of an $i$-type atom, while a positive value means repulsion.

Utilisation

Here is an example of how to compute the 1st and 2nd nearest neighbor shell Warren-Cowley parameters of the fcc.dump dump file. Note that in the fcc crystal structure, the 1st nearest neighbor shell has 12 atoms, while the second one has 6 atoms.

from ovito.io import import_file
import WarrenCowleyParameters as wc

pipeline = import_file("fcc.dump")
mod = wc.WarrenCowleyParameters(nneigh=[0, 12, 18], only_selected=False)
pipeline.modifiers.append(mod)
data = pipeline.compute()

wc_for_shells = data.attributes["Warren-Cowley parameters"]
print(f"1NN Warren-Cowley parameters: \n {wc_for_shells[0]}")
print(f"2NN Warren-Cowley parameters: \n {wc_for_shells[1]}")


# Alternatively, can see it as a dictionarry
# print(data.attributes["Warren-Cowley parameters by particle name"])

Example scripts can be found in the examples/ folder.

Installation

For a standalone Python package or Conda environment, please use:

pip install --user WarrenCowleyParameters

For OVITO PRO built-in Python interpreter, please use:

ovitos -m pip install --user WarrenCowleyParameters

If you want to install the lastest git commit, please replace WarrenCowleyParameters by git+https://github.com/killiansheriff/WarrenCowleyParameters.git.

Contact

If any questions, feel free to contact me (ksheriff at mit dot edu).

References & Citing

If you use this repository in your work, please cite:

@article{sheriffquantifying2024,
	title = {Quantifying chemical short-range order in metallic alloys},
	doi = {10.1073/pnas.2322962121},
	journaltitle = {Proceedings of the National Academy of Sciences},
	author = {Sheriff, Killian and Cao, Yifan and Smidt, Tess and Freitas, Rodrigo},
	date = {2024-06-18},
}

and

@article{sheriff2024chemicalmotif,
  title = {Chemical-motif characterization of short-range order with E(3)-equivariant graph neural networks},
  DOI = {10.1038/s41524-024-01393-5},
  journal = {npj Computational Materials},
  author = {Sheriff,  Killian and Cao,  Yifan and Freitas,  Rodrigo},
  year = {2024},
  month = sep,
}

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

warrencowleyparameters-2.0.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

WarrenCowleyParameters-2.0.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file warrencowleyparameters-2.0.0.tar.gz.

File metadata

File hashes

Hashes for warrencowleyparameters-2.0.0.tar.gz
Algorithm Hash digest
SHA256 717a0831d69e138f766c7f64d466ba04e67951f301227fd188992af7bf076463
MD5 ae5526aa115433433be38dddf6549520
BLAKE2b-256 e900c14a9377b2a901946d8c31fc5aa9b8e1fba844f817053524443b3466e90d

See more details on using hashes here.

File details

Details for the file WarrenCowleyParameters-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for WarrenCowleyParameters-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b9acfa8be69cfc8fa5a08a8bdf75097c221c3fba342d8d47fab24e00d009f63
MD5 8ffa1d7b1c78b9dcc798f084240923e3
BLAKE2b-256 0402dfa3b0c7862c4464c8161b686b0232891adf80f1b39f5b734f3783c11cde

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page