Skip to main content

You can get element ratio.

Project description

Element Recognition

python_badge license_badge Total_Downloads_badge

What is this.

A package that organizes compositions written as strings into pandas.DataFrames, or conversely, generates compositions from mixing ratios by using only numpy and pandas.

It works well with ternary_diagram (This makes it easy to generate beautiful ternary diagram.). Please check it out.

How to install

pip install element-recognition

How to use

If you want to know in details, see example.

Import modules

from element_recognition import get_ratio, make_compositions


This is a function that returns a pandas.DataFrame of mixing ratios given a compound and a raw material.

get_ratio(products = ['Li2La2TiO6'], materials = ['Li2O', 'La2O3', 'TiO2'])
               Li2O  La2O3  TiO2
    Li2La2TiO6   1.0   1.0   1.0


This function returns the composition formula and the amount of all elements contained as a pandas.DataFrame by giving the raw materials and the mixing ratio.

make_compositions(materials = ['Li2O', 'La2O3', 'TiO2'], ratio = [[1, 2, 3]])
                H   He   Li   Be    B    C    N     O    F   Ne   Na   Mg   Al   Si    P  ...   Rf   Db   Sg   Bh   Hs   Mt   Ds   Rg   Cn   Nh   Fl   Mc   Lv   Ts   Og
    Li2Ti3La4O13  0.0  0.0  2.0  0.0  0.0  0.0  0.0  13.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  ...  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0



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

element_recognition-1.1.4.tar.gz (11.1 kB view hashes)

Uploaded Source

Built Distribution

element_recognition-1.1.4-py3-none-any.whl (9.7 kB view hashes)

Uploaded Python 3

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