Skip to content
/ manuca Public

Manuca is a small Python command-line program to calculate physical properties of compounds.

License

Notifications You must be signed in to change notification settings

lukmuk/manuca

Repository files navigation

Manuca

Manuca is a small command-line Python program to calculate various forms of the mean (or effective) atomic number and other physical properties of compounds.

The name stems from it's intended use as a Mean Atomic Number Calculator.

badge

The tool can help to create complicated mixtures of materials for simulations (e.g. get stoichiometries of compounds, for DTSA-II, Casino, or SRIM) and to calculate the effective atomic numbers proposed/used in various publications.

Quickstart and Examples

You can explore Manuca without installing anything by opening the Binder link above in a new tab.

Enter a stoichiometry, e.g. H2O and confirm with Enter.

Example

Quit by entering q.

Chemparse can handle (single-level) parentheses, here for the Fe-based superconductor Ba(Fe0.92Co0.08)2As2:

Example

The multi compound mode is meant to handle more complex compounds, e.g. 73% of H2O and 27% of SiO2.

Example

A more complicated random mixture of superconductors and BaZrO3: 42% YBa2Cu3O6.9, 42% Ba(Fe0.92Co0.08)2As2, and 16% BaZrO3:

Example

To finish, let's put in the periodic system (let's call it an ultra-high-entropy alloy):

Example

... and in the end:

Example

The periodic-table-elements string can be generated from mendeleev:

from mendeleev.fetch import fetch_table
df = fetch_table('elements') #pandas data frame
print(''.join(df['symbol'].to_list()))

Requirements and Installation

Manuca works by utilizing chemparse to evaluate the stoichiometric formula from a user input. Then, mendeleev is used to retrieve the element-specific data. NumPy is used for calculations.

  • Clone or download the repository (or just manuca.py).

  • Optional: Create a fresh environment:

    conda create -n manuca python=3.9

    conda activate manuca

  • Install the required Python packages:

    pip install numpy chemparse mendeleev

  • Run Manuca (from the folder where the manuca.py is located):

    python manuca.py

Documentation

Output

Manuca version 0.14 calculates the following outputs:

  • Composition in atomic % (at.%) and weight % (wt.%)

  • Mean/effective atomic numbers are calculated from the atomic numbers (), the weight fractions (), and atomic fractions (). Formulas were taken from

    Howell, P. G. T., Davy, K. M. W. & Boyde, A. Mean atomic number and backscattered electron coefficient calculations for some materials with low mean atomic number. Scanning 20, 35–40 (1998).

    • Atomic-percent average:

      $\overline{Z}=\sum_i a_i Z_i$

    • Müller (1954),

      $\overline{Z}=\sum_i c_i Z_i$

    • Sandick & Allen (1954)

      $\overline{Z}=\sum_i a_i Z^2_i/\sum_i a_i Z_i$

    • Joyet (1953) / Hohn & Niedrig (1972) / Büchner (1973):

      $\overline{Z}=\sqrt{\sum_i a_i Z^2_i}$

    • Everhart (1960):

      $\overline{Z}=\sum_i c_i Z^2_i/\sum_i c_i Z_i$

    • Donovan (2003, with x = 0.8 and x = 0.7):

      $\overline{Z}=\sum_i a_i Z^{1.8}_i/\sum_i a_i Z_i^{0.8}$
      $\overline{Z}=\sum_i a_i Z^{1.7}_i/\sum_i a_i Z_i^{0.7}$

    • Langmore (effective $Z$ for elastic scattering) (see also Zhang et al., and Basha et al.)

      $\overline{Z}_\text{eff,el}=\left(\sum_i a_i Z^{3/2}_i\right)^{2/3}$

      Langmore et al. Collection of scattered electrons in dark field electron -microscopy. 1. Elastic-scattering Optik, 38 (1973), pp. 335-350

    • Egerton (effective $Z$, and $A$ in g/mol for inelastic scattering for EELS/EFTEM):

      $\overline{Z}_\text{eff,inel}=\sum_i a_i Z^{1.3}_i/\sum_i a_i Z^{0.3}_i$

      $\overline{A}_\text{eff,inel}=\sum_i a_i A^{1.3}_i/\sum_i a_i A^{0.3}_i$

      Eq. (5.4) from Egerton, R. F. Electron Energy-Loss Spectroscopy in the Electron Microscope. (Springer US, 2011). doi:10.1007/978-1-4419-9583-4.

  • Total and average atomic mass/molecular weight in g/mol.

  • Backscatter electron coefficient/yield (at 20 keV):

    $\eta_i = -0.0254 + 0.016 \cdot Z_i - 1.86 \cdot 10^{-4}\cdot Z_i^2 + 8.3\cdot10^{-7}\cdot Z_i^3$
    $\eta = \sum_i c_i \eta_i$

    Goldstein et al., Scanning Electron Microscopy and X-Ray Microanalysis, 2018, p. 17.

Citing

If you find this project useful, you can share/cite it via the following Zenodo DOI:
DOI

About

Manuca is a small Python command-line program to calculate physical properties of compounds.

Resources

License

Stars

Watchers

Forks

Packages

No packages published