Skip to main content

No project description provided

Project description

Crystallite Size Calculator

crystallite-size-calculator is a Python module designed to estimate the average crystallite sizes and microstrain from powder X-ray diffraction (PXRD) data. It provides methods based on the envelope function, Williamson-Hall method, Warren-Averbach method, and Scherrer equation to accurately compute crystallite sizes and microstrains.

Features

  • Compute the radial distribution function (RDF) from PXRD data.
  • Estimate average crystallite size using the envelope function approach.
  • Calculate crystallite size and microstrain using the Williamson-Hall method.
  • Compute crystallite size using the Scherrer and modified Scherrer equations.
  • Support for advanced strain and crystallite size analysis using the Warren-Averbach method.

Installation

To install the crystallite-size-calculator module, use pip:

pip install crystallite_size_calculator

Eaxamples

Crystallite Size Calculator - CIF File Examples

Below are examples demonstrating how to use the crystallite-size-calculator module to load CIF files, compute crystallite sizes, and analyze microstrain.

1. Loading a CIF File and Computing Crystallite Size

You can load a crystal structure from a CIF file and compute the crystallite size using the envelope function approach.

from crystallite_size_calculator.crystallite_size import ComputeCrystalSizes

# Provide the path to your CIF file
cif_file = "example_structure.cif"

# Initialize the ComputeCrystalSizes class with the CIF file
calculator = ComputeCrystalSizes(cif_file=cif_file)

# Compute the crystallite size using the envelope function approach
d_crys = calculator.compute_crystallite_size_from_envelope_function()
print(f"Crystallite size from CIF file: {d_crys:.2f} nm")

# Compute crystallite size and strain using the Williamson-Hall method
strain, d_crys = calculator.size_strain_from_williamson_hall_method()
print(f"Crystallite size: {d_crys:.2f} nm, Microstrain: {strain:.4f}")

# Compute crystallite size using the Scherrer equation
d_crys = calculator.size_from_scherrer_eq()
print(f"Crystallite size using Scherrer equation: {d_crys:.2f} nm")

# Compute crystallite size and strain using the Warren-Averbach method
strain, d_crys = calculator.size_and_strain_from_warren_averbach_method()
print(f"Crystallite size: {d_crys:.2f} nm, Microstrain: {strain:.4f}")


# Compute the radial distribution function (RDF) from the CIF file
r, g_r = calculator.compute_rdf_from_diffraction_pattern()
# Print the first few r and g(r) values
print("r values:", r[:5])
print("g(r) values:", g_r[:5])

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

crystallite_size_calculator-0.1.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for crystallite_size_calculator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 579a4c435fabaa72abdba27e4f840822dd8b96f99bb5936c5f51b4889acca778
MD5 19f0cbb8ee4df7988354defe9fbd5209
BLAKE2b-256 3fa3ac52dabcc1462d089450848c825eda4decf180795e3c27326f26d9fe363c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for crystallite_size_calculator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 980d40ce9a398d8e9efb9faf95e218a5a341546beb68f3e024a80bd1bc27a030
MD5 d90cb438b439617c6d02230320f8b177
BLAKE2b-256 447b81bd1ba23da0a979443e80e4dc8e28efedb19dab7e525b5931fb4f7d60a6

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