Based on the suggested method here, I try to clear all variables defined in a given cell as follows:
In[281]:= SelectionMove[EvaluationNotebook[],All,EvaluationCell];Options[NotebookSelection[EvaluationNotebook[]],CellLabel]
{cell} = Cells@@%
ClearAll[#] & /@
Cases[NotebookRead[cell], HoldPattern[RowBox[{sym_, "=", _}]] :> sym,
Infinity];
gen2=SGGenSet229me[[2,1;;3,1;;3]];
ubasSG229me//FactorMatrix//Last//Inverse//HermiteDecomposition//Last
(*
tmInv is one of the bases of SG229me
*)
tmInv=TMSG229meToITA[[1;;3,1;;3]]//Inverse;
%//HermiteDecomposition//Last
G=Transpose[tmInv] . tmInv
%==Transpose[gen2] . G . gen2
(*
tm is the transformation matrix which convert the representation of this group to an orthogonal basis
*)
tm=tmInv//Inverse
conjgen2=noTranSGGenSet229meToITA[[2,1;;3,1;;3]]
Inverse[tm] . gen2 . tm==conjgen2
conj//OrthogonalMatrixQ
(*
The metric change under change-of-basis
*)
Transpose[tm] . G . tm == IdentityMatrix[3]
{valgen2,vecgen2}=Eigensystem[gen2]
{valconjgen2,vecconjgen2}=Eigensystem[conjgen2]
Out[281]= {CellLabel -> "In[281]:="}
Out[282]= {
CellObject[
"09eef945-c108-482c-a081-f7198678f646",
"7e18a8bb-14fb-460e-8275-756c0388fd0c"]}
During evaluation of In[281]:= ClearAll::ssym: RowBox[{{,RowBox[{valgen2,,,vecgen2}],}}] is not a symbol or a string.
During evaluation of In[281]:= ClearAll::ssym: RowBox[{{,RowBox[{valconjgen2,,,vecconjgen2}],}}] is not a symbol or a string.
Out[285]= {{1/2, 1/2, 1/2}, {0, 2, 0}, {0, 0, 2}}
Out[287]= {{1/2, 1/2, 1/2}, {0, 2, 0}, {0, 0, 2}}
Out[288]= {{11/4, -(5/4), -(5/4)}, {-(5/4), 11/
4, -(5/4)}, {-(5/4), -(5/4), 11/4}}
Out[289]= True
Out[290]= {{1, 1/2, 1/2}, {1/2, 1, 1/2}, {1/2, 1/2, 1}}
Out[291]= {{0, 1, 0}, {-1, 0, 0}, {0, 0, -1}}
Out[292]= True
Out[293]= True
Out[294]= True
Out[295]= {{-1,
I, -I}, {{1/2, 1/2, 1}, {3/2 - I/2, 3/2 + I/2, 1}, {3/2 + I/2,
3/2 - I/2, 1}}}
Out[296]= {{-1, I, -I}, {{0, 0, 1}, {-I, 1, 0}, {I, 1, 0}}}
As you can see, this method will trigger the following warning messages:
During evaluation of In[281]:= ClearAll::ssym: RowBox[{{,RowBox[{valgen2,,,vecgen2}],}}] is not a symbol or a string.
During evaluation of In[281]:= ClearAll::ssym: RowBox[{{,RowBox[{valconjgen2,,,vecconjgen2}],}}] is not a symbol or a string.
Any tips for fixing this problem?
Regards,
Zhao