space_group_number
Table of Contents
Macro to Return Space Group Number based on Space Group Symbol
The macro in this page returns Space Group Number based on Space Group Symbol. This macro is converted from the TOPAS sgcom5.txt file. However, the Space Group Symbol must be lower case without gap nor underscore, and must be quoted by double quotation marks. This macro has been tested working in v6 and v7.
The macros
sg_num
macro sg_num(sgs) { 'To use this macro, space group symble "sgs" must be lower case without any space or underscore #if (Or(sgs=="p1",sgs=="a1",sgs=="b1",sgs=="c1",sgs=="i1",sgs=="f1")) 1 #elseif (Or(sgs=="p-1",sgs=="a-1",sgs=="b-1",sgs=="c-1",sgs=="i-1",sgs=="f-1")) 2 #elseif (Or(sgs=="p2",sgs=="p121",sgs=="p112",sgs=="p211")) 3 #elseif (Or(sgs=="p21",sgs=="p1211",sgs=="p1121",sgs=="p2111")) 4 #elseif (Or(sgs=="c2",sgs=="c121",sgs=="c1211",sgs=="a2",sgs=="a121",sgs=="a1211",sgs=="a112",sgs=="a1121",sgs=="b112",sgs=="b1121",sgs=="b211",sgs=="b2111",sgs=="c211",sgs=="c2111",sgs=="i2",sgs=="i121",sgs=="i1211",sgs=="i112",sgs=="i1121",sgs=="i211",sgs=="i2111",sgs=="i121s")) 5 #elseif (Or(sgs=="pm",sgs=="p1m1",sgs=="p11m",sgs=="pm11")) 6 #elseif (Or(sgs=="pc",sgs=="p1c1",sgs=="p1a1",sgs=="p11a",sgs=="p11b",sgs=="pb11",sgs=="pc11",sgs=="pn",sgs=="p1n1",sgs=="p11n",sgs=="pn11")) 7 #elseif (Or(sgs=="cm",sgs=="ca",sgs=="c1m1",sgs=="c1a1",sgs=="am",sgs=="ac",sgs=="a1m1",sgs=="a1c1",sgs=="a11m",sgs=="a11b",sgs=="b11m",sgs=="b11a",sgs=="bm11",sgs=="bc11",sgs=="cm11",sgs=="cb11",sgs=="i1m1",sgs=="i1n1",sgs=="im",sgs=="in",sgs=="i11m",sgs=="i11n",sgs=="im11",sgs=="in11")) 8 #elseif (Or(sgs=="cc",sgs=="c1c1",sgs=="aa",sgs=="a1a1",sgs=="a11a",sgs=="b11b",sgs=="bb11",sgs=="cc11",sgs=="an",sgs=="a1n1",sgs=="cn",sgs=="c1n1",sgs=="b11n",sgs=="a11n",sgs=="cn11",sgs=="bn11",sgs=="ia",sgs=="i1a1",sgs=="ic",sgs=="i1c1",sgs=="i11b",sgs=="i11a",sgs=="ic11",sgs=="ib11")) 9 #elseif (Or(sgs=="p2/m",sgs=="p12/m1",sgs=="p112/m",sgs=="p2/m11",sgs=="p112/ms")) 10 #elseif (Or(sgs=="p21/m",sgs=="p121/m1",sgs=="p1121/m",sgs=="p21/m11",sgs=="p121/m1s")) 11 #elseif (Or(sgs=="c2/m",sgs=="c12/m1",sgs=="c121/a1",sgs=="a2/m",sgs=="a12/m1",sgs=="a121/c1",sgs=="a112/m",sgs=="a1121/b",sgs=="b112/m",sgs=="b1121/a",sgs=="b2/m11",sgs=="b21/c11",sgs=="c2/m11",sgs=="c21/b11",sgs=="i2/m",sgs=="i12/m1",sgs=="i121/n1",sgs=="i112/m",sgs=="i1121/n",sgs=="i2/m11",sgs=="i21/n11",sgs=="i12/m1s")) 12 #elseif (Or(sgs=="p2/c",sgs=="p12/c1",sgs=="p12/a1",sgs=="p112/a",sgs=="p112/b",sgs=="p2/b11",sgs=="p2/c11",sgs=="p2/n",sgs=="p12/n1",sgs=="p112/n",sgs=="p2/n11",sgs=="p12/c1s")) 13 #elseif (Or(sgs=="p21/c",sgs=="p121/c1",sgs=="p21/a",sgs=="p121/a1",sgs=="p121/a1s",sgs=="p1121/a",sgs=="p1121/b",sgs=="p21/b11",sgs=="p21/c11",sgs=="p21/n",sgs=="p121/n1",sgs=="p1121/n",sgs=="p21/n11",sgs=="p121/c1s")) 14 #elseif (Or(sgs=="c2/c",sgs=="c21/n",sgs=="c12/c1",sgs=="c121/n1",sgs=="a2/a",sgs=="a21/n",sgs=="a12/a1",sgs=="a121/n1",sgs=="a112/a",sgs=="a1121/n",sgs=="b112/b",sgs=="b1121/n",sgs=="b2/b11",sgs=="b21/n11",sgs=="c2/c11",sgs=="c21/n11",sgs=="a2/n",sgs=="a21/a",sgs=="a12/n1",sgs=="a121/a1",sgs=="c2/n",sgs=="c21/c",sgs=="c12/n1",sgs=="c121/c1",sgs=="b112/n",sgs=="b1121/b",sgs=="a112/n",sgs=="a1121/a",sgs=="c2/n11",sgs=="c21/c11",sgs=="b2/n11",sgs=="b21/b11",sgs=="i2/a",sgs=="i21/c",sgs=="i12/a1",sgs=="i121/c1",sgs=="i2/c",sgs=="i21/a",sgs=="i12/c1",sgs=="i121/a1",sgs=="i112/b",sgs=="i1121/a",sgs=="i112/a",sgs=="i1121/b",sgs=="i2/c11",sgs=="i21/b11",sgs=="i2/b11",sgs=="i21/c11",sgs=="a12/a1s",sgs=="c12/c1s",sgs=="i12/a1s",sgs=="b112/bs",sgs=="i112/as",sgs=="f-2",sgs=="fd",sgs=="f12/d1")) 15 #elseif (sgs=="p222") 16 #elseif (Or(sgs=="p2221",sgs=="p2122",sgs=="p2212")) 17 #elseif (Or(sgs=="p21212",sgs=="p22121",sgs=="p21221")) 18 #elseif (Or(sgs=="p212121",sgs=="p212121s")) 19 #elseif (Or(sgs=="c2221",sgs=="a2122",sgs=="b2212",sgs=="c212121",sgs=="a212121",sgs=="b212121",sgs=="c2221s")) 20 #elseif (Or(sgs=="c222",sgs=="a222",sgs=="b222",sgs=="c21212",sgs=="a22121",sgs=="b21221")) 21 #elseif (Or(sgs=="f222",sgs=="f21212",sgs=="f21221",sgs=="f22121")) 22 #elseif (sgs=="i222") 23 #elseif (sgs=="i212121") 24 #elseif (Or(sgs=="pmm2",sgs=="p2mm",sgs=="pm2m",sgs=="p2mms")) 25 #elseif (Or(sgs=="pmc21",sgs=="pcm21",sgs=="p21ma",sgs=="p21am",sgs=="pb21m",sgs=="pm21b")) 26 #elseif (Or(sgs=="pcc2",sgs=="p2aa",sgs=="pb2b")) 27 #elseif (Or(sgs=="pma2",sgs=="pbm2",sgs=="p2mb",sgs=="p2cm",sgs=="pc2m",sgs=="pm2a")) 28 #elseif (Or(sgs=="pca21",sgs=="pbc21",sgs=="p21ab",sgs=="p21ca",sgs=="pc21b",sgs=="pb21a",sgs=="pbc21s",sgs=="pca21s")) 29 #elseif (Or(sgs=="pnc2",sgs=="pcn2",sgs=="p2na",sgs=="p2an",sgs=="pb2n",sgs=="pn2b")) 30 #elseif (Or(sgs=="pmn21",sgs=="pnm21",sgs=="p21mn",sgs=="p21nm",sgs=="pn21m",sgs=="pm21n",sgs=="pmn21s",sgs=="p21mns",sgs=="pn21ms",sgs=="pm21ns",sgs=="pm21ns1")) 31 #elseif (Or(sgs=="pba2",sgs=="p2cb",sgs=="pc2a")) 32 #elseif (Or(sgs=="pna21",sgs=="pbn21",sgs=="p21nb",sgs=="p21cn",sgs=="pc21n",sgs=="pn21a",sgs=="p21cns")) 33 #elseif (Or(sgs=="pnn2",sgs=="p2nn",sgs=="pn2n")) 34 #elseif (Or(sgs=="cmm2",sgs=="a2mm",sgs=="bm2m",sgs=="cba2",sgs=="a2cb",sgs=="bc2a")) 35 #elseif (Or(sgs=="cmc21",sgs=="ccm21",sgs=="a21ma",sgs=="a21am",sgs=="bb21m",sgs=="bm21b",sgs=="cbn21",sgs=="cna21",sgs=="a21cn",sgs=="a21nb",sgs=="bn21a",sgs=="bc21n")) 36 #elseif (Or(sgs=="ccc2",sgs=="a2aa",sgs=="bb2b",sgs=="cnn2",sgs=="a2nn",sgs=="bn2n")) 37 #elseif (Or(sgs=="amm2",sgs=="bmm2",sgs=="b2mm",sgs=="c2mm",sgs=="cm2m",sgs=="am2m",sgs=="anc21",sgs=="bcn21",sgs=="b21na",sgs=="c21an",sgs=="cb21n",sgs=="an21b")) 38 #elseif (Or(sgs=="abm2",sgs=="bma2",sgs=="b2cm",sgs=="c2mb",sgs=="cm2a",sgs=="ac2m",sgs=="acc21",sgs=="bcc21",sgs=="b21aa",sgs=="c21aa",sgs=="cb21b",sgs=="ab21b")) 39 #elseif (Or(sgs=="ama2",sgs=="bbm2",sgs=="b2mb",sgs=="c2cm",sgs=="cc2m",sgs=="am2a",sgs=="ann21",sgs=="bnn21",sgs=="b21nn",sgs=="c21nn",sgs=="cn21n",sgs=="an21n")) 40 #elseif (Or(sgs=="aba2",sgs=="bba2",sgs=="b2cb",sgs=="c2cb",sgs=="cc2a",sgs=="ac2a",sgs=="acn21",sgs=="bnc21",sgs=="b21an",sgs=="c21na",sgs=="cn21b",sgs=="ab21n")) 41 #elseif (Or(sgs=="fmm2",sgs=="f2mm",sgs=="fm2m",sgs=="fba2",sgs=="f2cb",sgs=="fc2a",sgs=="fnc21",sgs=="fcn21",sgs=="f21na",sgs=="f21an",sgs=="fb21n",sgs=="fn21b",sgs=="fcn21",sgs=="fnc21",sgs=="f21an",sgs=="f21na",sgs=="fn21b",sgs=="fb21n")) 42 #elseif (Or(sgs=="fdd2",sgs=="f2dd",sgs=="fd2d",sgs=="fdd21",sgs=="f21dd",sgs=="fd21d",sgs=="fdd2s")) 43 #elseif (Or(sgs=="imm2",sgs=="i2mm",sgs=="im2m",sgs=="inn21",sgs=="i21nn",sgs=="in21n")) 44 #elseif (Or(sgs=="iba2",sgs=="i2cb",sgs=="ic2a",sgs=="icc21",sgs=="i21aa",sgs=="ib21b")) 45 #elseif (Or(sgs=="ima2",sgs=="ibm2",sgs=="i2mb",sgs=="i2cm",sgs=="ic2m",sgs=="im2a",sgs=="inc21",sgs=="icn21",sgs=="i21na",sgs=="i21an",sgs=="ib21n",sgs=="in21b")) 46 #elseif (sgs=="pmmm") 47 #elseif (Or(sgs=="pnnn",sgs=="pnnns",sgs=="pnnn:2",sgs=="48:2",sgs=="pnnnz")) 48 #elseif (Or(sgs=="pccm",sgs=="pmaa",sgs=="pbmb")) 49 #elseif (Or(sgs=="pban",sgs=="pbans",sgs=="pncb",sgs=="pncbs",sgs=="pcna",sgs=="pban:2",sgs=="50:2",sgs=="pbanz",sgs=="pncb:2",sgs=="pncbz",sgs=="pcna:2")) 50 #elseif (Or(sgs=="pmma",sgs=="pmmb",sgs=="pbmm",sgs=="pcmm",sgs=="pmcm",sgs=="pmam")) 51 #elseif (Or(sgs=="pnna",sgs=="pnnb",sgs=="pbnn",sgs=="pcnn",sgs=="pncn",sgs=="pnan",sgs=="pnans")) 52 #elseif (Or(sgs=="pmna",sgs=="pnmb",sgs=="pbmn",sgs=="pcnm",sgs=="pncm",sgs=="pman")) 53 #elseif (Or(sgs=="pcca",sgs=="pccb",sgs=="pbaa",sgs=="pcaa",sgs=="pbcb",sgs=="pbab")) 54 #elseif (Or(sgs=="pbam",sgs=="pmcb",sgs=="pcma")) 55 #elseif (Or(sgs=="pccn",sgs=="pnaa",sgs=="pbnb")) 56 #elseif (Or(sgs=="pbcm",sgs=="pcam",sgs=="pmca",sgs=="pmab",sgs=="pbma",sgs=="pcmb")) 57 #elseif (Or(sgs=="pnnm",sgs=="pmnn",sgs=="pnmn")) 58 #elseif (Or(sgs=="pmmn",sgs=="pmmns",sgs=="pnmm",sgs=="pnmms",sgs=="pmnm",sgs=="pmnms",sgs=="pmmn:2",sgs=="pmmnz",sgs=="pnmm:2",sgs=="pnmmz",sgs=="pmnm:2",sgs=="pmnmz")) 59 #elseif (Or(sgs=="pbcn",sgs=="pcan",sgs=="pnca",sgs=="pnab",sgs=="pbna",sgs=="pcnb",sgs=="pcnbs")) 60 #elseif (Or(sgs=="pbca",sgs=="pcab",sgs=="pbca",sgs=="pcab",sgs=="pbca",sgs=="pcab")) 61 #elseif (Or(sgs=="pnma",sgs=="pmnb",sgs=="pbnm",sgs=="pcmn",sgs=="pmcn",sgs=="pnam",sgs=="pbnms",sgs=="pmcns",sgs=="pmcns1",sgs=="pmcns2",sgs=="pmnbs",sgs=="pmnbs1",sgs=="pnams")) 62 #elseif (Or(sgs=="cmcm",sgs=="ccmm",sgs=="amma",sgs=="amam",sgs=="bbmm",sgs=="bmmb",sgs=="bbmms",sgs=="bmmbs")) 63 #elseif (Or(sgs=="cmca",sgs=="ccmb",sgs=="abma",sgs=="acam",sgs=="bbcm",sgs=="bmab",sgs=="cbnb",sgs=="cnaa",sgs=="accn",sgs=="abnb",sgs=="bnaa",sgs=="bccn",sgs=="bmabs",sgs=="ccmbs")) 64 #elseif (Or(sgs=="cmmm",sgs=="ammm",sgs=="bmmm",sgs=="cban",sgs=="ancb",sgs=="bcna")) 65 #elseif (Or(sgs=="cccm",sgs=="amaa",sgs=="bbmb",sgs=="cnnn",sgs=="annn",sgs=="bnnn")) 66 #elseif (Or(sgs=="cmma",sgs=="cmmb",sgs=="abmm",sgs=="acmm",sgs=="bmcm",sgs=="bmam",sgs=="cbab",sgs=="cbaa",sgs=="accb",sgs=="abcb",sgs=="bcaa",sgs=="bcca")) 67 #elseif (Or(sgs=="ccca",sgs=="cccb",sgs=="abaa",sgs=="acaa",sgs=="bbcb",sgs=="bbab",sgs=="cnnb",sgs=="cnna",sgs=="acnn",sgs=="abnn",sgs=="bnan",sgs=="bncn",sgs=="ccca:2",sgs=="cccb:2",sgs=="abaa:2",sgs=="acaa:2",sgs=="bbcb:2",sgs=="bbab:2",sgs=="cnnb:2",sgs=="cnna:2",sgs=="acnn:2",sgs=="abnn:2",sgs=="bnan:2",sgs=="bncn:2",sgs=="cccaz")) 68 #elseif (Or(sgs=="fmmm",sgs=="fban",sgs=="fncb",sgs=="fcna")) 69 #elseif (Or(sgs=="fddd",sgs=="fddds",sgs=="fddd:2",sgs=="70:2",sgs=="fdddz")) 70 #elseif (Or(sgs=="immm",sgs=="innn")) 71 #elseif (Or(sgs=="ibam",sgs=="imcb",sgs=="icma",sgs=="iccn",sgs=="inaa",sgs=="ibnb",sgs=="ibams",sgs=="icmas")) 72 #elseif (Or(sgs=="ibca",sgs=="icab")) 73 #elseif (Or(sgs=="imma",sgs=="immb",sgs=="ibmm",sgs=="icmm",sgs=="imcm",sgs=="imam",sgs=="innb",sgs=="inna",sgs=="icnn",sgs=="ibnn",sgs=="inan",sgs=="incn",sgs=="imams1")) 74 #elseif (Or(sgs=="p4",sgs=="c4")) 75 #elseif (Or(sgs=="p41",sgs=="c41")) 76 #elseif (Or(sgs=="p42",sgs=="c42")) 77 #elseif (Or(sgs=="p43",sgs=="c43")) 78 #elseif (Or(sgs=="i4",sgs=="i42",sgs=="f4",sgs=="f42")) 79 #elseif (Or(sgs=="i41",sgs=="i43",sgs=="f41",sgs=="f43")) 80 #elseif (Or(sgs=="p-4",sgs=="c-4")) 81 #elseif (Or(sgs=="i-4",sgs=="f-4")) 82 #elseif (Or(sgs=="p4/m",sgs=="c4/m",sgs=="c4/n")) 83 #elseif (Or(sgs=="p42/m",sgs=="c42/m",sgs=="c4/n")) 84 #elseif (Or(sgs=="p4/n",sgs=="p4/ns",sgs=="c4/a",sgs=="c4/b",sgs=="p4/n:2",sgs=="p4/nz",sgs=="c4/a:2",sgs=="c4/b:2",sgs=="p4/ns1")) 85 #elseif (Or(sgs=="p42/n",sgs=="p42/ns",sgs=="c42/a",sgs=="c42/b",sgs=="p42/n:2",sgs=="p42/nz",sgs=="c42/a:2",sgs=="c42/b:2",sgs=="p42/ns1")) 86 #elseif (Or(sgs=="i4/m",sgs=="i42/n",sgs=="f4/m",sgs=="f42/a")) 87 #elseif (Or(sgs=="i41/a",sgs=="i41/as",sgs=="i43/b",sgs=="f41/d",sgs=="f43/d",sgs=="i41/a:2",sgs=="i41/az",sgs=="i43/b:2",sgs=="f41/d:2",sgs=="f43/d:2",sgs=="i41/az1")) 88 #elseif (Or(sgs=="p422",sgs=="p4221",sgs=="c422",sgs=="c4212")) 89 #elseif (Or(sgs=="p4212",sgs=="p42121",sgs=="c4221",sgs=="c42121")) 90 #elseif (sgs=="p4122") 91 #elseif (sgs=="p41212") 92 #elseif (sgs=="p4222") 93 #elseif (sgs=="p42212") 94 #elseif (sgs=="p4322") 95 #elseif (sgs=="p43212") 96 #elseif (sgs=="i422") 97 #elseif (sgs=="i4122") 98 #elseif (sgs=="p4mm") 99 #elseif (sgs=="p4bm") 100 #elseif (sgs=="p42cm") 101 #elseif (sgs=="p42nm") 102 #elseif (sgs=="p4cc") 103 #elseif (sgs=="p4nc") 104 #elseif (sgs=="p42mc") 105 #elseif (sgs=="p42bc") 106 #elseif (sgs=="i4mm") 107 #elseif (sgs=="i4cm") 108 #elseif (sgs=="i41md") 109 #elseif (sgs=="i41cd") 110 #elseif (sgs=="p-42m") 111 #elseif (sgs=="p-42c") 112 #elseif (sgs=="p-421m") 113 #elseif (sgs=="p-421c") 114 #elseif (sgs=="p-4m2") 115 #elseif (sgs=="p-4c2") 116 #elseif (Or(sgs=="p-4b2",sgs=="p-4b2s")) 117 #elseif (sgs=="p-4n2") 118 #elseif (sgs=="i-4m2") 119 #elseif (sgs=="i-4c2") 120 #elseif (sgs=="i-42m") 121 #elseif (Or(sgs=="i-42d",sgs=="i-42ds")) 122 #elseif (sgs=="p4/mmm") 123 #elseif (sgs=="p4/mcc") 124 #elseif (Or(sgs=="p4/nbm",sgs=="p4/nbms",sgs=="p4/nbm:2",sgs=="p4/nbmz")) 125 #elseif (Or(sgs=="p4/nnc",sgs=="p4/nncs",sgs=="p4/nnc:2",sgs=="p4/nncz",sgs=="p4/nncz1")) 126 #elseif (sgs=="p4/mbm") 127 #elseif (sgs=="p4/mnc") 128 #elseif (Or(sgs=="p4/nmm",sgs=="p4/nmms",sgs=="p4/nmm:2",sgs=="p4/nmmz",sgs=="p4/nmms1")) 129 #elseif (Or(sgs=="p4/ncc",sgs=="p4/nccs",sgs=="p4/ncc:2",sgs=="p4/nccz")) 130 #elseif (Or(sgs=="p42/mmc",sgs=="p42/mmcs")) 131 #elseif (sgs=="p42/mcm") 132 #elseif (Or(sgs=="p42/nbc",sgs=="p42/nbcs",sgs=="p42/nbc:2",sgs=="p42/nbcz")) 133 #elseif (Or(sgs=="p42/nnm",sgs=="p42/nnms",sgs=="p42/nnm:2",sgs=="p42/nnmz")) 134 #elseif (sgs=="p42/mbc") 135 #elseif (sgs=="p42/mnm") 136 #elseif (Or(sgs=="p42/nmc",sgs=="p42/nmcs",sgs=="p42/nmc:2",sgs=="p42/nmcz")) 137 #elseif (Or(sgs=="p42/ncm",sgs=="p42/ncms",sgs=="p42/ncm:2",sgs=="p42/ncmz")) 138 #elseif (sgs=="i4/mmm") 139 #elseif (Or(sgs=="i4/mcm",sgs=="i4/mcms")) 140 #elseif (Or(sgs=="i41/amd",sgs=="i41/amds",sgs=="i41/amd:2",sgs=="i41/amdz")) 141 #elseif (Or(sgs=="i41/acd",sgs=="i41/acds",sgs=="i41/acd:2",sgs=="i41/acdz")) 142 #elseif (sgs=="p3") 143 #elseif (sgs=="p31") 144 #elseif (sgs=="p32") 145 #elseif (Or(sgs=="r3",sgs=="r3r")) 146 #elseif (sgs=="p-3") 147 #elseif (Or(sgs=="r-3",sgs=="r-3r")) 148 #elseif (sgs=="p312") 149 #elseif (sgs=="p321") 150 #elseif (Or(sgs=="p3112",sgs=="p3112s")) 151 #elseif (Or(sgs=="p3121",sgs=="p3121s")) 152 #elseif (sgs=="p3212") 153 #elseif (Or(sgs=="p3221",sgs=="p3221s")) 154 #elseif (Or(sgs=="r32",sgs=="r32r",sgs=="155r")) 155 #elseif (sgs=="p3m1") 156 #elseif (sgs=="p31m") 157 #elseif (sgs=="p3c1") 158 #elseif (sgs=="p31c") 159 #elseif (Or(sgs=="r3m",sgs=="r3mr")) 160 #elseif (Or(sgs=="r3c",sgs=="r3cr")) 161 #elseif (sgs=="p-31m") 162 #elseif (Or(sgs=="p-31c",sgs=="p-31cs")) 163 #elseif (sgs=="p-3m1") 164 #elseif (sgs=="p-3c1") 165 #elseif (Or(sgs=="r-3m",sgs=="r-3mrs",sgs=="r-3mr")) 166 #elseif (Or(sgs=="r-3c",sgs=="r-3cr",sgs=="r-3crs")) 167 #elseif (sgs=="p6") 168 #elseif (sgs=="p61") 169 #elseif (sgs=="p65") 170 #elseif (sgs=="p62") 171 #elseif (sgs=="p64") 172 #elseif (sgs=="p63") 173 #elseif (sgs=="p-6") 174 #elseif (sgs=="p6/m") 175 #elseif (sgs=="p63/m") 176 #elseif (sgs=="p622") 177 #elseif (sgs=="p6122") 178 #elseif (sgs=="p6522") 179 #elseif (sgs=="p6222") 180 #elseif (sgs=="p6422") 181 #elseif (sgs=="p6322") 182 #elseif (sgs=="p6mm") 183 #elseif (sgs=="p6cc") 184 #elseif (sgs=="p63cm") 185 #elseif (Or(sgs=="p63mc",sgs=="p63mcs")) 186 #elseif (sgs=="p-6m2") 187 #elseif (sgs=="p-6c2") 188 #elseif (sgs=="p-62m") 189 #elseif (sgs=="p-62c") 190 #elseif (sgs=="p6/mmm") 191 #elseif (Or(sgs=="p6/mcc",sgs=="p6/mccs")) 192 #elseif (Or(sgs=="p63/mcm",sgs=="p63/mcms")) 193 #elseif (sgs=="p63/mmc") 194 #elseif (sgs=="p23") 195 #elseif (sgs=="f23") 196 #elseif (sgs=="i23") 197 #elseif (sgs=="p213") 198 #elseif (sgs=="i213") 199 #elseif (Or(sgs=="pm-3",sgs=="pm3")) 200 #elseif (Or(sgs=="pn-3",sgs=="pn3",sgs=="pn-3s",sgs=="pn3s",sgs=="pn-3:2",sgs=="pn3:2",sgs=="pn-3z",sgs=="pn3z")) 201 #elseif (Or(sgs=="fm-3",sgs=="fm3")) 202 #elseif (Or(sgs=="fd-3",sgs=="fd3",sgs=="fd-3s",sgs=="fd3s",sgs=="fd-3:2",sgs=="fd3:2",sgs=="fd-3z",sgs=="fd3z")) 203 #elseif (Or(sgs=="im-3",sgs=="im3")) 204 #elseif (Or(sgs=="pa-3",sgs=="pa3")) 205 #elseif (Or(sgs=="ia-3",sgs=="ia3")) 206 #elseif (sgs=="p432") 207 #elseif (sgs=="p4232") 208 #elseif (sgs=="f432") 209 #elseif (sgs=="f4132") 210 #elseif (sgs=="i432") 211 #elseif (sgs=="p4332") 212 #elseif (sgs=="p4132") 213 #elseif (sgs=="i4132") 214 #elseif (sgs=="p-43m") 215 #elseif (sgs=="f-43m") 216 #elseif (sgs=="i-43m") 217 #elseif (sgs=="p-43n") 218 #elseif (sgs=="f-43c") 219 #elseif (sgs=="i-43d") 220 #elseif (Or(sgs=="pm-3m",sgs=="pm3m")) 221 #elseif (Or(sgs=="pn-3n",sgs=="pn3n",sgs=="pn-3ns",sgs=="pn3ns",sgs=="pn-3n:2",sgs=="pn3n:2",sgs=="pn-3nz",sgs=="pn3nz")) 222 #elseif (Or(sgs=="pm-3n",sgs=="pm3n")) 223 #elseif (Or(sgs=="pn-3m",sgs=="pn3m",sgs=="pn-3ms",sgs=="pn3ms",sgs=="pn-3m:2",sgs=="pn3m:2",sgs=="pn-3mz",sgs=="pn3mz")) 224 #elseif (Or(sgs=="fm-3m",sgs=="fm3m")) 225 #elseif (Or(sgs=="fm-3c",sgs=="fm3c")) 226 #elseif (Or(sgs=="fd-3m",sgs=="fd3m",sgs=="fd-3ms",sgs=="fd3ms",sgs=="fd-3ms1",sgs=="fd-3m:2",sgs=="fd3m:2",sgs=="fd-3mz",sgs=="fd3mz")) 227 #elseif (Or(sgs=="fd-3c",sgs=="fd3c",sgs=="fd-3cs",sgs=="fd3cs",sgs=="fd-3c:2",sgs=="fd3c:2",sgs=="fd-3cz",sgs=="fd3cz")) 228 #elseif (Or(sgs=="im-3m",sgs=="im3m")) 229 #elseif (sgs=="ia-3d") 230 #endif }
Application Example: Output Space Group Number to .cif
RAW(corundum) CuKa5(0.001) Radius(173) LP_Factor(26.6) Full_Axial_Model(12, 15, 12, 4.6, 4.6) Slit_Width(0.3) Divergence(1) Absorption(@, 30) ZE(@,0) One_on_X(@, 1000) bkg @ 0 0 0 0 0 0 STR("r-3c") phase_name "Corundum" Trigonal(@ 4.75847, @ 12.99036) site Al num_posns 0 x 0 y 0 z @ 0.35228`_0.00003 occ Al 1 beq @ 0.29860`_0.00866 site O num_posns 0 x @ 0.30607`_0.00014 y 0 z 0.25 occ O 1 beq @ 0.16724`_0.01427 scale @ 0.002 CS_L(@, 274.753078`_7.43125129) Strain_L(@, 0.0166526397`_0.00141211878) r_bragg 3.76972174 out Corundum.cif append out_record out_fmt "_space_group_IT_number %.0f" out_eqn sg_num("r-3c")
If any user in our open TOPAS community has suggestion or idea, or bug report on these macros, please kindly let me know and I am happy to learn from you: tony.wang@qut.edu.au Thanks for Alan's inspiration about #if. :)
space_group_number.txt · Last modified: 2023/09/07 06:26 by 127.0.0.1