
try:
    from pymol import cmd
except ImportError:
    print("PyMOL Python lib is missing")
    # sys.exit(0)

def spl_extract():
 for name in cmd.get_names("all"):
    #if name in ['5zwo', '5gm6', '5lj3', '5mps', '6exn', '5ylz', '5y88', '3jb9', '6icz', '6ff7', '5yzg', '5xjc', '5mq0', '5lj5', '6g90', '6n7r', '6n7p']: # this should be auto
    print(" \ Extracting mode for %s" % name)
    if '5zwo' in name.lower():
        cmd.extract("PRP8_B5zwo", "chain A and 5zwo")
        cmd.extract("BRR2_B5zwo", "chain D and 5zwo")
        cmd.extract("LEA1_B5zwo", "chain o and 5zwo")
        cmd.extract("Msl1_B5zwo", "chain p and 5zwo")
        cmd.extract("SNU114_B5zwo", "chain C and 5zwo")
        cmd.extract("U2_B5zwo", "chain H and 5zwo")
        cmd.extract("U5_B5zwo", "chain B and 5zwo")
        cmd.extract("U6_B5zwo", "chain F and 5zwo")
        cmd.extract("U4_B5zwo", "chain I and 5zwo")
        cmd.extract("Intron_B5zwo", "chain G and 5zwo")
        cmd.extract("PRP4_B5zwo", "chain K and 5zwo")
        cmd.extract("PRP31_B5zwo", "chain L and 5zwo")
        cmd.extract("PRP6_B5zwo", "chain N and 5zwo")
        cmd.extract("PRP3_B5zwo", "chain J and 5zwo")
        cmd.extract("DIB1_B5zwo", "chain E and 5zwo")
        cmd.extract("SNU13_B5zwo", "chain M and 5zwo")
        cmd.extract("LSM8_B5zwo", "chain z and 5zwo")
        cmd.extract("LSM2_B5zwo", "chain q and 5zwo")
        cmd.extract("LSM3_B5zwo", "chain r and 5zwo")
        cmd.extract("LSM6_B5zwo", "chain x and 5zwo")
        cmd.extract("LSM5_B5zwo", "chain t and 5zwo")
        cmd.extract("LSM7_B5zwo", "chain y and 5zwo")
        cmd.extract("LSM4_B5zwo", "chain s and 5zwo")
        cmd.extract("SNU66_B5zwo", "chain O and 5zwo")
        cmd.extract("BUD13_B5zwo", "chain Y and 5zwo")
        cmd.extract("Cus1_B5zwo", "chain 2 and 5zwo")
        cmd.extract("HSH155_B5zwo", "chain 1 and 5zwo")
        cmd.extract("HSH49_B5zwo", "chain 4 and 5zwo")
        cmd.extract("PML1_B5zwo", "chain Z and 5zwo")
        cmd.extract("PRP11_B5zwo", "chain v and 5zwo")
        cmd.extract("RDS3_B5zwo", "chain 5 and 5zwo")
        cmd.extract("RSE1_B5zwo", "chain 3 and 5zwo")
        cmd.extract("SNU17_B5zwo", "chain X and 5zwo")
        cmd.extract("Ysf3_B5zwo", "chain 6 and 5zwo")
        cmd.extract("SMB1_1_B5zwo", "chain a and 5zwo")
        cmd.extract("SMB1_2_B5zwo", "chain P and 5zwo")
        cmd.extract("SMB1_3_B5zwo", "chain h and 5zwo")
        cmd.extract("SME1_1_B5zwo", "chain e and 5zwo")
        cmd.extract("SME1_2_B5zwo", "chain T and 5zwo")
        cmd.extract("SME1_3_B5zwo", "chain i and 5zwo")
        cmd.extract("SMX3_1_B5zwo", "chain f and 5zwo")
        cmd.extract("SMX3_2_B5zwo", "chain U and 5zwo")
        cmd.extract("SMX3_3_B5zwo", "chain j and 5zwo")
        cmd.extract("SMX2_1_B5zwo", "chain g and 5zwo")
        cmd.extract("SMX2_2_B5zwo", "chain V and 5zwo")
        cmd.extract("SMX2_3_B5zwo", "chain k and 5zwo")
        cmd.extract("SMD3_1_B5zwo", "chain d and 5zwo")
        cmd.extract("SMD3_2_B5zwo", "chain S and 5zwo")
        cmd.extract("SMD3_3_B5zwo", "chain l and 5zwo")
        cmd.extract("SMD1_1_B5zwo", "chain b and 5zwo")
        cmd.extract("SMD1_2_B5zwo", "chain Q and 5zwo")
        cmd.extract("SMD1_3_B5zwo", "chain m and 5zwo")
        cmd.extract("SMD2_1_B5zwo", "chain c and 5zwo")
        cmd.extract("SMD2_2_B5zwo", "chain R and 5zwo")
        cmd.extract("SMD2_3_B5zwo", "chain n and 5zwo")
        cmd.extract("PRP9_B5zwo", "chain u and 5zwo")
        cmd.extract("PRP21_B5zwo", "chain w and 5zwo")
        cmd.extract("SNU23_B5zwo", "chain W and 5zwo")
        cmd.extract("PRP38_B5zwo", "chain 0 and 5zwo")
        cmd.extract("SPP381_B5zwo", "chain 9 and 5zwo")
        cmd.set_name("5zwo", "unknown_other_B5zwo")
        cmd.group("B5zwo", "*_B5zwo")
        cmd.do("order *, yes")
    if '5gm6' in name.lower():
        cmd.extract("PRP8_Ba5gm6", "chain A and 5gm6")
        cmd.extract("BRR2_Ba5gm6", "chain B and 5gm6")
        cmd.extract("BUD31_Ba5gm6", "chain T and 5gm6")
        cmd.extract("CEF1_Ba5gm6", "chain c and 5gm6")
        cmd.extract("CWC15_Ba5gm6", "chain S and 5gm6")
        cmd.extract("CWC2_hRBM22_Ba5gm6", "chain R and 5gm6")
        cmd.extract("CWC21_Ba5gm6", "chain X and 5gm6")
        cmd.extract("CWC22_Ba5gm6", "chain Z and 5gm6")
        cmd.extract("PRP45_Ba5gm6", "chain P and 5gm6")
        cmd.extract("CDC40_Ba5gm6", "chain n and 5gm6")
        cmd.extract("PRP19_Ba5gm6", "chain f and 5gm6")
        cmd.extract("PRP46_Ba5gm6", "chain O and 5gm6")
        cmd.extract("SLT11/ECM2_Ba5gm6", "chain Q and 5gm6")
        cmd.extract("SNT309_Ba5gm6", "chain t and 5gm6")
        cmd.extract("SNU114_Ba5gm6", "chain C and 5gm6")
        cmd.extract("SYF2_Ba5gm6", "chain f and 5gm6")
        cmd.extract("SYF1_Ba5gm6", "chain v and 5gm6")
        cmd.extract("U2_Ba5gm6", "chain 2 and 5gm6")
        cmd.extract("U5_Ba5gm6", "chain 5 and 5gm6")
        cmd.extract("U6_Ba5gm6", "chain 6 and 5gm6")
        cmd.extract("Intron_Ba5gm6", "chain M and 5gm6")
        cmd.extract("Exon_Ba5gm6", "chain N and 5gm6")
        cmd.extract("BUD13_Ba5gm6", "chain W and 5gm6")
        cmd.extract("CLF2_Ba5gm6", "chain d and 5gm6")
        cmd.extract("Cus1_Ba5gm6", "chain H and 5gm6")
        cmd.extract("CWC24_Ba5gm6", "chain a and 5gm6")
        cmd.extract("CWC27_Ba5gm6", "chain b and 5gm6")
        cmd.extract("HSH155_Ba5gm6", "chain G and 5gm6")
        cmd.extract("HSH49_Ba5gm6", "chain e and 5gm6")
        cmd.extract("PML1_Ba5gm6", "chain U and 5gm6")
        cmd.extract("PRP11_Ba5gm6", "chain I and 5gm6")
        cmd.extract("PRP2_Ba5gm6", "chain Y and 5gm6")
        cmd.extract("RDS3_Ba5gm6", "chain J and 5gm6")
        cmd.extract("RSE1_Ba5gm6", "chain F and 5gm6")
        cmd.extract("SNU17_Ba5gm6", "chain V and 5gm6")
        cmd.extract("Ysf3_Ba5gm6", "chain K and 5gm6")
        cmd.set_name("5gm6", "unknown_other_Ba5gm6")
        cmd.group("Ba5gm6", "*_Ba5gm6")
        cmd.do("order *, yes")
    if '5lj3' in name.lower():
        cmd.extract("PRP8_C5lj3", "chain A and 5lj3")
        cmd.extract("BUD31_C5lj3", "chain L and 5lj3")
        cmd.extract("CEF1_C5lj3", "chain O and 5lj3")
        cmd.extract("CLF1_C5lj3", "chain S and 5lj3")
        cmd.extract("CWC15_C5lj3", "chain P and 5lj3")
        cmd.extract("CWC16/YJU2_C5lj3", "chain D and 5lj3")
        cmd.extract("CWC2_hRBM22_C5lj3", "chain M and 5lj3")
        cmd.extract("CWC21_C5lj3", "chain R and 5lj3")
        cmd.extract("CWC22_C5lj3", "chain H and 5lj3")
        cmd.extract("CWC25_C5lj3", "chain F and 5lj3")
        cmd.extract("ISY1_C5lj3", "chain G and 5lj3")
        cmd.extract("LEA1_C5lj3", "chain W and 5lj3")
        cmd.extract("Msl1_C5lj3", "chain Y and 5lj3")
        cmd.extract("PRP45_C5lj3", "chain K and 5lj3")
        cmd.extract("PRP46_C5lj3", "chain J and 5lj3")
        cmd.extract("SLT11/ECM2_C5lj3", "chain N and 5lj3")
        cmd.extract("SNU114_C5lj3", "chain C and 5lj3")
        cmd.extract("SYF1_C5lj3", "chain T and 5lj3")
        cmd.extract("U2_C5lj3", "chain Z and 5lj3")
        cmd.extract("U5_C5lj3", "chain U and 5lj3")
        cmd.extract("U6_C5lj3", "chain V and 5lj3")
        cmd.extract("Intron_C5lj3", "chain I and 5lj3")
        cmd.extract("Exon_C5lj3", "chain E and 5lj3")
        cmd.extract("SMB1_1_C5lj3", "chain b and 5lj3")
        cmd.extract("SMB1_2_C5lj3", "chain k and 5lj3")
        cmd.extract("SME1_1_C5lj3", "chain e and 5lj3")
        cmd.extract("SME1_2_C5lj3", "chain p and 5lj3")
        cmd.extract("SMX3_1_C5lj3", "chain f and 5lj3")
        cmd.extract("SMX3_2_C5lj3", "chain q and 5lj3")
        cmd.extract("SMX2_1_C5lj3", "chain g and 5lj3")
        cmd.extract("SMX2_2_C5lj3", "chain r and 5lj3")
        cmd.extract("SMD3_1_C5lj3", "chain d and 5lj3")
        cmd.extract("SMD3_2_C5lj3", "chain n and 5lj3")
        cmd.extract("SMD1_1_C5lj3", "chain h and 5lj3")
        cmd.extract("SMD1_2_C5lj3", "chain l and 5lj3")
        cmd.extract("SMD2_1_C5lj3", "chain j and 5lj3")
        cmd.extract("SMD2_2_C5lj3", "chain m and 5lj3")
        cmd.set_name("5lj3", "unknown_other_C5lj3")
        cmd.group("C5lj3", "*_C5lj3")
        cmd.do("order *, yes")
    if '5mps' in name.lower():
        cmd.extract("PRP8_Cs5mps", "chain A and 5mps")
        cmd.extract("BUD31_Cs5mps", "chain L and 5mps")
        cmd.extract("CEF1_Cs5mps", "chain O and 5mps")
        cmd.extract("CLF1_Cs5mps", "chain S and 5mps")
        cmd.extract("CWC15_Cs5mps", "chain P and 5mps")
        cmd.extract("CWC2_hRBM22_Cs5mps", "chain M and 5mps")
        cmd.extract("CWC21_Cs5mps", "chain R and 5mps")
        cmd.extract("CWC22_Cs5mps", "chain H and 5mps")
        cmd.extract("PRP45_Cs5mps", "chain K and 5mps")
        cmd.extract("CDC40_Cs5mps", "chain o and 5mps")
        cmd.extract("PRP46_Cs5mps", "chain J and 5mps")
        cmd.extract("SLT11/ECM2_Cs5mps", "chain N and 5mps")
        cmd.extract("SNU114_Cs5mps", "chain C and 5mps")
        cmd.extract("SYF2_Cs5mps", "chain y and 5mps")
        cmd.extract("SYF1_Cs5mps", "chain T and 5mps")
        cmd.extract("U2_Cs5mps", "chain 2 and 5mps")
        cmd.extract("U5_Cs5mps", "chain 5 and 5mps")
        cmd.extract("U6_Cs5mps", "chain 6 and 5mps")
        cmd.extract("5EXON_Cs5mps", "chain E and 5mps")
        cmd.extract("Intron_Cs5mps", "chain I and 5mps")
        cmd.extract("Exon_Cs5mps", "chain E and 5mps")
        cmd.extract("SMB1_Cs5mps", "chain b and 5mps")
        cmd.extract("SME1_Cs5mps", "chain e and 5mps")
        cmd.extract("SMX3_Cs5mps", "chain f and 5mps")
        cmd.extract("SMX2_Cs5mps", "chain g and 5mps")
        cmd.extract("SMD3_Cs5mps", "chain d and 5mps")
        cmd.extract("SMD1_Cs5mps", "chain h and 5mps")
        cmd.extract("SMD2_Cs5mps", "chain j and 5mps")
        cmd.extract("PRP18_Cs5mps", "chain a and 5mps")
        cmd.extract("SLU7_Cs5mps", "chain c and 5mps")
        cmd.set_name("5mps", "unknown_other_Cs5mps")
        cmd.group("Cs5mps", "*_Cs5mps")
        cmd.do("order *, yes")
    if '6exn' in name.lower():
        cmd.extract("PRP8_P6exn", "chain A and 6exn")
        cmd.extract("BUD31_P6exn", "chain L and 6exn")
        cmd.extract("CEF1_P6exn", "chain O and 6exn")
        cmd.extract("CLF1_P6exn", "chain S and 6exn")
        cmd.extract("CWC15_P6exn", "chain P and 6exn")
        cmd.extract("CWC16/YJU2_P6exn", "chain D and 6exn")
        cmd.extract("CWC2_hRBM22_P6exn", "chain M and 6exn")
        cmd.extract("CWC21_P6exn", "chain R and 6exn")
        cmd.extract("CWC22_P6exn", "chain H and 6exn")
        cmd.extract("LEA1_P6exn", "chain W and 6exn")
        cmd.extract("Msl1_P6exn", "chain Y and 6exn")
        cmd.extract("PRP45_P6exn", "chain K and 6exn")
        cmd.extract("CDC40_P6exn", "chain o and 6exn")
        cmd.extract("PRP19_1_P6exn", "chain t and 6exn")
        cmd.extract("PRP19_2_P6exn", "chain u and 6exn")
        cmd.extract("PRP19_3_P6exn", "chain v and 6exn")
        cmd.extract("PRP19_4_P6exn", "chain w and 6exn")
        cmd.extract("PRP46_P6exn", "chain J and 6exn")
        cmd.extract("SLT11/ECM2_P6exn", "chain N and 6exn")
        cmd.extract("SNU114_P6exn", "chain C and 6exn")
        cmd.extract("SYF1_P6exn", "chain T and 6exn")
        cmd.extract("U2_P6exn", "chain 2 and 6exn")
        cmd.extract("U5_P6exn", "chain 5 and 6exn")
        cmd.extract("U6_P6exn", "chain 6 and 6exn")
        cmd.extract("Intron_P6exn", "chain I and 6exn")
        cmd.extract("Exon_P6exn", "chain E and 6exn")
        cmd.extract("SMB1_1_P6exn", "chain b and 6exn")
        cmd.extract("SMB1_2_P6exn", "chain k and 6exn")
        cmd.extract("SME1_1_P6exn", "chain e and 6exn")
        cmd.extract("SME1_2_P6exn", "chain p and 6exn")
        cmd.extract("SMX3_1_P6exn", "chain f and 6exn")
        cmd.extract("SMX3_2_P6exn", "chain q and 6exn")
        cmd.extract("SMX2_1_P6exn", "chain g and 6exn")
        cmd.extract("SMX2_2_P6exn", "chain r and 6exn")
        cmd.extract("SMD3_1_P6exn", "chain d and 6exn")
        cmd.extract("SMD3_2_P6exn", "chain n and 6exn")
        cmd.extract("SMD1_1_P6exn", "chain h and 6exn")
        cmd.extract("SMD1_2_P6exn", "chain l and 6exn")
        cmd.extract("SMD2_1_P6exn", "chain j and 6exn")
        cmd.extract("SMD2_2_P6exn", "chain m and 6exn")
        cmd.extract("PRP22_P6exn", "chain V and 6exn")
        cmd.extract("PRP18_P6exn", "chain a and 6exn")
        cmd.extract("SLU7_P6exn", "chain c and 6exn")
        cmd.extract("unassigned_P6exn", "chain X and 6exn")
        cmd.set_name("6exn", "unknown_other_P6exn")
        cmd.group("P6exn", "*_P6exn")
        cmd.do("order *, yes")
    if '5ylz' in name.lower():
        cmd.extract("PRP8_P5ylz", "chain A and 5ylz")
        cmd.extract("BUD31_P5ylz", "chain L and 5ylz")
        cmd.extract("CEF1_P5ylz", "chain J and 5ylz")
        cmd.extract("CLF1_P5ylz", "chain I and 5ylz")
        cmd.extract("CWC15_P5ylz", "chain P and 5ylz")
        cmd.extract("CWC2_hRBM22_P5ylz", "chain N and 5ylz")
        cmd.extract("CWC21_P5ylz", "chain R and 5ylz")
        cmd.extract("CWC22_P5ylz", "chain S and 5ylz")
        cmd.extract("LEA1_P5ylz", "chain o and 5ylz")
        cmd.extract("Msl1_P5ylz", "chain p and 5ylz")
        cmd.extract("PRP45_P5ylz", "chain Q and 5ylz")
        cmd.extract("CDC40_P5ylz", "chain T and 5ylz")
        cmd.extract("PRP19_1_P5ylz", "chain q and 5ylz")
        cmd.extract("PRP19_2_P5ylz", "chain r and 5ylz")
        cmd.extract("PRP19_3_P5ylz", "chain s and 5ylz")
        cmd.extract("PRP19_4_P5ylz", "chain t and 5ylz")
        cmd.extract("PRP46_P5ylz", "chain O and 5ylz")
        cmd.extract("SLT11/ECM2_P5ylz", "chain M and 5ylz")
        cmd.extract("SNT309_P5ylz", "chain G and 5ylz")
        cmd.extract("SNU114_P5ylz", "chain C and 5ylz")
        cmd.extract("SYF2_P5ylz", "chain K and 5ylz")
        cmd.extract("SYF1_P5ylz", "chain H and 5ylz")
        cmd.extract("U2_P5ylz", "chain F and 5ylz")
        cmd.extract("U5_P5ylz", "chain B and 5ylz")
        cmd.extract("U6_P5ylz", "chain D and 5ylz")
        cmd.extract("Intron_P5ylz", "chain E and 5ylz")
        cmd.extract("SMB1_1_P5ylz", "chain a and 5ylz")
        cmd.extract("SMB1_2_P5ylz", "chain h and 5ylz")
        cmd.extract("SME1_1_P5ylz", "chain b and 5ylz")
        cmd.extract("SME1_2_P5ylz", "chain i and 5ylz")
        cmd.extract("SMX3_1_P5ylz", "chain c and 5ylz")
        cmd.extract("SMX3_2_P5ylz", "chain j and 5ylz")
        cmd.extract("SMX2_1_P5ylz", "chain d and 5ylz")
        cmd.extract("SMX2_2_P5ylz", "chain k and 5ylz")
        cmd.extract("SMD3_1_P5ylz", "chain e and 5ylz")
        cmd.extract("SMD3_2_P5ylz", "chain l and 5ylz")
        cmd.extract("SMD1_1_P5ylz", "chain f and 5ylz")
        cmd.extract("SMD1_2_P5ylz", "chain m and 5ylz")
        cmd.extract("SMD2_1_P5ylz", "chain g and 5ylz")
        cmd.extract("SMD2_2_P5ylz", "chain n and 5ylz")
        cmd.extract("PRP22_P5ylz", "chain W and 5ylz")
        cmd.extract("PRP18_P5ylz", "chain U and 5ylz")
        cmd.extract("SLU7_P5ylz", "chain V and 5ylz")
        cmd.set_name("5ylz", "unknown_other_P5ylz")
        cmd.group("P5ylz", "*_P5ylz")
        cmd.do("order *, yes")
    if '5y88' in name.lower():
        cmd.extract("PRP8_I5y88", "chain A and 5y88")
        cmd.extract("BUD31_I5y88", "chain L and 5y88")
        cmd.extract("CLF1_I5y88", "chain I and 5y88")
        cmd.extract("CWC15_I5y88", "chain P and 5y88")
        cmd.extract("CWC16/YJU2_I5y88", "chain R and 5y88")
        cmd.extract("CWC2_hRBM22_I5y88", "chain N and 5y88")
        cmd.extract("CWC25_I5y88", "chain G and 5y88")
        cmd.extract("Intron_2_I5y88", "chain E and 5y88")
        cmd.extract("LEA1_I5y88", "chain o and 5y88")
        cmd.extract("Msl1_I5y88", "chain p and 5y88")
        cmd.extract("PRP45_I5y88", "chain Q and 5y88")
        cmd.extract("CDC40_I5y88", "chain S and 5y88")
        cmd.extract("PRP19_1_I5y88", "chain q and 5y88")
        cmd.extract("PRP19_2_I5y88", "chain r and 5y88")
        cmd.extract("PRP19_3_I5y88", "chain s and 5y88")
        cmd.extract("PRP19_4_I5y88", "chain t and 5y88")
        cmd.extract("PRP46_I5y88", "chain O and 5y88")
        cmd.extract("SLT11/ECM2_I5y88", "chain M and 5y88")
        cmd.extract("SNT309_I5y88", "chain G and 5y88")
        cmd.extract("SNU114_I5y88", "chain C and 5y88")
        cmd.extract("SYF2_I5y88", "chain K and 5y88")
        cmd.extract("SYF1_I5y88", "chain H and 5y88")
        cmd.extract("U2_I5y88", "chain F and 5y88")
        cmd.extract("U5_I5y88", "chain B and 5y88")
        cmd.extract("U6_I5y88", "chain D and 5y88")
        cmd.extract("Intron_I5y88", "chain x and 5y88")
        cmd.extract("RNA_I5y88", "chain x and 5y88")
        cmd.extract("cwc23_I5y88", "chain T and 5y88")
        cmd.extract("SPP382_I5y88", "chain U and 5y88")
        cmd.extract("NTR2_I5y88", "chain V and 5y88")
        cmd.extract("PRP43_I5y88", "chain W and 5y88")
        cmd.extract("SMB1_1_I5y88", "chain a and 5y88")
        cmd.extract("SMB1_2_I5y88", "chain h and 5y88")
        cmd.extract("SME1_1_I5y88", "chain b and 5y88")
        cmd.extract("SME1_2_I5y88", "chain i and 5y88")
        cmd.extract("SMX3_1_I5y88", "chain c and 5y88")
        cmd.extract("SMX3_2_I5y88", "chain j and 5y88")
        cmd.extract("SMX2_1_I5y88", "chain d and 5y88")
        cmd.extract("SMX2_2_I5y88", "chain k and 5y88")
        cmd.extract("SMD3_1_I5y88", "chain e and 5y88")
        cmd.extract("SMD3_2_I5y88", "chain l and 5y88")
        cmd.extract("SMD1_1_I5y88", "chain f and 5y88")
        cmd.extract("SMD1_2_I5y88", "chain m and 5y88")
        cmd.extract("SMD2_1_I5y88", "chain g and 5y88")
        cmd.extract("SMD2_2_I5y88", "chain n and 5y88")
        cmd.set_name("5y88", "unknown_other_I5y88")
        cmd.group("I5y88", "*_I5y88")
        cmd.do("order *, yes")
    if '3jb9' in name.lower():
        cmd.extract("U2_3jb9", "chain P and 3jb9")
        cmd.extract("U5_3jb9", "chain C and 3jb9")
        cmd.extract("U6_3jb9", "chain N and 3jb9")
        cmd.extract("Intron_1_3jb9", "chain O and 3jb9")
        cmd.extract("Intron_2_3jb9", "chain Q and 3jb9")
        cmd.extract("Spp42_yPrp8_3jb9", "chain A and 3jb9")
        cmd.extract("CWF15_yCWC15_3jb9", "chain h and 3jb9")
        cmd.set_name("3jb9", "unknown_other_3jb9")
        cmd.group("3jb9", "*_3jb9")
        cmd.do("order *, yes")
    if '6icz' in name.lower():
        cmd.extract("CWC15_hP_6icz", "chain P and 6icz")
        cmd.extract("U2_hP_6icz", "chain H and 6icz")
        cmd.extract("U5_hP_6icz", "chain B and 6icz")
        cmd.extract("U6_hP_6icz", "chain F and 6icz")
        cmd.extract("Intron_hP_6icz", "chain G and 6icz")
        cmd.extract("cwc23_hP_6icz", "chain 6ICZ and 6icz")
        cmd.set_name("6icz", "unknown_other_hP_6icz")
        cmd.group("hP6icz", "*_hP_6icz")
        cmd.do("order *, yes")
    if '6ff7' in name.lower():
        cmd.extract("CWC15_hBa_6ff7", "chain R and 6ff7")
        cmd.extract("CWC2_hRBM22_hBa_6ff7", "chain P and 6ff7")
        cmd.extract("U2_hBa_6ff7", "chain 2 and 6ff7")
        cmd.extract("U5_hBa_6ff7", "chain 5 and 6ff7")
        cmd.extract("U6_hBa_6ff7", "chain 6 and 6ff7")
        cmd.extract("Intron_hBa_6ff7", "chain Z and 6ff7")
        cmd.set_name("6ff7", "unknown_other_hBa_6ff7")
        cmd.group("hBa6ff7", "*_hBa_6ff7")
        cmd.do("order *, yes")
    if '5yzg' in name.lower():
        cmd.extract("CWC15_hC_5yzg", "chain P and 5yzg")
        cmd.extract("CWC2_hRBM22_hC_5yzg", "chain O and 5yzg")
        cmd.extract("CWC25_hC_5yzg", "chain X and 5yzg")
        cmd.extract("PRP16_hDHX38_hC_5yzg", "chain Z and 5yzg")
        cmd.extract("U2_hC_5yzg", "chain H and 5yzg")
        cmd.extract("U5_hC_5yzg", "chain B and 5yzg")
        cmd.extract("U6_hC_5yzg", "chain F and 5yzg")
        cmd.extract("Intron_hC_5yzg", "chain G and 5yzg")
        cmd.set_name("5yzg", "unknown_other_hC_5yzg")
        cmd.group("hC5yzg", "*_hC_5yzg")
        cmd.do("order *, yes")
    if '5xjc' in name.lower():
        cmd.extract("CWC15_hX_5xjc", "chain P and 5xjc")
        cmd.extract("CWC25_hX_5xjc", "chain X and 5xjc")
        cmd.extract("U2_hX_5xjc", "chain H and 5xjc")
        cmd.extract("U5_hX_5xjc", "chain B and 5xjc")
        cmd.extract("U6_hX_5xjc", "chain F and 5xjc")
        cmd.extract("Intron_hX_5xjc", "chain G and 5xjc")
        cmd.extract("PRKRIP1_hX_5xjc", "chain X and 5xjc")
        cmd.set_name("5xjc", "unknown_other_hX_5xjc")
        cmd.group("hX5xjc", "*_hX_5xjc")
        cmd.do("order *, yes")
    if '5mq0' in name.lower():
        cmd.extract("CWC15_yCs_5mq0", "chain P and 5mq0")
        cmd.extract("CWC2_hRBM22_yCs_5mq0", "chain M and 5mq0")
        cmd.extract("U2_yCs_5mq0", "chain 2 and 5mq0")
        cmd.extract("U5_yCs_5mq0", "chain 5 and 5mq0")
        cmd.extract("U6_yCs_5mq0", "chain 6 and 5mq0")
        cmd.extract("5EXON_yCs_5mq0", "chain E and 5mq0")
        cmd.extract("Intron_yCs_5mq0", "chain I and 5mq0")
        cmd.extract("exon-3_yCs_5mq0", "chain 3 and 5mq0")
        cmd.set_name("5mq0", "unknown_other_yCs_5mq0")
        cmd.group("yCs5mq0", "*_yCs_5mq0")
        cmd.do("order *, yes")
    if '5lj5' in name.lower():
        cmd.extract("PRP8_yC_5lj5", "chain A and 5lj5")
        cmd.extract("BRR2_yC_5lj5", "chain B and 5lj5")
        cmd.extract("BUD31_yC_5lj5", "chain L and 5lj5")
        cmd.extract("CEF1_yC_5lj5", "chain O and 5lj5")
        cmd.extract("CLF1_yC_5lj5", "chain S and 5lj5")
        cmd.extract("CWC15_yC_5lj5", "chain P and 5lj5")
        cmd.extract("CWC16/YJU2_yC_5lj5", "chain D and 5lj5")
        cmd.extract("CWC2_hRBM22_yC_5lj5", "chain M and 5lj5")
        cmd.extract("CWC21_yC_5lj5", "chain R and 5lj5")
        cmd.extract("CWC22_yC_5lj5", "chain H and 5lj5")
        cmd.extract("CWC25_yC_5lj5", "chain F and 5lj5")
        cmd.extract("ISY1_yC_5lj5", "chain G and 5lj5")
        cmd.extract("Msl1_yC_5lj5", "chain Y and 5lj5")
        cmd.extract("PRP45_yC_5lj5", "chain K and 5lj5")
        cmd.extract("PRP16_hDHX38_yC_5lj5", "chain Q and 5lj5")
        cmd.extract("PRP19_1_yC_5lj5", "chain t and 5lj5")
        cmd.extract("PRP19_2_yC_5lj5", "chain u and 5lj5")
        cmd.extract("PRP19_3_yC_5lj5", "chain v and 5lj5")
        cmd.extract("PRP19_4_yC_5lj5", "chain w and 5lj5")
        cmd.extract("PRP46_yC_5lj5", "chain J and 5lj5")
        cmd.extract("SLT11/ECM2_yC_5lj5", "chain N and 5lj5")
        cmd.extract("SNT309_yC_5lj5", "chain s and 5lj5")
        cmd.extract("SNU114_yC_5lj5", "chain C and 5lj5")
        cmd.extract("SYF1_yC_5lj5", "chain T and 5lj5")
        cmd.extract("U2_yC_5lj5", "chain Z and 5lj5")
        cmd.extract("U5_yC_5lj5", "chain U and 5lj5")
        cmd.extract("U6_yC_5lj5", "chain V and 5lj5")
        cmd.extract("5EXON_yC_5lj5", "chain E and 5lj5")
        cmd.extract("Intron_yC_5lj5", "chain I and 5lj5")
        cmd.extract("SMB1_1_yC_5lj5", "chain b and 5lj5")
        cmd.extract("SMB1_2_yC_5lj5", "chain k and 5lj5")
        cmd.extract("SME1_1_yC_5lj5", "chain e and 5lj5")
        cmd.extract("SME1_2_yC_5lj5", "chain p and 5lj5")
        cmd.extract("SMX3_1_yC_5lj5", "chain f and 5lj5")
        cmd.extract("SMX3_2_yC_5lj5", "chain q and 5lj5")
        cmd.extract("SMX2_1_yC_5lj5", "chain g and 5lj5")
        cmd.extract("SMX2_2_yC_5lj5", "chain r and 5lj5")
        cmd.extract("SMD3_1_yC_5lj5", "chain d and 5lj5")
        cmd.extract("SMD3_2_yC_5lj5", "chain n and 5lj5")
        cmd.extract("SMD1_1_yC_5lj5", "chain h and 5lj5")
        cmd.extract("SMD1_2_yC_5lj5", "chain l and 5lj5")
        cmd.extract("SMD2_1_yC_5lj5", "chain j and 5lj5")
        cmd.extract("SMD2_2_yC_5lj5", "chain m and 5lj5")
        cmd.extract("unassigned_yC_5lj5", "chain x and 5lj5")
        cmd.set_name("5lj5", "unknown_other_yC_5lj5")
        cmd.group("yC5lj5", "*_yC_5lj5")
        cmd.do("order *, yes")
    if '6g90' in name.lower():
        cmd.extract("LEA1_yPre_6g90", "chain W and 6g90")
        cmd.extract("Msl1_yPre_6g90", "chain Y and 6g90")
        cmd.extract("Ysf3_yPre_6g90", "chain Z and 6g90")
        cmd.extract("SMB1_1_yPre_6g90", "chain b and 6g90")
        cmd.extract("SMB1_2_yPre_6g90", "chain s and 6g90")
        cmd.extract("SME1_1_yPre_6g90", "chain e and 6g90")
        cmd.extract("SME1_2_yPre_6g90", "chain w and 6g90")
        cmd.extract("SMX3_1_yPre_6g90", "chain f and 6g90")
        cmd.extract("SMX3_2_yPre_6g90", "chain x and 6g90")
        cmd.extract("SMX2_1_yPre_6g90", "chain g and 6g90")
        cmd.extract("SMX2_2_yPre_6g90", "chain y and 6g90")
        cmd.extract("SMD3_1_yPre_6g90", "chain d and 6g90")
        cmd.extract("SMD3_2_yPre_6g90", "chain v and 6g90")
        cmd.extract("SMD1_1_yPre_6g90", "chain h and 6g90")
        cmd.extract("SMD1_2_yPre_6g90", "chain t and 6g90")
        cmd.extract("SMD2_1_yPre_6g90", "chain i and 6g90")
        cmd.extract("SMD2_2_yPre_6g90", "chain u and 6g90")
        cmd.extract("unassigned_yPre_6g90", "chain X and 6g90")
        cmd.extract("MUD1_yPre_6g90", "chain A and 6g90")
        cmd.extract("SNP1_yPre_6g90", "chain B and 6g90")
        cmd.extract("YHC1_yPre_6g90", "chain C and 6g90")
        cmd.extract("PRP39_yPre_6g90", "chain D and 6g90")
        cmd.extract("PRP42_yPre_6g90", "chain E and 6g90")
        cmd.extract("NAM8_yPre_6g90", "chain F and 6g90")
        cmd.extract("SNU56_yPre_6g90", "chain G and 6g90")
        cmd.extract("LUC7_yPre_6g90", "chain H and 6g90")
        cmd.extract("SNU71_yPre_6g90", "chain J and 6g90")
        cmd.extract("HSH155_yPre_6g90", "chain O and 6g90")
        cmd.extract("RSE1_yPre_6g90", "chain P and 6g90")
        cmd.extract("CUS1_yPre_6g90", "chain Q and 6g90")
        cmd.extract("HSH49_yPre_6g90", "chain R and 6g90")
        cmd.extract("RDS3_yPre_6g90", "chain S and 6g90")
        cmd.extract("PRP9_yPre_6g90", "chain T and 6g90")
        cmd.extract("PRP11_yPre_6g90", "chain U and 6g90")
        cmd.extract("PRP21_yPre_6g90", "chain V and 6g90")
        cmd.set_name("6g90", "unknown_other_yPre_6g90")
        cmd.group("yPre6g90", "*_yPre_6g90")
        cmd.do("order *, yes")
    if '6n7r' in name.lower():
        cmd.extract("Intron_yE_6n7r", "chain r and 6n7r")
        cmd.extract("SMB1_yE_6n7r", "chain K and 6n7r")
        cmd.extract("SME1_yE_6n7r", "chain O and 6n7r")
        cmd.extract("SMX3_yE_6n7r", "chain P and 6n7r")
        cmd.extract("SMX2_yE_6n7r", "chain Q and 6n7r")
        cmd.extract("SMD3_yE_6n7r", "chain N and 6n7r")
        cmd.extract("SMD1_yE_6n7r", "chain L and 6n7r")
        cmd.extract("SMD2_yE_6n7r", "chain M and 6n7r")
        cmd.extract("MUD1_yE_6n7r", "chain C and 6n7r")
        cmd.extract("SNP1_yE_6n7r", "chain A and 6n7r")
        cmd.extract("YHC1_yE_6n7r", "chain B and 6n7r")
        cmd.extract("PRP39_yE_6n7r", "chain E and 6n7r")
        cmd.extract("PRP42_yE_6n7r", "chain D and 6n7r")
        cmd.extract("NAM8_yE_6n7r", "chain F and 6n7r")
        cmd.extract("SNU56_yE_6n7r", "chain G and 6n7r")
        cmd.extract("LUC7_yE_6n7r", "chain I and 6n7r")
        cmd.extract("SNU71_yE_6n7r", "chain H and 6n7r")
        cmd.extract("U1_yE_6n7r", "chain R and 6n7r")
        cmd.set_name("6n7r", "unknown_other_yE_6n7r")
        cmd.group("yE6n7r", "*_yE_6n7r")
        cmd.do("order *, yes")
    if '6n7p' in name.lower():
        cmd.extract("Intron_yE_6n7p", "chain r and 6n7p")
        cmd.extract("SMB1_yE_6n7p", "chain K and 6n7p")
        cmd.extract("SME1_yE_6n7p", "chain O and 6n7p")
        cmd.extract("SMX3_yE_6n7p", "chain P and 6n7p")
        cmd.extract("SMX2_yE_6n7p", "chain Q and 6n7p")
        cmd.extract("SMD3_yE_6n7p", "chain N and 6n7p")
        cmd.extract("SMD1_yE_6n7p", "chain L and 6n7p")
        cmd.extract("SMD2_yE_6n7p", "chain M and 6n7p")
        cmd.extract("MUD1_yE_6n7p", "chain C and 6n7p")
        cmd.extract("SNP1_yE_6n7p", "chain A and 6n7p")
        cmd.extract("YHC1_yE_6n7p", "chain B and 6n7p")
        cmd.extract("PRP39_yE_6n7p", "chain E and 6n7p")
        cmd.extract("PRP42_yE_6n7p", "chain D and 6n7p")
        cmd.extract("NAM8_yE_6n7p", "chain F and 6n7p")
        cmd.extract("SNU56_yE_6n7p", "chain G and 6n7p")
        cmd.extract("LUC7_yE_6n7p", "chain I and 6n7p")
        cmd.extract("SNU71_yE_6n7p", "chain H and 6n7p")
        cmd.extract("U1_yE_6n7p", "chain R and 6n7p")
        cmd.extract("PRP40_yE_6n7p", "chain J and 6n7p")
        cmd.extract("STO1_yE_6n7p", "chain X and 6n7p")
        cmd.extract("CBC2_yE_6n7p", "chain Y and 6n7p")
        cmd.set_name("6n7p", "unknown_other_yE_6n7p")
        cmd.group("yE6n7p", "*_yE_6n7p")
        cmd.do("order *, yes")
