# Define symmetry operation functions for each space group

# Space Group -1
def sg_neg1_op1(h, k, l):
    return (h, k, l)


def sg_neg1_op2(h, k, l):
    return (-h, -k, -l)


# Space Group 2/m
def sg_2m_op1(h, k, l):
    return (h, k, l)


def sg_2m_op2(h, k, l):
    return (-h, k, -l)


def sg_2m_op3(h, k, l):
    return (-h, -k, -l)


def sg_2m_op4(h, k, l):
    return (h, -k, l)


# Space Group mmm
def sg_mmm_op1(h, k, l):
    return (h, k, l)


def sg_mmm_op2(h, k, l):
    return (-h, -k, l)


def sg_mmm_op3(h, k, l):
    return (h, -k, -l)


def sg_mmm_op4(h, k, l):
    return (-h, k, -l)


def sg_mmm_op5(h, k, l):
    return (-h, -k, -l)


def sg_mmm_op6(h, k, l):
    return (h, k, -l)


def sg_mmm_op7(h, k, l):
    return (-h, k, l)


def sg_mmm_op8(h, k, l):
    return (h, -k, l)


# Space Group 4/m
def sg_4m_op1(h, k, l):
    return (h, k, l)


def sg_4m_op2(h, k, l):
    return (-h, -k, l)


def sg_4m_op3(h, k, l):
    return (k, -h, l)


def sg_4m_op4(h, k, l):
    return (-k, h, l)


def sg_4m_op5(h, k, l):
    return (-h, -k, -l)


def sg_4m_op6(h, k, l):
    return (h, k, -l)


def sg_4m_op7(h, k, l):
    return (-k, h, -l)


def sg_4m_op8(h, k, l):
    return (k, -h, -l)


# Space Group 4/mmm
def sg_4mmm_op1(h, k, l):
    return (h, k, l)


def sg_4mmm_op2(h, k, l):
    return (-h, -k, l)


def sg_4mmm_op3(h, k, l):
    return (k, -h, l)


def sg_4mmm_op4(h, k, l):
    return (-k, h, l)


def sg_4mmm_op5(h, k, l):
    return (-h, -k, -l)


def sg_4mmm_op6(h, k, l):
    return (h, k, -l)


def sg_4mmm_op7(h, k, l):
    return (-k, h, -l)


def sg_4mmm_op8(h, k, l):
    return (k, -h, -l)


def sg_4mmm_op9(h, k, l):
    return (h, -k, l)


def sg_4mmm_op10(h, k, l):
    return (-h, k, l)


def sg_4mmm_op11(h, k, l):
    return (-h, k, -l)


def sg_4mmm_op12(h, k, l):
    return (h, -k, -l)


def sg_4mmm_op13(h, k, l):
    return (-k, -h, l)


def sg_4mmm_op14(h, k, l):
    return (k, h, l)


def sg_4mmm_op15(h, k, l):
    return (k, h, -l)


def sg_4mmm_op16(h, k, l):
    return (-k, -h, -l)


# Space Group -3
def sg_neg3_op1(h, k, l):
    return (h, k, l)


def sg_neg3_op2(h, k, l):
    return (-h, -k, -l)


def sg_neg3_op3(h, k, l):
    return (k, -h - k, l)


def sg_neg3_op4(h, k, l):
    return (-k, h + k, -l)


def sg_neg3_op5(h, k, l):
    return (-h - k, h, l)


def sg_neg3_op6(h, k, l):
    return (h + k, -h, -l)


# Space Group -3m1
def sg_neg3m1_op1(h, k, l):
    return (h, k, l)


def sg_neg3m1_op2(h, k, l):
    return (-h, -k, -l)


def sg_neg3m1_op3(h, k, l):
    return (k, -h - k, l)


def sg_neg3m1_op4(h, k, l):
    return (-k, h + k, -l)


def sg_neg3m1_op5(h, k, l):
    return (-h - k, h, l)


def sg_neg3m1_op6(h, k, l):
    return (h + k, -h, -l)


def sg_neg3m1_op7(h, k, l):
    return (h + k, -k, l)


def sg_neg3m1_op8(h, k, l):
    return (-h - k, k, -l)


def sg_neg3m1_op9(h, k, l):
    return (-k, -h, l)


def sg_neg3m1_op10(h, k, l):
    return (k, h, -l)


def sg_neg3m1_op11(h, k, l):
    return (-h, h + k, l)


def sg_neg3m1_op12(h, k, l):
    return (h, -h - k, -l)


# Space Group -31m
def sg_neg31m_op1(h, k, l):
    return (h, k, l)


def sg_neg31m_op2(h, k, l):
    return (-h, -k, -l)


