Skip to content
Snippets Groups Projects
Commit c9423b1f authored by Laura Nervo's avatar Laura Nervo Committed by Nicola Vigano
Browse files

gtCrystCalculateSymmetryOperators : changed output format for this function


Signed-off-by: default avatarLaura Nervo <laura.nervo@esrf.fr>

git-svn-id: https://svn.code.sf.net/p/dct/code/trunk@956 4c865b51-4357-4376-afb4-474e03ccb993
parent 3c268494
No related branches found
No related tags found
No related merge requests found
function [perm, rot, sg_rot, sg_trans] = gtCrystCalculateSymmetryOperators(sg, crystal_system)
function [symm, opsym] = gtCrystCalculateSymmetryOperators(sg, crystal_system)
% GTCRYSTCALCULATEREFLECTIONS Calculate the symmetry operators list using python
% from xfab library in fable (sg.py)
% [perm, rot, sg_rot, sg_trans] = gtCrystCalculateSymmetryOperators(sg, crystal_system)
% -------------------------------------------------------------------------------------
% [symm, opsym] = gtCrystCalculateSymmetryOperators(sg, crystal_system)
% ---------------------------------------------------------------------
%
% INPUT:
% sg = spacegroup number <int>
% crystal_system = crystal system <string>
%
% OUTPUT:
% perm = set of indistinguishable lattice permutations
% rot = set of unitary rotation matrices corresponding to the indistinguishable lattice permutations
% sg_rot = rotations (complete list using symmetry operators)
% sg_trans = transition values from symmetry operators
% symm = <struct 1xN> contains :
% .perm = set of indistinguishable lattice permutations <double 3x3>
% .rot = set of unitary rotation matrices corresponding to the
% indistinguishable lattice permutations <double 3x3>
% opsym = <struct 1xM> contains :
% .sg_rot = rotations (complete list using symmetry operators) <double 3x3>
% .sg_trans = transition values from symmetry operators <double 1x3>
%
%
% Version 001 10-12-2012 by LNervo
......@@ -33,19 +36,14 @@ cmd = sprintf('python26 %s %d',script_file,sg);
disp(msg)
% read produced files
perm = gtReadTextFile(['perm_' crystal_system '.txt'],'%f %f %f',' ','#',[3 3]);
perm = gtReadTextFile(['perm_' crystal_system '.txt'],'%f %f %f',' ','#',[3 3]);
rotN = gtReadTextFile(['rot_' crystal_system '.txt'],'%f %f %f',' ','#',[3 3]);
sg_rotN = gtReadTextFile(['sg_rot_' crystal_system '.txt'],'%f %f %f',' ','#',[3 3]);
sg_transN = gtReadTextFile(['sg_trans_' crystal_system '.txt'],'%f %f %f',' ','#',[1 3]);
if nargout > 1
rot = rotN;
if nargout > 2
sg_rot = sg_rotN;
if nargout > 3
sg_trans = sg_transN;
end
end
symm = struct('g3', rotN, 'g', [], 'perm', perm);
if nargout == 2
opsym = struct('sg_rot', sg_rotN, 'sg_trans', sg_transN);
end
end % end of function
......@@ -23,8 +23,7 @@ _sgno = int(sys.argv[1])
print("")
print(" *** Input data ***")
print(" spacegroup: %s" % _sgno)
print("")
print(" spacegroup: %s" % _sgno)
if _sgno != None:
spg = sg.sg(sgno=_sgno)
......@@ -34,6 +33,8 @@ if _sgno != None:
# crystal system
crystal_system = spg.crystal_system
print(" crystal system: %s" % crystal_system)
print("")
print("Found %d symmetry operators for crystal system %s\n" % (nsymop, crystal_system))
# rotations list
......
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