(Subscript[D, 4]) molecular orbitals

Set 1

D4=<|
"Irreps"->{"(Subscript[A, 1])","(Subscript[A, 2])","(Subscript[B, 1])","(Subscript[B, 2])","E"},
"CharacterTable"->
{
{1,1,1,1,1},
{1,1,1,-1,-1},
{1,-1,1,1,-1},
{1,-1,1,-1,1},
{2,0,-2,0,0}
},
"ConjugacyClasses"->{"E","(Subscript[C, 4])","(Subscript[C, 2]^z)","(Subscript[C, 2]^('))","(Subscript[C, 2]^(''))"},
"ConjugacyClassSizes"->{1,2,1,2,2}
|>;

OrbBasis={p1,p2,p3,p4};
D4gens={
(*(SuperPlus[(Subscript[C, 4])])*)(({{0, 0, 0, 1}, {1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}})),
(*(Subscript[C, 2]^('))(x)*)(({{1, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}, {0, 1, 0, 0}}))
};
MatrixForm/@(D4mats=Flatten[Table[MatrixPower[D4gens[[1]],i].MatrixPower[D4gens[[2]],j],{i,0,3},{j,0,1}],1])

D4matClasses={"E","(Subscript[C, 2]^('))","(Subscript[C, 4])","(Subscript[C, 2]^(''))","(Subscript[C, 2]^z)","(Subscript[C, 2]^('))","(Subscript[C, 4])","(Subscript[C, 2]^(''))"};

projectorD4[irrep_]:=Module[{repind},
repind=Position[D4["Irreps"],irrep][[1,1]];
((D4["CharacterTable"][[repind,1]])/8)(∑_(i=1)^8)D4["CharacterTable"][[repind,Position[D4["ConjugacyClasses"],D4matClasses[[i]]][[1,1]]]]D4mats[[i]]
]

projectors={PA1,PA2,PB1,PB2,PE}=projectorD4/@D4["Irreps"];

TableForm[{MatrixForm/@projectors},TableHeadings->{None,D4["Irreps"]}]

#.#==#&/@projectors

PA1.OrbBasis

(*Or ψ'=Pψ, then Pψ'=ψ', ψ' is an eigen vector of P.*)

Eigensystem[PA1]

Normalize[{1,1,1,1}].OrbBasis

Eigensystem[PB1]

Normalize[-{-1,1,-1,1}].OrbBasis

Eigensystem[PE]

Normalize[{0,-1,0,1}].OrbBasis
Normalize[{-1,0,1,0}].OrbBasis

Set 2

D4=<|
"Irreps"->{"(Subscript[A, 1])","(Subscript[A, 2])","(Subscript[B, 1])","(Subscript[B, 2])","E"},
"CharacterTable"->
{
{1,1,1,1,1},
{1,1,1,-1,-1},
{1,-1,1,1,-1},
{1,-1,1,-1,1},
{2,0,-2,0,0}
},
"ConjugacyClasses"->{"E","(Subscript[C, 4])","(Subscript[C, 2]^z)","(Subscript[C, 2]^('))","(Subscript[C, 2]^(''))"},
"ConjugacyClassSizes"->{1,2,1,2,2}
|>;

OrbBasis={p1,p2,p3,p4};
D4gens={
(*(SuperPlus[(Subscript[C, 4])])*)(({{0, 0, 0, 1}, {1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}})),
(*(Subscript[C, 2]^('))(x)*)(({{-1, 0, 0, 0}, {0, 0, 0, -1}, {0, 0, -1, 0}, {0, -1, 0, 0}}))
};
MatrixForm/@(D4mats=Flatten[Table[MatrixPower[D4gens[[1]],i].MatrixPower[D4gens[[2]],j],{i,0,3},{j,0,1}],1])

D4matClasses={"E","(Subscript[C, 2]^('))","(Subscript[C, 4])","(Subscript[C, 2]^(''))","(Subscript[C, 2]^z)","(Subscript[C, 2]^('))","(Subscript[C, 4])","(Subscript[C, 2]^(''))"};

projectorD4[irrep_]:=Module[{repind},
repind=Position[D4["Irreps"],irrep][[1,1]];
((D4["CharacterTable"][[repind,1]])/8)(∑_(i=1)^8)D4["CharacterTable"][[repind,Position[D4["ConjugacyClasses"],D4matClasses[[i]]][[1,1]]]]D4mats[[i]]
]

projectors={PA1,PA2,PB1,PB2,PE}=projectorD4/@D4["Irreps"];

TableForm[{MatrixForm/@projectors},TableHeadings->{None,D4["Irreps"]}]

#.#==#&/@projectors

(*Or ψ'=Pψ, then Pψ'=ψ', ψ' is an eigen vector of P.*)

Eigensystem[PA2]

Normalize[{1,1,1,1}].OrbBasis

Eigensystem[PB2]

Normalize[-{-1,1,-1,1}].OrbBasis

Eigensystem[PE]

Normalize[{0,-1,0,1}].OrbBasis
Normalize[{-1,0,1,0}].OrbBasis

Set 3

Set 3 identical to set 2 in terms of representation matrices, where the basis set consists of pz orbitals pointing up.