Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
63662ed
Enable subperiodic groups in Wyckoff
bfield1 Aug 11, 2023
a1f1700
Merge branch 'master' into subperiodic
bfield1 Aug 14, 2023
2a3d180
Catalogue of IT subperiodic groups
bfield1 Aug 15, 2023
2285d1d
Hotfixes in subgrp.gi
bfield1 Aug 15, 2023
1d73f40
Merge branch 'master' into subperiodic
bfield1 Oct 27, 2023
bee84b0
Update .gitignore
bfield1 Nov 20, 2023
7c29fbd
Merge branch 'master' into subperiodic
bfield1 Nov 20, 2023
47d25e3
Scrap cached Wyckoffs when conjugating subperiodic groups
bfield1 Nov 20, 2023
c307b2f
Remove extraneous warning and comments
bfield1 Nov 21, 2023
8e4e185
Tests for subperiodic groups
bfield1 Nov 21, 2023
fa8919f
Partial fix for subperiodic Wyckoff positions
bfield1 Jan 11, 2024
eb5b3d7
Partial fix: some cases with shifted origin work now
bfield1 Jan 17, 2024
353a150
Move IsTranslationInBasis out of local scope
bfield1 Jan 17, 2024
710fd7e
Solver for systems of linear Diophantine equations
bfield1 Jan 18, 2024
659f535
common.gi already had an integer equation solver
bfield1 Jan 18, 2024
d041fee
WIP New, advanced logic for IsTranslationInBasis
bfield1 Jan 19, 2024
d32a8c7
IsTranslationInBasis now properly finds some vectors
bfield1 Jan 19, 2024
2ac4f93
Fix duplicate Wyckoff positions
bfield1 Jan 19, 2024
ed30a07
Remove unnecessary new function IntSolutionsMat
bfield1 Jan 19, 2024
8a3f485
Merge gap-packages/cryst:master Release 4.1.27 to bfield1/cryst:maste…
bfield1 Jan 19, 2024
1366ee8
Merge branch 'master' into subperiodic
bfield1 Jan 19, 2024
dbb23ce
SymmetricInternalBasis now guarantees order
bfield1 Jan 25, 2024
b45b42a
Subperiodic Wyckoff test covers non-shifted-origin
bfield1 Jan 25, 2024
18d3230
Merge remote-tracking branch 'upstream/master'
bfield1 Apr 18, 2024
f981fbf
Include all the subperiodic group settings
bfield1 Apr 25, 2024
ec2ddc0
Precomputed translation basis in IT subperiodic groups
bfield1 Apr 25, 2024
0525b6f
Implement WyPosSGL and WyckoffPositionsByStabilizer for subperiodic g…
bfield1 Apr 26, 2024
3db6127
Update documentation in Wyckoffs
bfield1 Apr 26, 2024
5aafd89
Comments identifying obscure bug in Wyckoff
bfield1 Apr 26, 2024
25e61fe
Add documentation for SubPeriodic groups (International Tables)
bfield1 Apr 27, 2024
3c88824
Merge branch 'master' into subperiodic
bfield1 May 22, 2024
d4b0887
Test fix: inconsistent representation of trivial WyckoffStabilizer
bfield1 Jun 24, 2024
7a96666
Replace RankMatrix with RankMat for backwards compatibility with GAP …
bfield1 Jun 24, 2024
a9d40f8
Missing critical test-case: Wyckoff positions of Rod Groups.
bfield1 Aug 8, 2024
32cdc38
WIP rewrite of SymmetricInternalBasis
bfield1 Aug 9, 2024
34521c5
Fix bug in SymmetricInternalBasis
bfield1 Aug 12, 2024
3cd0fbe
Improve code coverage in grp/subgrp.gi
bfield1 Aug 12, 2024
7b6c019
L44 has only one setting, not two
bfield1 Oct 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
/doc/manual.ps
/doc/manual.toc
/htm/
**/*.swp
**/.DS_Store
93 changes: 83 additions & 10 deletions doc/cryst.tex
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Wyckoff positions}