def sg_neg31m_op3(h, k, l):
    return (k, -h - k, l)


def sg_neg31m_op4(h, k, l):
    return (-k, h + k, -l)


def sg_neg31m_op5(h, k, l):
    return (-h - k, h, l)


def sg_neg31m_op6(h, k, l):
    return (h + k, -h, -l)


def sg_neg31m_op7(h, k, l):
    return (h + k, -k, -l)


def sg_neg31m_op8(h, k, l):
    return (-h - k, k, l)


def sg_neg31m_op9(h, k, l):
    return (-k, -h, -l)


def sg_neg31m_op10(h, k, l):
    return (k, h, l)


def sg_neg31m_op11(h, k, l):
    return (-h, h + k, -l)


def sg_neg31m_op12(h, k, l):
    return (h, -h - k, l)


# Space Group 6/m
def sg_6m_op1(h, k, l):
    return (h, k, l)


def sg_6m_op2(h, k, l):
    return (-h, -k, l)


def sg_6m_op3(h, k, l):
    return (k, -h - k, l)


def sg_6m_op4(h, k, l):
    return (-k, h + k, l)


def sg_6m_op5(h, k, l):
    return (-h - k, h, l)


def sg_6m_op6(h, k, l):
    return (h + k, -h, l)


def sg_6m_op7(h, k, l):
    return (h, k, -l)


def sg_6m_op8(h, k, l):
    return (-h, -k, -l)


def sg_6m_op9(h, k, l):
    return (k, -h - k, -l)


def sg_6m_op10(h, k, l):
    return (-k, h + k, -l)


def sg_6m_op11(h, k, l):
    return (-h - k, h, -l)


def sg_6m_op12(h, k, l):
    return (h + k, -h, -l)


# Space Group 6/mmm
def sg_6mmm_op1(h, k, l):
    return (h, k, l)


def sg_6mmm_op2(h, k, l):
    return (-h, -k, l)


def sg_6mmm_op3(h, k, l):
    return (k, -h - k, l)


def sg_6mmm_op4(h, k, l):
    return (-k, h + k, l)


def sg_6mmm_op5(h, k, l):
    return (-h - k, h, l)


def sg_6mmm_op6(h, k, l):
    return (h + k, -h, l)


def sg_6mmm_op7(h, k, l):
    return (h, k, -l)


def sg_6mmm_op8(h, k, l):
    return (-h, -k, -l)


def sg_6mmm_op9(h, k, l):
    return (k, -h - k, -l)


def sg_6mmm_op10(h, k, l):
    return (-k, h + k, -l)


def sg_6mmm_op11(h, k, l):
    return (-h - k, h, -l)


def sg_6mmm_op12(h, k, l):
    return (h + k, -h, -l)


def sg_6mmm_op13(h, k, l):
    return (h + k, -k, l)


def sg_6mmm_op14(h, k, l):
    return (-h - k, k, -l)


def sg_6mmm_op15(h, k, l):
    return (-k, -h, l)


def sg_6mmm_op16(h, k, l):
    return (k, h, -l)


def sg_6mmm_op17(h, k, l):
    return (-h, h + k, l)


def sg_6mmm_op18(h, k, l):
    return (h, -h - k, -l)


def sg_6mmm_op19(h, k, l):
    return (h + k, -k, -l)


def sg_6mmm_op20(h, k, l):
    return (-h - k, k, l)


def sg_6mmm_op21(h, k, l):
    return (-k, -h, -l)


def sg_6mmm_op22(h, k, l):
    return (k, h, l)


def sg_6mmm_op23(h, k, l):
    return (-h, h + k, -l)


def sg_6mmm_op24(h, k, l):
    return (h, -h - k, l)


# Space Group m-3
def sg_m3_op1(h, k, l):
    return (h, k, l)


def sg_m3_op2(h, k, l):
    return (-h, -k, l)


def sg_m3_op3(h, k, l):
    return (k, h, l)


def sg_m3_op4(h, k, l):
    return (-k, -h, l)


def sg_m3_op5(h, k, l):
    return (l, k, h)


def sg_m3_op6(h, k, l):
    return (-l, -k, h)


def sg_m3_op7(h, k, l):
    return (h, -k, l)


def sg_m3_op8(h, k, l):
    return (-h, k, l)


def sg_m3_op9(h, k, l):
    return (k, -h, l)


def sg_m3_op10(h, k, l):
    return (-k, h, l)


def sg_m3_op11(h, k, l):
    return (l, -k, h)


def sg_m3_op12(h, k, l):
    return (-l, k, h)


def sg_m3_op13(h, k, l):
    return (h, k, -l)


def sg_m3_op14(h, k, l):
    return (-h, -k, -l)


def sg_m3_op15(h, k, l):
    return (k, h, -l)


