Code documentation

Modules

elementMass.elements.calculate_weight(compound: str) float[source]

Get the atomic mass of a compound or element

Parameters:

compound (str) – chemical notation of a compound or element

Returns:

weight in atomic mass units

Return type:

float

elementMass.elements.cation_names(compounds: List[str]) List[source]

Get the name of the first cation for each element in compounds

Parameters:

compound (list of str) – chemical notation of compounds or elements

Returns:

names of cations

Return type:

list

elementMass.elements.cation_numbers(compounds: List[str]) Series[source]

Get the cation amount in compounds

Parameters:

compound (list of str) – chemical notation of an oxide or element

Returns:

number of cations in each compound

Return type:

pandas.Series

elementMass.elements.compound_weights(compounds: List[str]) Series[source]

Get the atomic mass of a compounds or elements

Parameters:

compound (list of str) – chemical notation of compounds or elements

Returns:

weights in atomic mass units

Return type:

pandas.Series

elementMass.elements.get_oxide_name(ion: str) str[source]

Convert an ion name to oxide. If ion charge is not included in the ion name, ElementMass’s default oxidation states are used.

Parameters:

ion (str) – ion name, charge can optionally be included in the name e.g. ‘Fe3’

Returns:

name of oxide

Return type:

str

elementMass.elements.oxygen_numbers(compounds: List[str]) Series[source]

Get the oxygen amount in compounds

Parameters:

compound (list of str) – chemical notation of compounds or elements

Returns:

number of oxygen in each compound

Return type:

pandas.Series