bobleesj.utils.sources package

Submodules

bobleesj.utils.sources.oliynyk module

class bobleesj.utils.sources.oliynyk.Oliynyk[source]

Bases: object

Oliynyk elemental property database interface.

get_oliynyk_CAF_data() dict[str, dict[str, float]][source]

Load the Oliynyk elemental property data from an Excel file. The data is stored in a dictionary format with element symbols as keys.

Examples

>>> oliynyk = Oliynyk()
>>> data = oliynyk.get_oliynyk_CAF_data()
{
    "Li": {"atomic_weight": 6.941, ...},
    "Be": {"atomic_weight": 9.0122, ...},
    ...
}
>>> data["Li"]["atomic_weight"]
6.941
get_property_data(property: Property) dict[str, float][source]

Get the given property data for all elements in the database.

Examples

>>> oliynyk = Oliynyk()
>>> property_data = oliynyk.get_property_data(Property.AW)
>>> property_data
{"Li": 6.941, "Be": 9.0122, "B": 10.81, ...}
get_property_data_for_formula(formula: str, property: Property) dict[str, float][source]

Get property data for individual elements in a given formula.

Examples

>>> oliynyk = Oliynyk()
>>> oliynyk.get_property_data_for_formula("LiFeP", Property.AW)
{"Li": 6.941, "Fe": 55.845, "O": 15.999}
get_supported_formulas(formulas: list[str]) tuple[list[str], list[str]][source]

Filter formulas to only include those with supported elements.

Examples

>>> oliynyk = Oliynyk()
>>> formulas = ["FeH", "NdSi2"]
>>> supported, unsupported = oliynyk.get_supported_formulas(formulas)
>>> supported
["NdSi2"]
>>> unsupported
["FeH"]
is_formula_supported(formula: str) bool[source]

Check if a formula is supported by the Oliynyk database.

Examples

>>> oliynyk = Oliynyk()
>>> oliynyk.is_formula_supported("LiFePO4")
True
>>> oliynyk.is_formula_supported("FeH")
False
list_supported_elements() list[str][source]

List all elements in the Oliynyk database.

Examples

>>> oliynyk = Oliynyk()
>>> elements = oliynyk.list_supported_elements()
>>> elements
["Li", "Be", "B", "C", "Na", "Mg", "Al", "Si", "P", "S", ...]
class bobleesj.utils.sources.oliynyk.Property(*values)[source]

Bases: str, Enum

ATOMIC_NUMBER = 'atomic_number'
AW = 'atomic_weight'
BULK_MODULUS = 'bulk_modulus'
CIF_RADIUS = 'CIF_radius'
COHESIVE_ENERGY = 'cohesive_energy'
COORD_NUM = 'coordination_number'
DENSITY = 'density'
GILMAN = 'Gilman'
GROUP = 'group'
ION_ENERGY = 'ionization_energy'
MARTYNOV_BATSANOV_EN = 'Martynov_Batsanov_EN'
MELTING_POINT_K = 'melting_point_K'
MEND_NUM = 'Mendeleev_number'
PAULING_EN = 'Pauling_EN'
PAULING_RADIUS_CN12 = 'Pauling_radius_CN12'
PERIOD = 'period'
POLYHEDRON_DISTORT = 'polyhedron_distortion'
RATIO_CLOSEST = 'ratio_closest'
SPECIFIC_HEAT = 'specific_heat'
UNPARIED_E = 'unpaired_electrons'
VAL_TOTAL = 'valencee_total'
Z_EFF = 'Z_eff'
classmethod display()[source]

Display the available elemental properties in a user-friendly format.

Examples

>>> Property.display()
Available elemental properties:
  1. AW - atomic_weight
  2. ATOMIC_NUMBER - atomic_number
  ...
classmethod select()[source]

Prompt the user to select an elemental property from the available options. Returns the selected property.

Examples

>>> selected_property = Property.select()
Available elemental properties:
  1. AW - atomic_weight
  2. ATOMIC_NUMBER - atomic_number
  ...

Enter the number of the property to use: 1