def CheckSpin(isym, SGData):
    """ Check for exceptions in spin rules
    """
    if SGData['SGPtGrp'] in ['222', 'mm2', '2mm', 'm2m']:
        if SGData['SGSpin'][1] * SGData['SGSpin'][2] * SGData['SGSpin'][3] < 0:
            SGData['SGSpin'][(isym + 1) % 3 + 1] *= -1
        if SGData['SpGrp'][0] == 'F' and isym > 2:
            SGData['SGSpin'][(isym + 1) % 3 + 3] == 1
    elif SGData['SGPtGrp'] == 'mmm':
        if SGData['SpGrp'][0] == 'F' and isym > 2:
            SGData['SGSpin'][(isym + 1) % 3 + 3] == 1