def sg_m3_op16(h, k, l):
    return (-k, -h, -l)


def sg_m3_op17(h, k, l):
    return (l, k, -h)


def sg_m3_op18(h, k, l):
    return (-l, -k, -h)


def sg_m3_op19(h, k, l):
    return (h, -k, -l)


def sg_m3_op20(h, k, l):
    return (-h, k, -l)


def sg_m3_op21(h, k, l):
    return (k, -h, -l)


def sg_m3_op22(h, k, l):
    return (-k, h, -l)


def sg_m3_op23(h, k, l):
    return (l, -k, -h)


def sg_m3_op24(h, k, l):
    return (-l, k, -h)


# Space Group m-3m
def sg_m3m_op1(h, k, l):
    return (h, k, l)


def sg_m3m_op2(h, k, l):
    return (h, l, k)


def sg_m3m_op3(h, k, l):
    return (k, h, l)


def sg_m3m_op4(h, k, l):
    return (k, l, h)


def sg_m3m_op5(h, k, l):
    return (l, h, k)


def sg_m3m_op6(h, k, l):
    return (l, k, h)


def sg_m3m_op7(h, k, l):
    return (-h, -k, -l)


def sg_m3m_op8(h, k, l):
    return (-h, -l, -k)


def sg_m3m_op9(h, k, l):
    return (-k, -h, -l)


def sg_m3m_op10(h, k, l):
    return (-k, -l, -h)


def sg_m3m_op11(h, k, l):
    return (-l, -h, -k)


def sg_m3m_op12(h, k, l):
    return (-l, -k, -h)


def sg_m3m_op13(h, k, l):
    return (-h, k, l)


def sg_m3m_op14(h, k, l):
    return (-h, l, k)


def sg_m3m_op15(h, k, l):
    return (-k, h, l)


def sg_m3m_op16(h, k, l):
    return (-k, l, h)


def sg_m3m_op17(h, k, l):
    return (-l, h, k)


def sg_m3m_op18(h, k, l):
    return (-l, k, h)


def sg_m3m_op19(h, k, l):
    return (h, -k, l)


def sg_m3m_op20(h, k, l):
    return (h, -l, k)


def sg_m3m_op21(h, k, l):
    return (k, -h, l)


def sg_m3m_op22(h, k, l):
    return (k, -l, h)


def sg_m3m_op23(h, k, l):
    return (l, -h, k)


def sg_m3m_op24(h, k, l):
    return (l, -k, h)


def sg_m3m_op25(h, k, l):
    return (h, k, -l)


def sg_m3m_op26(h, k, l):
    return (h, l, -k)


def sg_m3m_op27(h, k, l):
    return (k, h, -l)


def sg_m3m_op28(h, k, l):
    return (k, l, -h)


def sg_m3m_op29(h, k, l):
    return (l, h, -k)


def sg_m3m_op30(h, k, l):
    return (l, k, -h)


def sg_m3m_op31(h, k, l):
    return (-h, -k, l)


def sg_m3m_op32(h, k, l):
    return (-h, -l, k)


def sg_m3m_op33(h, k, l):
    return (-k, -h, l)


def sg_m3m_op34(h, k, l):
    return (-k, -l, h)


def sg_m3m_op35(h, k, l):
    return (-l, -h, k)


def sg_m3m_op36(h, k, l):
    return (-l, -k, h)


def sg_m3m_op37(h, k, l):
    return (-h, k, -l)


def sg_m3m_op38(h, k, l):
    return (-h, l, -k)


def sg_m3m_op39(h, k, l):
    return (-k, h, -l)


def sg_m3m_op40(h, k, l):
    return (-k, l, -h)


def sg_m3m_op41(h, k, l):
    return (-l, h, -k)


def sg_m3m_op42(h, k, l):
    return (-l, k, -h)


def sg_m3m_op43(h, k, l):
    return (h, -k, -l)


def sg_m3m_op44(h, k, l):
    return (h, -l, -k)


def sg_m3m_op45(h, k, l):
    return (k, -h, -l)


def sg_m3m_op46(h, k, l):
    return (k, -l, -h)


def sg_m3m_op47(h, k, l):
    return (l, -h, -k)


def sg_m3m_op48(h, k, l):
    return (l, -k, -h)


