printLatticeSummary

PURPOSE ^

print lattice data

SYNOPSIS ^

function varargout = printLatticeSummary(cdef)

DESCRIPTION ^

 print lattice data

 THIS IS NO USER FUNCTION

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function varargout = printLatticeSummary(cdef)
0002 % print lattice data
0003 %
0004 % THIS IS NO USER FUNCTION
0005 
0006 % The elk-library: convex geometry applied to crystallization modeling.
0007 %   Copyright (C) 2013 Alexander Reinhold
0008 %
0009 % This program is free software: you can redistribute it and/or modify it
0010 %   under the terms of the GNU General Public License as published by the
0011 %   Free Software Foundation, either version 3 of the License, or (at your
0012 %   option) any later version.
0013 %
0014 % This program is distributed in the hope that it will be useful, but
0015 %   WITHOUT ANY WARRANTY; without even the implied warranty of
0016 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0017 %   General Public License for more details.
0018 %
0019 % You should have received a copy of the GNU General Public License along
0020 %   with this program.  If not, see <http://www.gnu.org/licenses/>.
0021 
0022 disp(' ');
0023 
0024 if ~isfield(cdef, 'lat')
0025     disp('Lattice parameters not yet defined.');
0026     disp(' ');
0027 end
0028 
0029 outline = ['With lattice type ''' cdef.sym.system ''', the following is given:'];
0030 if isfield(cdef, 'lat')
0031     outline = [outline ' (a,b,c in Aengstroem)'];
0032 end
0033 disp(outline);
0034 latspec = obtainLatticeSpecFromCrystalFamily(abbreviateCrystalSystem(...
0035     cdef.sym.system));
0036 
0037 outline = '';
0038 switch [latspec{1} latspec{2} latspec{3}]
0039     case 'aaa'
0040         outline = [outline 'a = b = c'];
0041         if isfield(cdef, 'lat')
0042             outline = [outline ' = ' num2str(cdef.lat.a)];
0043         end
0044     case 'aac'
0045         outline = [outline 'a = b'];
0046         if isfield(cdef, 'lat')
0047             outline = [outline ' = ' num2str(cdef.lat.a) ', '...
0048                 'c = ' num2str(cdef.lat.c)];
0049         end
0050         
0051     otherwise
0052         if isfield(cdef, 'lat')
0053             outline = [outline 'a = ' num2str(cdef.lat.a) ', '...
0054                 'b = ' num2str(cdef.lat.b) ', '...
0055                 'c = ' num2str(cdef.lat.c)];
0056         end
0057 end
0058 if isnumeric(latspec{4})
0059     if ~isempty(outline), outline = [outline ', '];end
0060     outline = [outline 'alpha = ' num2str(latspec{4}) '°'];
0061     lat.alpha = latspec{4};
0062 elseif isfield(cdef, 'lat')
0063     outline = [outline ', alpha = ' num2str(cdef.lat.alpha) '°'];
0064 end
0065 if isnumeric(latspec{5})
0066     if ~isempty(outline), outline = [outline ', '];end
0067     outline = [outline 'beta = ' num2str(latspec{5}) '°'];
0068     lat.beta = latspec{5};
0069 elseif isfield(cdef, 'lat')
0070     outline = [outline ', beta = ' num2str(cdef.lat.beta) '°'];
0071 end
0072 if isnumeric(latspec{6})
0073     if ~isempty(outline), outline = [outline ', '];end
0074     outline = [outline 'gamma = ' num2str(latspec{6}) '°'];
0075     lat.gamma = latspec{6};
0076 elseif isfield(cdef, 'lat')
0077     outline = [outline ', gamma = ' num2str(cdef.lat.gamma) '°'];
0078 end
0079 disp(['  ' outline]);
0080 
0081 if exist('lat', 'var')
0082     cdef.lat = lat;
0083 end
0084 
0085 if nargout == 2
0086     varargout{1} = latspec;
0087     varargout{2} = cdef;
0088 end

Generated on Sat 18-Jul-2015 16:45:31 by m2html © 2005