


abbreviate name of crystal system (or write out abbreviation)
Syntax: crystalSystem = abbreviateCrystalSystem(crystalSystem)
This function takes an abbreviation (or full name) of a crystal system
and converts this into the full name (or abbreviation). The conversions
are: a - triclinic (anorthic)
m - monoclinic
o - orthorhombic
t - tetragonal
h - hexagonal/trigonal
r - rhombohedral (not used, is an alternative to trigonal)
c - cubic
See also: obtainCrystal, viewCrystal, extendCdef

0001 function crystalSystem = abbreviateCrystalSystem(crystalSystem) 0002 % abbreviate name of crystal system (or write out abbreviation) 0003 % 0004 % Syntax: crystalSystem = abbreviateCrystalSystem(crystalSystem) 0005 % 0006 % This function takes an abbreviation (or full name) of a crystal system 0007 % and converts this into the full name (or abbreviation). The conversions 0008 % are: a - triclinic (anorthic) 0009 % m - monoclinic 0010 % o - orthorhombic 0011 % t - tetragonal 0012 % h - hexagonal/trigonal 0013 % r - rhombohedral (not used, is an alternative to trigonal) 0014 % c - cubic 0015 % 0016 % See also: obtainCrystal, viewCrystal, extendCdef 0017 0018 % The elk-library: convex geometry applied to crystallization modeling. 0019 % Copyright (C) 2012 Alexander Reinhold 0020 % 0021 % This program is free software: you can redistribute it and/or modify it 0022 % under the terms of the GNU General Public License as published by the 0023 % Free Software Foundation, either version 3 of the License, or (at your 0024 % option) any later version. 0025 % 0026 % This program is distributed in the hope that it will be useful, but 0027 % WITHOUT ANY WARRANTY; without even the implied warranty of 0028 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0029 % General Public License for more details. 0030 % 0031 % You should have received a copy of the GNU General Public License along 0032 % with this program. If not, see <http://www.gnu.org/licenses/>. 0033 0034 crystalSystem = lower(crystalSystem); 0035 switch crystalSystem 0036 case 'a' 0037 crystalSystem = 'triclinic'; 0038 case 'm' 0039 crystalSystem = 'monoclinic'; 0040 case 'o' 0041 crystalSystem = 'orthorhombic'; 0042 case 't' 0043 crystalSystem = 'tetragonal'; 0044 case 'h' 0045 crystalSystem = 'hexagonal/trigonal'; 0046 case 'r' 0047 crystalSystem = 'rhombohedral'; 0048 case 'c' 0049 crystalSystem = 'cubic'; 0050 case 'triclinic' 0051 crystalSystem = 'a'; 0052 case 'anorthic' 0053 crystalSystem = 'a'; 0054 case 'monoclinic' 0055 crystalSystem = 'm'; 0056 case 'orthorhombic' 0057 crystalSystem = 'o'; 0058 case 'tetragonal' 0059 crystalSystem = 't'; 0060 case 'hexagonal' 0061 crystalSystem = 'h'; 0062 case 'hexagonal/trigonal' 0063 crystalSystem = 'h'; 0064 case 'trigonal' 0065 crystalSystem = 'h'; 0066 case 'rhombohedral' 0067 crystalSystem = 'r'; 0068 case 'cubic' 0069 crystalSystem = 'c'; 0070 end