# Define the symmetry_operations dictionary using the named functions
symmetry_operations = {
    '-1': [sg_neg1_op1, sg_neg1_op2],
    '2/m': [sg_2m_op1, sg_2m_op2, sg_2m_op3, sg_2m_op4],
    'mmm': [
        sg_mmm_op1, sg_mmm_op2, sg_mmm_op3, sg_mmm_op4,
        sg_mmm_op5, sg_mmm_op6, sg_mmm_op7, sg_mmm_op8
    ],
    '4/m': [
        sg_4m_op1, sg_4m_op2, sg_4m_op3, sg_4m_op4,
        sg_4m_op5, sg_4m_op6, sg_4m_op7, sg_4m_op8
    ],
    '4/mmm': [
        sg_4mmm_op1, sg_4mmm_op2, sg_4mmm_op3, sg_4mmm_op4,
        sg_4mmm_op5, sg_4mmm_op6, sg_4mmm_op7, sg_4mmm_op8,
        sg_4mmm_op9, sg_4mmm_op10, sg_4mmm_op11, sg_4mmm_op12,
        sg_4mmm_op13, sg_4mmm_op14, sg_4mmm_op15, sg_4mmm_op16
    ],
    '-3': [
        sg_neg3_op1, sg_neg3_op2, sg_neg3_op3,
        sg_neg3_op4, sg_neg3_op5, sg_neg3_op6
    ],
    '-3m1': [
        sg_neg3m1_op1, sg_neg3m1_op2, sg_neg3m1_op3,
        sg_neg3m1_op4, sg_neg3m1_op5, sg_neg3m1_op6,
        sg_neg3m1_op7, sg_neg3m1_op8, sg_neg3m1_op9,
        sg_neg3m1_op10, sg_neg3m1_op11, sg_neg3m1_op12
    ],
    '-31m': [
        sg_neg31m_op1, sg_neg31m_op2, sg_neg31m_op3,
        sg_neg31m_op4, sg_neg31m_op5, sg_neg31m_op6,
        sg_neg31m_op7, sg_neg31m_op8, sg_neg31m_op9,
        sg_neg31m_op10, sg_neg31m_op11, sg_neg31m_op12
    ],
    '6/m': [
        sg_6m_op1, sg_6m_op2, sg_6m_op3, sg_6m_op4,
        sg_6m_op5, sg_6m_op6, sg_6m_op7, sg_6m_op8,
        sg_6m_op9, sg_6m_op10, sg_6m_op11, sg_6m_op12
    ],
    '6/mmm': [
        sg_6mmm_op1, sg_6mmm_op2, sg_6mmm_op3, sg_6mmm_op4,
        sg_6mmm_op5, sg_6mmm_op6, sg_6mmm_op7, sg_6mmm_op8,
        sg_6mmm_op9, sg_6mmm_op10, sg_6mmm_op11, sg_6mmm_op12,
        sg_6mmm_op13, sg_6mmm_op14, sg_6mmm_op15, sg_6mmm_op16,
        sg_6mmm_op17, sg_6mmm_op18, sg_6mmm_op19, sg_6mmm_op20,
        sg_6mmm_op21, sg_6mmm_op22, sg_6mmm_op23, sg_6mmm_op24
    ],
    'm-3': [
        sg_m3_op1, sg_m3_op2, sg_m3_op3, sg_m3_op4,
        sg_m3_op5, sg_m3_op6, sg_m3_op7, sg_m3_op8,
        sg_m3_op9, sg_m3_op10, sg_m3_op11, sg_m3_op12,
        sg_m3_op13, sg_m3_op14, sg_m3_op15, sg_m3_op16,
        sg_m3_op17, sg_m3_op18, sg_m3_op19, sg_m3_op20,
        sg_m3_op21, sg_m3_op22, sg_m3_op23, sg_m3_op24
    ],
    'm-3m': [
        sg_m3m_op1, sg_m3m_op2, sg_m3m_op3, sg_m3m_op4,
        sg_m3m_op5, sg_m3m_op6, sg_m3m_op7, sg_m3m_op8,
        sg_m3m_op9, sg_m3m_op10, sg_m3m_op11, sg_m3m_op12,
        sg_m3m_op13, sg_m3m_op14, sg_m3m_op15, sg_m3m_op16,
        sg_m3m_op17, sg_m3m_op18, sg_m3m_op19, sg_m3m_op20,
        sg_m3m_op21, sg_m3m_op22, sg_m3m_op23, sg_m3m_op24,
        sg_m3m_op25, sg_m3m_op26, sg_m3m_op27, sg_m3m_op28,
        sg_m3m_op29, sg_m3m_op30, sg_m3m_op31, sg_m3m_op32,
        sg_m3m_op33, sg_m3m_op34, sg_m3m_op35, sg_m3m_op36,
        sg_m3m_op37, sg_m3m_op38, sg_m3m_op39, sg_m3m_op40,
        sg_m3m_op41, sg_m3m_op42, sg_m3m_op43, sg_m3m_op44,
        sg_m3m_op45, sg_m3m_op46, sg_m3m_op47, sg_m3m_op48
    ]
}