A Wyckoff position of a space group <S> is an equivalence class of
A Wyckoff position of a crystallographic group <S> is an equivalence class of
points in Euclidean space, having stabilizers which are conjugate
subgroups of <S>. Apart from a subset of lower dimension, which
contains points with even bigger stabilizers, a Wyckoff position
Expand All @@ -480,7 +480,7 @@

\>WyckoffPositions( <S> ) A

returns the list of Wyckoff positions of the space group <S>.
returns the list of Wyckoff positions of the group <S>.

\beginexample
gap> S := SpaceGroupIT(2,14);
Expand All @@ -501,12 +501,12 @@

In the previous example, <S> has three kinds of special points
(the basis is empty), whose representatives all have a stabilizer
with the same point group (with label 1), one kind of special line
with the same point group (with label 3), one kind of special line
(the basis has length 1), and the general position.

\>WyckoffPositionsByStabilizer( <S>, <sub> ) O

where <S> is a space group and <sub> a subgroup of the point group or
where <S> is a group and <sub> a subgroup of the point group or
a list of such subgroups, determines only the Wyckoff positions whose
representatives have a stabilizer with a point group equal to the
subgroup <sub> or contained in the list <sub>, respectively.
Expand Down Expand Up @@ -553,7 +553,7 @@

\>WyckoffSpaceGroup( <W> ) O

returns the space group of which <W> is a Wyckoff position.
returns the crystallographic group of which <W> is a Wyckoff position.

\beginexample
gap> WyckoffSpaceGroup( W[1] );
Expand All @@ -564,7 +564,7 @@

returns the stabilizer of the (generic) points in the representative
affine subspace of the Wyckoff position <W>. This stabilizer is a
subgroup of the space group of <W>, and thus an `AffineCrystGroup'.
subgroup of the crystallographic group of <W>, and thus an `AffineCrystGroup'.

\beginexample
gap> stab := WyckoffStabilizer( W[4] );
Expand All @@ -576,13 +576,13 @@
\>WyckoffOrbit( <W> ) O

determines the orbit of the representative affine subspace <A> of the
Wyckoff position <W> under the space group <S> of <W> (modulo lattice
Wyckoff position <W> under the crystallographic group <S> of <W> (modulo lattice
translations). The affine subspaces in this orbit are then converted
into a list of Wyckoff positions, which is returned. The Wyckoff
positions in this list are just different representations of <W>.
Their `WyckoffBasis' and `WyckoffTranslation' are chosen such that
the induced parametrizations of their representative subspaces are
mapped onto each other under the space group operation.
mapped onto each other under the crystallographic group operation.

\beginexample
gap> orb := WyckoffOrbit( W[4] );
Expand Down Expand Up @@ -881,8 +881,9 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{International Tables}

For the user's convenience, a table with the 17 plane groups and the
230 space groups is included in {\Cryst}. These groups are given in
For the user's convenience, tables with the 17 plane groups, 230
space groups, 7 frieze groups, 75 rod groups, and 80 layer groups
are included in {\Cryst}. These groups are given in
exactly the same settings (i.e., choices of basis and origin) as in
the International Tables. Space groups with a centered lattice are
therefore given in the non-primitive basis crystallographers are
Expand All @@ -904,6 +905,34 @@
in a rhombohedral basis (setting `\pif{r}\pif'). `\pif{h}\pif' is the
default setting.

For the frieze groups, two different settings are available.
The possible settings are labelled with the characters `\pif{a}\pif'
and `\pif{b}\pif'. `\pif{a}\pif' is the default setting.

For the orthorhombic rod groups, six settings are available.
These are labelled with the string `\pif\pif{abc}\pif\pif' or permutations
of its characters. These correspond to permutations of the <a>,
<b>, and <c> directions. `\pif\pif{abc}\pif\pif' is the default setting.

For some of the tetragonal, trigonal, and hexagonal rod groups,
two basis choices exist: `\pif{1}\pif' and `\pif{2}\pif'. `\pif{1}\pif'
is the default setting.

For layer groups 5 and 7, three cell choices exist, which differ
by whether the glide vector is along the <a> direction (setting
`\pif{1}\pif'), the <a+b> direction (setting `\pif{2}\pif'), or the
<b> direction (setting `\pif{3}\pif'). `\pif{1}\pif' is the default
setting.

For some orthorhombic layer groups, they have two settings,
`\pif{a}\pif' for the abc setting, and `\pif{b}\pif' for the bac setting.
`\pif{a}\pif' is the default setting.

For some layer groups (52, 62, and 64), there exists a point of higher
symmetry than the origin of the `\pif{1}\pif' setting. In such cases,
a second setting `\pif{2}\pif' which has this higher symmetry point as
the origin is available and is the default setting.

\>SpaceGroupSettingsIT( <dim>, <nr> ) F

returns a string, whose characters label the available settings of
Expand Down Expand Up @@ -940,5 +969,49 @@
SpaceGroupOnRightIT(3,146,'r')
\endexample

The subperiodic group functions accept an argument <type>, which is
a string which is either `\pif\pif{Frieze}\pif\pif', `\pif\pif{Rod}\pif\pif', or
`\pif\pif{Layer}\pif\pif'. This specifies the type of subperiodic group.

\>SubPeriodicGroupSettingsIT( <type>, <nr> ) F

returns a string (or list), whose characters (or strings, for
multi-character settings) label the available settings of
the subperiodic group with number <nr> and type <type>.

\> SubPeriodicGroupOnRightIT( <type>, <nr> ) F
\> SubPeriodicGroupOnRightIT( <type>, <nr>, <setting> ) F

returns subperiodic group number <nr> with type <type> in the
representation acting on the right. In the third argument,
the desired setting can be specified. Otherwise, the
group is returned in the default setting for that group.

\> SubPeriodicGroupOnLeftIT( <type>, <nr> ) F
\> SubPeriodicGroupOnLeftIT( <type>, <nr>, <setting> ) F

returns subperiodic group number <nr> with type <type> in the
representation acting on the left. In the third argument,
the desired setting can be specified. Otherwise, the
group is returned in the default setting for that group.

\> SubPeriodicGroupIT( <type>, <nr> ) F
\> SubPeriodicGroupIT( <type>, <nr>, <setting> ) F

returns either `SubPeriodicGroupOnRightIT' or `SubPeriodicGroupOnLeftIT' with
the same arguments, depending on the value of `CrystGroupDefaultAction'.

\> FriezeGroupIT( <nr> ) F
\> FriezeGroupIT( <nr>, <setting> ) F

returns `SubPeriodicGroupIT(\pif\pif{Frieze}\pif\pif, <nr>, <setting>)'.

\> RodGroupIT( <nr> ) F
\> RodGroupIT( <nr>, <setting> ) F

returns `SubPeriodicGroupIT(\pif\pif{Rod}\pif\pif, <nr>, <setting>)'.

\> LayerGroupIT( <nr> ) F
\> LayerGroupIT( <nr>, <setting> ) F

returns `SubPeriodicGroupIT(\pif\pif{Layer}\pif\pif, <nr>, <setting>)'.
13 changes: 13 additions & 0 deletions doc/manual.six
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,16 @@ F 2.11. SpaceGroupOnLeftIT
F 2.11. SpaceGroupOnLeftIT
F 2.11. SpaceGroupIT
F 2.11. SpaceGroupIT
F 2.11. SubPeriodicGroupSettingsIT
F 2.11. SubPeriodicGroupOnRightIT
F 2.11. SubPeriodicGroupOnRightIT
F 2.11. SubPeriodicGroupOnLeftIT
F 2.11. SubPeriodicGroupOnLeftIT
F 2.11. SubPeriodicGroupIT
F 2.11. SubPeriodicGroupIT
F 2.11. FriezeGroupIT
F 2.11. FriezeGroupIT
F 2.11. RodGroupIT
F 2.11. RodGroupIT
F 2.11. LayerGroupIT
F 2.11. LayerGroupIT
13 changes: 13 additions & 0 deletions gap/cryst.gi
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,12 @@ function ( S, conj )

# add Wyckoff positions if known
if HasWyckoffPositions( S ) then
# If we have a sub-periodic group and C includes out-of-basis
# components, then we must scrap the cached Wyckoffs.
# Just to be safe, we'll scrap it without checking C, as there are
# too many edge cases.
# Scrapping Wyckoffs just means we don't call SetWyckoffPositions
if IsSpaceGroup(S) then
W := [];
for w in WyckoffPositions( S ) do
r := rec( basis := w!.basis,
Expand All @@ -294,6 +300,7 @@ function ( S, conj )
Add( W, WyckoffPositionObject( r ) );
od;
SetWyckoffPositions( R, W );
fi;
fi;

return R;
Expand Down Expand Up @@ -331,6 +338,11 @@ function ( S, conj )

# add Wyckoff positions if known
if HasWyckoffPositions( S ) then
# Transformations are only unique for space groups.
# Sub-periodic groups can lose information if there are out-of-plane
# components, which can make the Wyckoff positions inconsistent.
# So we'll only keep the cached Wyckoffs if it is a space group.
if IsSpaceGroup(S) then
W := [];
for w in WyckoffPositions( S ) do
r := rec( basis := w!.basis,
Expand All @@ -342,6 +354,7 @@ function ( S, conj )
Add( W, WyckoffPositionObject( r ) );
od;
SetWyckoffPositions( R, W );
fi;
fi;

return R;
Expand Down
6 changes: 6 additions & 0 deletions gap/hom.gd
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ DeclareAttribute( "NiceToCryst", IsPointGroup );
##
DeclareGlobalFunction( "NiceToCrystStdRep" );

#############################################################################
##
#F NiceToCrystStdRepSymmetric( P, perm )
##
DeclareGlobalFunction( "NiceToCrystStdRepSymmetric" );

#############################################################################
##
#P IsFromAffineCrystGroupToFpGroup
Expand Down
25 changes: 24 additions & 1 deletion gap/hom.gi
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ end );
#F NiceToCrystStdRep( P, perm )
##
InstallGlobalFunction( NiceToCrystStdRep, function( P, perm )
local S, m, d, c;
local S, m;
S := AffineCrystGroupOfPointGroup( P );
m := ImagesRepresentative( NiceToCryst( P ), perm );
if IsStandardAffineCrystGroup( S ) then
Expand All @@ -83,6 +83,29 @@ InstallGlobalFunction( NiceToCrystStdRep, function( P, perm )
fi;
end );

#############################################################################
##
#F NiceToCrystStdRepSymmetric( P, perm )
##
InstallGlobalFunction( NiceToCrystStdRepSymmetric, function( P, perm )
local S, m, d, mat, lconj, rconj;
# Uses SymmetricInternalBasis rather than InternalBasis
S := AffineCrystGroupOfPointGroup( P );
m := ImagesRepresentative( NiceToCryst( P ), perm );
d := DimensionOfMatrixGroup( S ) - 1;
# Get transformation into standard basis
mat := AugmentedMatrix(SymmetricInternalBasis(S), ListWithIdenticalEntries(d, 0));
if IsAffineCrystGroupOnRight( S ) then
lconj := mat;
rconj := mat^-1;
else
mat := TransposedMat(mat);
lconj := mat^-1;
rconj := mat;
fi;
return lconj * m * rconj;
end );

#############################################################################
##
#M NaturalHomomorphismByNormalSubgroup( <G>, <N> ) . . for AffineCrystGroup
Expand Down
6 changes: 6 additions & 0 deletions gap/wyckoff.gd
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ DeclareGlobalFunction( "ImageAffineSubspaceLattice" );
##
DeclareGlobalFunction( "ImageAffineSubspaceLatticePointwise" );

#############################################################################
##
#A SymmetricInternalBasis . .internal basis that respects lattice symmetries
##
DeclareAttribute( "SymmetricInternalBasis", IsAffineCrystGroupOnLeftOrRight );

#############################################################################
##
#A WyckoffStabilizer . . . . . . . . . stabilizer of representative subspace
Expand Down
Loading