Skip to content

Commit

Permalink
Fix a bug in identifyBCHSKptBySG for the critical case of u==umax with
Browse files Browse the repository at this point in the history
"allowtwok"->True and given numerical basic vectors.
  • Loading branch information
goodluck1982 committed Aug 31, 2022
1 parent 4f605e0 commit 7173d85
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 6 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
026. 2022-08-31 14:45:20 v1.2.3

Fix a bug in identifyBCHSKptBySG for the critical case of u==umax with
"allowtwok"->True and given numerical basic vectors.


025. 2022-08-30 21:19:46

Add SpaceGroupIrep`Private`Version to store version.
Expand Down
10 changes: 7 additions & 3 deletions SpaceGroupIrep.wl
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@
(* Mathematica version: >=11.2 *)
(* License: GPLv3 http://www.gnu.org/licenses/gpl-3.0.txt *)

SpaceGroupIrep`Private`Version={1,2,2};
SpaceGroupIrep`Private`Version={1,2,3}; (*Specify version here.*)

With[{p=DirectoryName[$InputFileName]}, If[!MemberQ[$Path,p],AppendTo[$Path, p]]];

BeginPackage["SpaceGroupIrep`", {"AbstractGroupData`", "LittleGroupIrepData`"}]

Unprotect@@Names["SpaceGroupIrep`*"];
ClearAll@@Names["SpaceGroupIrep`*"];

Protect[u,v,w,a,b,c,\[Alpha],\[Beta],\[Gamma],t\:2081,t\:2082,t\:2083];


Expand Down Expand Up @@ -2048,8 +2051,9 @@ identifyBCHSKptBySG[sgno_, BZtypeOrBasVec_, klist_, OptionsPattern[]]/;
tmp=outklist[[i,tmp]];
If[(!OptionValue["allowtwok"])||MatrixQ[BZtypeOrBasVec],
(*If "allowtwok"\[Rule]Flase, tmp has two entries only when u\[Equal]umax, i.e. the critical case,
otherwise only one entry of kinfo is selected from tmp*)
tmp=With[{s=Select[tmp,#[[-2]]=={0,0,0}&]}, If[s!={},First[s],First[tmp]]];
otherwise only one entry of kinfo is selected from tmp. For the critical case, here we choose one k to output.*)
(*To keep the similar behavior with identifyBCHSKpt, change "select no translation" to "select no rotation"*)
tmp=With[{s=Select[tmp,#[[6]]=="E"&]}, If[s!={},First[s],First[tmp]]];
];
If[Length[Dimensions[tmp]]==1,
outklist[[i]]=Append[tmp,uRange[tmp[[2]]]],
Expand Down

0 comments on commit 7173d85

Please sign in to comment.