"""
Chemical element definitions.

AUTO-GENERATED by ciffy/src/codegen/generate.py - DO NOT EDIT MANUALLY.
"""

from ..utils import IndexEnum


class Element(IndexEnum):
    """
    Chemical elements with their atomic numbers.

    Values correspond to atomic numbers for common biological elements.
    """

    # Common organic elements
    H = 1
    C = 6
    N = 7
    O = 8
    P = 15
    S = 16

    # Halogens
    F = 9
    CL = 17
    BR = 35
    I = 53

    # Alkali metals
    LI = 3
    NA = 11
    K = 19
    RB = 37
    CS = 55

    # Alkaline earth metals
    MG = 12
    CA = 20
    SR = 38
    BA = 56

    # Transition metals
    MN = 25
    FE = 26
    CO = 27
    NI = 28
    CU = 29
    ZN = 30
    MO = 42
    AG = 47
    CD = 48
    W = 74
    PT = 78
    AU = 79
    HG = 80

    # Other elements
    AL = 13
    SE = 34
    PB = 82


# Pre-computed reverse lookup: atomic number -> element name
ELEMENT_NAMES: dict[int, str] = {e.value: e.name for e in Element}
