Group Construction
symel_gen
symel_gen.py — Public API for symmetry-element generation.
This module exposes a single public function, pg_to_symels(), which maps a Schoenflies point-group symbol to its list of Symel objects.
Internal logic is split across three focused sub-modules: group_algebra.py — arithmetic (_omega, _mult_iCnm, …) cyclic_dihedral.py — _Zn, _Dihn, _direct_product cubic_icosahedral.py — T/O/I family generators and precomputed tuples
- API Internal API Internal API Overview Module Organization Symmetry Representation
pg_to_symels
pg_to_symels(PG)
Return the list of symmetry elements for the given point group.
Parameters:
-
PG(str) –Schoenflies point group symbol (e.g. "C2v", "D6h", "Oh").
Returns:
-
List[Symel]–
Source code in minimalsym/core/symel_gen.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | |
cyclic_dihedral
cyclic_dihedral.py — Generators for cyclic (Zn/Cn/Sn), dihedral, and direct-product groups.
Public functions: _Zn, _Dihn, _direct_product
- API Internal API Internal API Overview Module Organization Group Construction
_Zn
_Zn(n, generator)
Build symmetry elements for cyclic groups generated by C_n or S_n.
Parameters:
-
n(int) –Order of the principal axis.
-
generator(str) –Principal generator; either "C" for proper rotations or "S" for improper rotations.
Returns:
-
List[Symel]–
Source code in minimalsym/core/cyclic_dihedral.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
_Dihn
_Dihn(n, generator, symel_tag)
Build symmetry elements for dihedral-isomorphic groups.
Parameters:
-
n(int) –Order of the principal axis.
-
generator(str) –Principal generator; either "C" for proper rotations or "S" for improper rotations.
-
symel_tag(str) –Secondary generator label; either "sigma_v" or "C_2'".
Returns:
-
List[Symel]–
Source code in minimalsym/core/cyclic_dihedral.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | |
_direct_product
_direct_product(symels, dpsymel)
Extend a set of symels by taking the direct product with a group of order 2.
Parameters:
-
symels(List[Symel]) –Symmetry elements of the base group.
-
dpsymel(Symel) –The non-identity element of the order-2 factor group (i or sigma_h).
Returns:
-
List[Symel]–
Source code in minimalsym/core/cyclic_dihedral.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | |
cubic_icosahedral
cubic_icosahedral.py — Generators for cubic (T, O) and icosahedral (I) point groups.
Precomputed tuples T_SYMELS, TD_SYMELS, TH_SYMELS, O_SYMELS, OH_SYMELS, I_SYMELS, IH_SYMELS are built once at import time and reused by symel_gen.py.
- API Internal API Internal API Overview Module Organization Group Construction
_icosahedron_vectors
_icosahedron_vectors()
Vectors defining the faces, vertices, and edge centers of a regular icosahedron/dodecahedron.
Returns:
-
tuple(List[array], List[array], List[array])–Face axes (6), vertex axes (10), and edge-center axes (15).
Source code in minimalsym/core/cubic_icosahedral.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
_checked_normalize
_checked_normalize(vec, label)
Normalize vec and raise ValueError if the result is a zero vector.
Source code in minimalsym/core/cubic_icosahedral.py
88 89 90 91 92 93 | |
_generate_T
_generate_T()
Generate symmetry elements for the T point group. Assumes a tetrahedron contained in a cube.
Returns:
-
List[Symel]–
Source code in minimalsym/core/cubic_icosahedral.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | |
_generate_Td
_generate_Td()
Generate symmetry elements for the Td point group. Assumes a tetrahedron contained in a cube.
Returns:
-
List[Symel]–
Source code in minimalsym/core/cubic_icosahedral.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
_generate_Th
_generate_Th()
Generate symmetry elements for the Th point group. Assumes a tetrahedron contained in a cube.
Returns:
-
List[Symel]–
Source code in minimalsym/core/cubic_icosahedral.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |
_generate_O
_generate_O()
Generate symmetry elements for the O point group. Assumes operations on a cube.
Returns:
-
List[Symel]–
Source code in minimalsym/core/cubic_icosahedral.py
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | |
_generate_Oh
_generate_Oh()
Generate symmetry elements for the Oh point group. Assumes operations on a cube.
Returns:
-
List[Symel]–
Source code in minimalsym/core/cubic_icosahedral.py
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | |
_generate_I
_generate_I()
Generate symmetry elements for the I point group.
Returns:
-
List[Symel]–
Source code in minimalsym/core/cubic_icosahedral.py
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | |
_generate_Ih
_generate_Ih()
Generate symmetry elements for the Ih point group.
Returns:
-
List[Symel]–
Source code in minimalsym/core/cubic_icosahedral.py
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | |
group_algebra
group_algebra.py — Pure arithmetic for point-group element products.
Functions here have no side effects and depend only on integer arithmetic and numba JIT. They are used by cyclic_dihedral.py and symel_gen.py.
- API Internal API Internal API Overview Module Organization Group Construction
_omega
_omega(m, n)
Reduce the power m of an S_n element to its canonical symbol index and axis order.
Source code in minimalsym/core/group_algebra.py
12 13 14 15 16 17 | |
_mult_iCnm
_mult_iCnm(m, n)
Return the canonical power and axis order of i * C_n^m.
Source code in minimalsym/core/group_algebra.py
20 21 22 23 24 | |
_mult_sigmahCnm
_mult_sigmahCnm(m, n)
Return the canonical power and axis order of sigma_h * C_n^m.
Source code in minimalsym/core/group_algebra.py
27 28 29 30 | |
_mult_CSC2sigma
_mult_CSC2sigma(m, n, pre, post)
Return the symbol of the product of a principal-axis element with a C_2' or sigma element.
Source code in minimalsym/core/group_algebra.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |