Skip to content
Snippets Groups Projects
Commit 077d3733 authored by Wolfgang Ludwig's avatar Wolfgang Ludwig
Browse files

Enable support for Tetragonal {e.g. 123} spacegroups

parent 0b1f1e7c
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,8 @@ if (~exist('crystal_system', 'var') || isempty(crystal_system))
crystal_system = 'hexagonal';
elseif between(spacegroup, 143, 167)
crystal_system = 'trigonal';
elseif between(spacegroup, 75, 142)
crystal_system = 'tetragonal';
else
gtError('gtCrystGetSymmetryOperators:wrong_input', [ ...
'Unimplemented spacegroup (' num2str(spacegroup) ')!']);
......@@ -164,6 +166,48 @@ switch (crystal_system)
0 0 -1 ;...
0 -1 0 ];
case 'tetragonal'
if exist('spacegroup', 'var') && ~isempty(spacegroup)
if ~between(spacegroup, 75, 142)
gtError('gtCrystGetSymmetryOperators:wrong_input', [ ...
'spacegroup (' num2str(spacegroup) ') does not ' ...
'match with the crystal system (' crystal_system ')!']);
end
end
% Diamond software
symm(1).g3 = [ 1 0 0 ;...
0 1 0 ;...
0 0 1 ];
symm(2).g3 = [ 0 -1 0 ;...
1 0 0 ;...
0 0 1 ];
symm(3).g3 = [-1 0 0 ;...
0 -1 0 ;...
0 0 1 ];
symm(4).g3 = [ 0 1 0 ;...
-1 0 0 ;...
0 0 1 ];
symm(5).g3 = [ 1 0 0 ;...
0 -1 0 ;...
0 0 -1 ];
symm(6).g3 = [-1 0 0 ;...
0 1 0 ;...
0 0 -1 ];
symm(7).g3 = [ 0 1 0 ;...
1 0 0 ;...
0 0 -1 ];
symm(8).g3 = [ 0 -1 0 ;...
-1 0 0 ;...
0 0 -1 ];
case 'hexagonal'
if exist('spacegroup', 'var') && ~isempty(spacegroup)
if ~between(spacegroup, 168, 194) && spacegroup ~= 663
......
......@@ -75,7 +75,24 @@ switch spacegroup
% All faces
faces = [basal; facets];
% Tetragonal
case {123}
% Bottom and top of the polyhedron (basal planes):
limbase = sqrt(2)-1; % half thickness along basal plane
basal = [ 0 0 1 0 0 1;
0 0 -1 0 0 -1]*(limbase+sm);
% Facets on the side:
limfacet = 1; % extension laterally
t = (0:(pi/4):2*pi)';
t = t(1:end-1);
facets = [cos(t) sin(t) zeros(8,1)]*(limfacet+sm);
facets = [facets, facets];
% All faces
faces = [basal; facets];
% Orthorhombic and unknown (limit to 90deg rotations in all direction)
case {0, 62}
......
......@@ -31,6 +31,9 @@ if any(strcmp(parameters.cryst(phaseID).crystal_system, {'hexagonal', 'trigonal'
elseif strcmp(parameters.cryst(phaseID).crystal_system, 'cubic')
% sort hkl - h,k,l all equivilent
test=sort(hkl,2);
elseif strcmp(parameters.cryst(phaseID).crystal_system, 'tetragonal')
% so far only tested for the output delivered from diamond software (already sorted...)
test = hkl;
else
error('Need to add crystal system "%s" to gtFindFamiles.m ... quitting', parameters.cryst(phaseID).crystal_system)
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment