-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwycoffs.py
7035 lines (6759 loc) · 263 KB
/
wycoffs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
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
119
120
121
122
123
124
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
176
177
178
179
180
181
182
183
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
219
220
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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# coding: utf-8
import numpy as np
def special_positions(symbol, multiplicity, pos):
if symbol == 'P1':
return sp_1(multiplicity, pos)
elif symbol == 'P-1':
return sp_2(multiplicity, pos)
elif symbol == 'P2':
if not sp_3_b(multiplicity, pos):
return sp_3_c(multiplicity, pos)
else:
return sp_3_b(multiplicity, pos)
elif symbol == 'P2_1':
if not sp_4_b(multiplicity, pos):
return sp_4_c(multiplicity, pos)
else:
return sp_4_b(multiplicity, pos)
elif symbol == 'C2':
if not sp_5_b(multiplicity, pos):
return sp_5_c(multiplicity, pos)
else:
return sp_5_b(multiplicity, pos)
elif symbol == 'Pm':
if not sp_6_b(multiplicity, pos):
return sp_6_c(multiplicity, pos)
else:
return sp_6_b(multiplicity, pos)
elif symbol == 'Pc':
if not sp_7_b(multiplicity, pos):
return sp_7_c(multiplicity, pos)
else:
return sp_7_b(multiplicity, pos)
elif symbol == 'Cm':
if not sp_8_b(multiplicity, pos):
return sp_8_c(multiplicity, pos)
else:
return sp_8_b(multiplicity, pos)
elif symbol == 'Cc':
if not sp_9_b(multiplicity, pos):
return sp_9_c(multiplicity, pos)
else:
return sp_9_b(multiplicity, pos)
elif symbol == 'P2/m':
if not sp_10_b(multiplicity, pos):
return sp_10_c(multiplicity, pos)
else:
return sp_10_b(multiplicity, pos)
elif symbol == 'P2_1/m':
if not sp_11_b(multiplicity, pos):
return sp_11_c(multiplicity, pos)
else:
return sp_11_b(multiplicity, pos)
elif symbol == 'C2/m':
if not sp_12_b(multiplicity, pos):
return sp_12_c(multiplicity, pos)
else:
return sp_12_b(multiplicity, pos)
elif symbol == 'P2/c':
if not sp_13_b(multiplicity, pos):
return sp_13_c(multiplicity, pos)
else:
return sp_13_b(multiplicity, pos)
elif symbol == 'P2_1/c':
if not sp_14_b(multiplicity, pos):
return sp_14_c(multiplicity, pos)
else:
return sp_14_b(multiplicity, pos)
elif symbol == 'C2/c':
if not sp_15_b(multiplicity, pos):
return sp_15_c(multiplicity, pos)
else:
return sp_15_b(multiplicity, pos)
elif symbol == 'P222':
return sp_16(multiplicity, pos)
elif symbol == 'P222_1':
return sp_17(multiplicity, pos)
elif symbol == 'P2_12_12':
return sp_18(multiplicity, pos)
elif symbol == 'P2_12_12_1':
return sp_19(multiplicity, pos)
elif symbol == 'C222_1':
return sp_20(multiplicity, pos)
elif symbol == 'C222':
return sp_21(multiplicity, pos)
elif symbol == 'F222':
return sp_22(multiplicity, pos)
elif symbol == 'I222':
return sp_23(multiplicity, pos)
elif symbol == 'I2_12_12_1':
return sp_24(multiplicity, pos)
elif symbol == 'Pmm2':
return sp_25(multiplicity, pos)
elif symbol == 'Pmc2_1':
return sp_26(multiplicity, pos)
elif symbol == 'Pcc2':
return sp_27(multiplicity, pos)
elif symbol == 'Pma2':
return sp_28(multiplicity, pos)
elif symbol == 'Pca2_1':
return sp_29(multiplicity, pos)
elif symbol == 'Pnc2':
return sp_30(multiplicity, pos)
elif symbol == 'Pmn2_1':
return sp_31(multiplicity, pos)
elif symbol == 'Pba2':
return sp_32(multiplicity, pos)
elif symbol == 'Pna2_1':
return sp_33(multiplicity, pos)
elif symbol == 'Pnn2':
return sp_34(multiplicity, pos)
elif symbol == 'Cmm2':
return sp_35(multiplicity, pos)
elif symbol == 'Cmc2_1':
return sp_36(multiplicity, pos)
elif symbol == 'Ccc2':
return sp_37(multiplicity, pos)
elif symbol == 'Amm2':
return sp_38(multiplicity, pos)
elif symbol == 'Aem2':
return sp_39(multiplicity, pos)
elif symbol == 'Ama2':
return sp_40(multiplicity, pos)
elif symbol == 'Aea2':
return sp_41(multiplicity, pos)
elif symbol == 'Fmm2':
return sp_42(multiplicity, pos)
elif symbol == 'Fdd2':
return sp_43(multiplicity, pos)
elif symbol == 'Imm2':
return sp_44(multiplicity, pos)
elif symbol == 'Iba2':
return sp_45(multiplicity, pos)
elif symbol == 'Ima2':
return sp_46(multiplicity, pos)
elif symbol == 'Pmmm':
return sp_47(multiplicity, pos)
elif symbol == 'Pnnn':
if not sp_48(multiplicity, pos):
return sp_48_s(multiplicity, pos)
else:
return sp_48(multiplicity, pos)
elif symbol == 'Pccm':
return sp_49(multiplicity, pos)
elif symbol == 'Pban':
if not sp_50(multiplicity, pos):
return sp_50_s(multiplicity, pos)
else:
return sp_50(multiplicity, pos)
elif symbol == 'Pmma':
return sp_51(multiplicity, pos)
elif symbol == 'Pnna':
return sp_52(multiplicity, pos)
elif symbol == 'Pmna':
return sp_53(multiplicity, pos)
elif symbol == 'Pcca':
return sp_54(multiplicity, pos)
elif symbol == 'Pbam':
return sp_55(multiplicity, pos)
elif symbol == 'Pccn':
return sp_56(multiplicity, pos)
elif symbol == 'Pbcm':
return sp_57(multiplicity, pos)
elif symbol == 'Pnnm':
return sp_58(multiplicity, pos)
elif symbol == 'Pmmn':
if not sp_59(multiplicity, pos):
return sp_59_s(multiplicity, pos)
else:
return sp_59(multiplicity, pos)
elif symbol == 'Pbcn':
return sp_60(multiplicity, pos)
elif symbol == 'Pbca':
return sp_61(multiplicity, pos)
elif symbol == 'Pnma':
return sp_62(multiplicity, pos)
elif symbol == 'Cmcm':
return sp_63(multiplicity, pos)
elif symbol == 'Cmce':
return sp_64(multiplicity, pos)
elif symbol == 'Cmmm':
return sp_65(multiplicity, pos)
elif symbol == 'Cccm':
return sp_66(multiplicity, pos)
elif symbol == 'Cmme':
return sp_67(multiplicity, pos)
elif symbol == 'Ccce':
if not sp_68(multiplicity, pos):
return sp_68_s(multiplicity, pos)
else:
return sp_68(multiplicity, pos)
elif symbol == 'Fmmm':
return sp_69(multiplicity, pos)
elif symbol == 'Fddd':
if not sp_70(multiplicity, pos):
return sp_70_s(multiplicity, pos)
else:
return sp_70(multiplicity, pos)
elif symbol == 'Immm':
return sp_71(multiplicity, pos)
elif symbol == 'Ibam':
return sp_72(multiplicity, pos)
elif symbol == 'Ibca':
return sp_73(multiplicity, pos)
elif symbol == 'Imma':
return sp_74(multiplicity, pos)
elif symbol == 'P4':
return sp_75(multiplicity, pos)
elif symbol == 'P4_1':
return sp_76(multiplicity, pos)
elif symbol == 'P4_2':
return sp_77(multiplicity, pos)
elif symbol == 'P4_3':
return sp_78(multiplicity, pos)
elif symbol == 'I4':
return sp_79(multiplicity, pos)
elif symbol == 'I4_1':
return sp_80(multiplicity, pos)
elif symbol == 'P-4':
return sp_81(multiplicity, pos)
elif symbol == 'I-4':
return sp_82(multiplicity, pos)
elif symbol == 'P4/m':
return sp_83(multiplicity, pos)
elif symbol == 'P4_2/m':
return sp_84(multiplicity, pos)
elif symbol == 'P4/n':
if not sp_85(multiplicity, pos):
return sp_85_s(multiplicity, pos)
else:
return sp_85(multiplicity, pos)
elif symbol == 'P4_2/n':
if not sp_86(multiplicity, pos):
return sp_86_s(multiplicity, pos)
else:
return sp_86(multiplicity, pos)
elif symbol == 'I4/m':
return sp_87(multiplicity, pos)
elif symbol == 'I4_1/a':
if not sp_88(multiplicity, pos):
return sp_88_s(multiplicity, pos)
else:
return sp_88(multiplicity, pos)
elif symbol == 'P422':
return sp_89(multiplicity, pos)
elif symbol == 'P42_12':
return sp_90(multiplicity, pos)
elif symbol == 'P4_122':
return sp_91(multiplicity, pos)
elif symbol == 'P4_12_12':
return sp_92(multiplicity, pos)
elif symbol == 'P4_222':
return sp_93(multiplicity, pos)
elif symbol == 'P4_22_12':
return sp_94(multiplicity, pos)
elif symbol == 'P4_322':
return sp_95(multiplicity, pos)
elif symbol == 'P4_32_12':
return sp_96(multiplicity, pos)
elif symbol == 'I422':
return sp_97(multiplicity, pos)
elif symbol == 'I4_122':
return sp_98(multiplicity, pos)
elif symbol == 'P4mm':
return sp_99(multiplicity, pos)
elif symbol == 'P4bm':
return sp_100(multiplicity, pos)
elif symbol == 'P4_2cm':
return sp_101(multiplicity, pos)
elif symbol == 'P4_2nm':
return sp_102(multiplicity, pos)
elif symbol == 'P4cc':
return sp_103(multiplicity, pos)
elif symbol == 'P4nc':
return sp_104(multiplicity, pos)
elif symbol == 'P4_2mc':
return sp_105(multiplicity, pos)
elif symbol == 'P4_2bc':
return sp_106(multiplicity, pos)
elif symbol == 'I4mm':
return sp_107(multiplicity, pos)
elif symbol == 'I4cm':
return sp_108(multiplicity, pos)
elif symbol == 'I4_1md':
return sp_109(multiplicity, pos)
elif symbol == 'I4_1cd':
return sp_110(multiplicity, pos)
elif symbol == 'P-42m':
return sp_111(multiplicity, pos)
elif symbol == 'P-42c':
return sp_112(multiplicity, pos)
elif symbol == 'P-42_1m':
return sp_113(multiplicity, pos)
elif symbol == 'P-42_1c':
return sp_114(multiplicity, pos)
elif symbol == 'P-4m2':
return sp_115(multiplicity, pos)
elif symbol == 'P-4c2':
return sp_116(multiplicity, pos)
elif symbol == 'P-4b2':
return sp_117(multiplicity, pos)
elif symbol == 'P-4n2':
return sp_118(multiplicity, pos)
elif symbol == 'I-4m2':
return sp_119(multiplicity, pos)
elif symbol == 'I-4c2':
return sp_120(multiplicity, pos)
elif symbol == 'I-42m':
return sp_121(multiplicity, pos)
elif symbol == 'I-42d':
return sp_122(multiplicity, pos)
elif symbol == 'P4/mmm':
return sp_123(multiplicity, pos)
elif symbol == 'P4/mcc':
return sp_124(multiplicity, pos)
elif symbol == 'P4/nbm':
if not sp_125(multiplicity, pos):
return sp_125_s(multiplicity, pos)
else:
return sp_125(multiplicity, pos)
elif symbol == 'P4/nnc':
if not sp_126(multiplicity, pos):
return sp_126_s(multiplicity, pos)
else:
return sp_126(multiplicity, pos)
elif symbol == 'P4/mbm':
return sp_127(multiplicity, pos)
elif symbol == 'P4/mnc':
return sp_128(multiplicity, pos)
elif symbol == 'P4/nmm':
if not sp_129(multiplicity, pos):
return sp_129_s(multiplicity, pos)
else:
return sp_129(multiplicity, pos)
elif symbol == 'P4/ncc':
if not sp_130(multiplicity, pos):
return sp_130_s(multiplicity, pos)
else:
return sp_130(multiplicity, pos)
elif symbol == 'P4_2/mmc':
return sp_131(multiplicity, pos)
elif symbol == 'P4_2/mcm':
return sp_132(multiplicity, pos)
elif symbol == 'P4_2/nbc':
if not sp_133(multiplicity, pos):
return sp_133_s(multiplicity, pos)
else:
return sp_133(multiplicity, pos)
elif symbol == 'P4_2/nnm':
if not sp_134(multiplicity, pos):
return sp_134_s(multiplicity, pos)
else:
return sp_134(multiplicity, pos)
elif symbol == 'P4_2/mbc':
return sp_135(multiplicity, pos)
elif symbol == 'P4_2/mnm':
return sp_136(multiplicity, pos)
elif symbol == 'P4_2/nmc':
if not sp_137(multiplicity, pos):
return sp_137_s(multiplicity, pos)
else:
return sp_137(multiplicity, pos)
elif symbol == 'P4_2/ncm':
if not sp_138(multiplicity, pos):
return sp_138_s(multiplicity, pos)
else:
return sp_138(multiplicity, pos)
elif symbol == 'I4/mmm':
return sp_139(multiplicity, pos)
elif symbol == 'I4/mcm':
return sp_140(multiplicity, pos)
elif symbol == 'I4_1/amd':
if not sp_141(multiplicity, pos):
return sp_141_s(multiplicity, pos)
else:
return sp_141(multiplicity, pos)
elif symbol == 'I4_1/acd':
if not sp_142(multiplicity, pos):
return sp_142_s(multiplicity, pos)
else:
return sp_142(multiplicity, pos)
elif symbol == 'P3':
return sp_143(multiplicity, pos)
elif symbol == 'P3_1':
return sp_144(multiplicity, pos)
elif symbol == 'P3_2':
return sp_145(multiplicity, pos)
elif symbol == 'R3':
return sp_146_R(multiplicity, pos)
elif symbol == 'R3H':
return sp_146_H(multiplicity, pos)
elif symbol == 'P-3':
return sp_147(multiplicity, pos)
elif symbol == 'R-3':
return sp_148_R(multiplicity, pos)
elif symbol == 'R-3H':
return sp_148_H(multiplicity, pos)
elif symbol == 'P312':
return sp_149(multiplicity, pos)
elif symbol == 'P321':
return sp_150(multiplicity, pos)
elif symbol == 'P3_112':
return sp_151(multiplicity, pos)
elif symbol == 'P3_121':
return sp_152(multiplicity, pos)
elif symbol == 'P3_212':
return sp_153(multiplicity, pos)
elif symbol == 'P3_221':
return sp_154(multiplicity, pos)
elif symbol == 'R32':
return sp_155_R(multiplicity, pos)
elif symbol == 'R32H':
return sp_155_H(multiplicity, pos)
elif symbol == 'P3m1':
return sp_156(multiplicity, pos)
elif symbol == 'P31m':
return sp_157(multiplicity, pos)
elif symbol == 'P3c1':
return sp_158(multiplicity, pos)
elif symbol == 'P31c':
return sp_159(multiplicity, pos)
elif symbol == 'R3m':
return sp_160_R(multiplicity, pos)
elif symbol == 'R3mH':
return sp_160_H(multiplicity, pos)
elif symbol == 'R3c':
return sp_161_R(multiplicity, pos)
elif symbol == 'R3cH':
return sp_161_H(multiplicity, pos)
elif symbol == 'P-31m':
return sp_162(multiplicity, pos)
elif symbol == 'P-31c':
return sp_163(multiplicity, pos)
elif symbol == 'P-3m1':
return sp_164(multiplicity, pos)
elif symbol == 'P-3c1':
return sp_165(multiplicity, pos)
elif symbol == 'R-3m':
return sp_166_R(multiplicity, pos)
elif symbol == 'R-3mH':
return sp_166_H(multiplicity, pos)
elif symbol == 'R-3c':
return sp_167_R(multiplicity, pos)
elif symbol == 'R-3cH':
return sp_167_H(multiplicity, pos)
elif symbol == 'P6':
return sp_168(multiplicity, pos)
elif symbol == 'P6_1':
return sp_169(multiplicity, pos)
elif symbol == 'P6_5':
return sp_170(multiplicity, pos)
elif symbol == 'P6_2':
return sp_171(multiplicity, pos)
elif symbol == 'P6_4':
return sp_172(multiplicity, pos)
elif symbol == 'P6_3':
return sp_173(multiplicity, pos)
elif symbol == 'P-6':
return sp_174(multiplicity, pos)
elif symbol == 'P6/m':
return sp_175(multiplicity, pos)
elif symbol == 'P6_3/m':
return sp_176(multiplicity, pos)
elif symbol == 'P622':
return sp_177(multiplicity, pos)
elif symbol == 'P6_122':
return sp_178(multiplicity, pos)
elif symbol == 'P6_522':
return sp_179(multiplicity, pos)
elif symbol == 'P6_222':
return sp_180(multiplicity, pos)
elif symbol == 'P6_422':
return sp_181(multiplicity, pos)
elif symbol == 'P6_322':
return sp_182(multiplicity, pos)
elif symbol == 'P6mm':
return sp_183(multiplicity, pos)
elif symbol == 'P6cc':
return sp_184(multiplicity, pos)
elif symbol == 'P6_3cm':
return sp_185(multiplicity, pos)
elif symbol == 'P6_3mc':
return sp_186(multiplicity, pos)
elif symbol == 'P-6m2':
return sp_187(multiplicity, pos)
elif symbol == 'P-6c2':
return sp_188(multiplicity, pos)
elif symbol == 'P-62m':
return sp_189(multiplicity, pos)
elif symbol == 'P-62c':
return sp_190(multiplicity, pos)
elif symbol == 'P6/mmm':
return sp_191(multiplicity, pos)
elif symbol == 'P6/mcc':
return sp_192(multiplicity, pos)
elif symbol == 'P6_3/mcm':
return sp_193(multiplicity, pos)
elif symbol == 'P6_3/mmc':
return sp_194(multiplicity, pos)
elif symbol == 'P23':
return sp_195(multiplicity, pos)
elif symbol == 'F23':
return sp_196(multiplicity, pos)
elif symbol == 'I23':
return sp_197(multiplicity, pos)
elif symbol == 'P2_13':
return sp_198(multiplicity, pos)
elif symbol == 'I2_13':
return sp_199(multiplicity, pos)
elif symbol == 'Pm-3':
return sp_200(multiplicity, pos)
elif symbol == 'Pn-3':
if not sp_201(multiplicity, pos):
return sp_201_s(multiplicity, pos)
else:
return sp_201(multiplicity, pos)
elif symbol == 'Fm-3':
return sp_202(multiplicity, pos)
elif symbol == 'Fd-3':
if not sp_203(multiplicity, pos):
return sp_203_s(multiplicity, pos)
else:
return sp_203(multiplicity, pos)
elif symbol == 'Im-3':
return sp_204(multiplicity, pos)
elif symbol == 'Pa-3':
return sp_205(multiplicity, pos)
elif symbol == 'Ia-3':
return sp_206(multiplicity, pos)
elif symbol == 'P432':
return sp_207(multiplicity, pos)
elif symbol == 'P4_232':
return sp_208(multiplicity, pos)
elif symbol == 'F432':
return sp_209(multiplicity, pos)
elif symbol == 'F4_132':
return sp_210(multiplicity, pos)
elif symbol == 'I432':
return sp_211(multiplicity, pos)
elif symbol == 'P4_332':
return sp_212(multiplicity, pos)
elif symbol == 'P4_132':
return sp_213(multiplicity, pos)
elif symbol == 'I4_132':
return sp_214(multiplicity, pos)
elif symbol == 'P-43m':
return sp_215(multiplicity, pos)
elif symbol == 'F-43m':
return sp_216(multiplicity, pos)
elif symbol == 'I-43m':
return sp_217(multiplicity, pos)
elif symbol == 'P-43n':
return sp_218(multiplicity, pos)
elif symbol == 'F-43c':
return sp_219(multiplicity, pos)
elif symbol == 'I-43d':
return sp_220(multiplicity, pos)
elif symbol == 'Pm-3m':
return sp_221(multiplicity, pos)
elif symbol == 'Pn-3n':
if not sp_222(multiplicity, pos):
return sp_222_s(multiplicity, pos)
else:
return sp_222(multiplicity, pos)
elif symbol == 'Pm-3n':
return sp_223(multiplicity, pos)
elif symbol == 'Pn-3m':
if not sp_224(multiplicity, pos):
return sp_224_s(multiplicity, pos)
else:
return sp_224(multiplicity, pos)
elif symbol == 'Fm-3m':
return sp_225(multiplicity, pos)
elif symbol == 'Fm-3c':
return sp_226(multiplicity, pos)
elif symbol == 'Fd-3m':
if not sp_227(multiplicity, pos):
return sp_227_s(multiplicity, pos)
else:
return sp_227(multiplicity, pos)
elif symbol == 'Fd-3c':
if not sp_228(multiplicity, pos):
return sp_228_s(multiplicity, pos)
else:
return sp_228(multiplicity, pos)
elif symbol == 'Im-3m':
return sp_229(multiplicity, pos)
elif symbol == 'Ia-3d':
return sp_230(multiplicity, pos)
def sp_1(multiplicity, pos):
if multiplicity != 1:
raise ValueError("It is not a P1 system!")
else:
return 'a'
def sp_2(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 1 and multiplicity != 2:
raise ValueError("It is not a P-1 system!")
elif multiplicity == 1:
symbol_set = np.array(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'])
bool_set = map(f, [[0., 0., 0.], [0., 0., 0.5], [0., 0.5, 0.], [0.5, 0., 0.], [0.5, 0.5, 0.], [0.5, 0., 0.5], [0., 0.5, 0.5], [0.5, 0.5, 0.5]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'i'
def sp_3_b(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 1 and multiplicity != 2:
raise ValueError("It is not a P2 system!")
elif multiplicity == 1:
symbol_set = np.array(['a', 'b', 'c', 'd'])
bool_set = map(f, [[0., pos[1], 0.], [0., pos[1], 0.5], [0.5, pos[1], 0.], [0.5, pos[1], 0.5]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'e'
def sp_3_c(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 1 and multiplicity != 2:
raise ValueError("It is not a P2 system!")
elif multiplicity == 1:
symbol_set = np.array(['a', 'b', 'c', 'd'])
bool_set = map(f, [[0., 0., pos[2]], [0.5, 0., pos[2]], [0., 0.5, pos[2]], [0.5, 0.5, pos[2]]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'e'
def sp_4_b(multiplicity, pos):
if multiplicity != 2:
raise ValueError("It is not a P2_1 system!")
else:
return 'a'
def sp_4_c(multiplicity, pos):
if multiplicity != 2:
raise ValueError("It is not a P2_1 system!")
else:
return 'a'
def sp_5_b(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 2 and multiplicity != 4:
raise ValueError("It is not a C2 system!")
elif multiplicity == 2:
symbol_set = np.array(['a', 'b'])
bool_set = map(f, [[0., pos[1], 0.], [0., pos[1], 0.5]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'c'
def sp_5_c(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 2 and multiplicity != 4:
raise ValueError("It is not a C2 system!")
elif multiplicity == 2:
symbol_set = np.array(['a', 'b'])
bool_set = map(f, [[0., 0., pos[2]], [0.5, 0., pos[2]]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'c'
def sp_6_b(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 1 and multiplicity != 2:
raise ValueError("It is not a Pm system!")
elif multiplicity == 1:
symbol_set = np.array(['a', 'b'])
bool_set = map(f, [[pos[0], 0., pos[2]], [pos[0], 0.5, pos[2]]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'c'
def sp_6_c(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 1 and multiplicity != 2:
raise ValueError("It is not a Pm system!")
elif multiplicity == 1:
symbol_set = np.array(['a', 'b'])
bool_set = map(f, [[pos[0], pos[1], 0.], [pos[0], pos[1], 0.5]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'c'
def sp_7_b(multiplicity, pos):
if multiplicity != 2:
raise ValueError("It is not a Pc system!")
else:
return 'a'
def sp_7_c(multiplicity, pos):
if multiplicity != 2:
raise ValueError("It is not a Pc system!")
else:
return 'a'
def sp_8_b(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 2 and multiplicity != 4:
raise ValueError("It is not a Cm system!")
elif multiplicity == 2:
symbol_set = np.array(['a'])
bool_set = map(f, [[pos[0], 0., pos[2]]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'b'
def sp_8_c(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 2 and multiplicity != 4:
raise ValueError("It is not a Cm system!")
elif multiplicity == 2:
symbol_set = np.array(['a'])
bool_set = map(f, [[pos[0], pos[1], 0.]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'b'
def sp_9_b(multiplicity, pos):
if multiplicity != 4:
raise ValueError("It is not a Cc system!")
else:
return 'a'
def sp_9_c(multiplicity, pos):
if multiplicity != 4:
raise ValueError("It is not a Cc system!")
else:
return 'a'
def sp_10_b(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 1 and multiplicity != 2 and multiplicity != 4:
raise ValueError("It is not a P2/m system!")
elif multiplicity == 1:
symbol_set = np.array(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'])
bool_set = map(f, [[0., 0., 0.], [0., 0.5, 0.], [0., 0., 0.5], [0.5, 0., 0.], [0.5, 0.5, 0.], [0., 0.5, 0.5], [0.5, 0., 0.5], [0.5, 0.5, 0.5]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
elif multiplicity == 2:
symbol_set = np.array(['i', 'j', 'k', 'l', 'm', 'n'])
bool_set = map(f, [[0., pos[1], 0.], [0.5, pos[1], 0.], [0., pos[1], 0.5], [0.5, pos[1], 0.5], [pos[0], 0., pos[2]], [pos[0], 0.5, pos[2]]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'o'
def sp_10_c(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 1 and multiplicity != 2 and multiplicity != 4:
raise ValueError("It is not a P2/m system!")
elif multiplicity == 1:
symbol_set = np.array(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'])
bool_set = map(f, [[0., 0., 0.], [0., 0., 0.5], [0.5, 0., 0.], [0., 0.5, 0.], [0., 0.5, 0.5], [0.5, 0., 0.5], [0.5, 0.5, 0.], [0.5, 0.5, 0.5]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
elif multiplicity == 2:
symbol_set = np.array(['i', 'j', 'k', 'l', 'm', 'n'])
bool_set = map(f, [[0., 0., pos[2]], [0., 0.5, pos[2]], [0.5, 0., pos[2]], [0.5, 0.5, pos[2]], [pos[0], pos[1], 0.], [pos[0], pos[1], 0.5]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'o'
def sp_11_b(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 2 and multiplicity != 4:
raise ValueError("It is not a P2_1/m system!")
elif multiplicity == 2:
symbol_set = np.array(['a', 'b', 'c', 'd', 'e'])
bool_set = map(f, [[0., 0., 0.], [0.5, 0., 0.], [0., 0., 0.5], [0.5, 0., 0.5], [pos[0], 0.25, pos[2]]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'f'
def sp_11_c(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 2 and multiplicity != 4:
raise ValueError("It is not a P2_1/m system!")
elif multiplicity == 2:
symbol_set = np.array(['a', 'b', 'c', 'd', 'e'])
bool_set = map(f, [[0., 0., 0.], [0., 0.5, 0.], [0.5, 0., 0.], [0.5, 0.5, 0.], [pos[0], pos[1], 0.25]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'f'
def sp_12_b(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 2 and multiplicity != 4 and multiplicity != 8:
raise ValueError("It is not a C2/m system!")
elif multiplicity == 2:
symbol_set = np.array(['a', 'b', 'c', 'd'])
bool_set = map(f, [[0., 0., 0.], [0., 0.5, 0.], [0., 0., 0.5], [0., 0.5, 0.5]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
elif multiplicity == 4:
symbol_set = np.array(['e', 'f', 'g', 'h', 'i'])
bool_set = map(f, [[0.25, 0.25, 0.], [0.25, 0.25, 0.5], [0., pos[1], 0.], [0., pos[1], 0.5], [pos[0], 0., pos[2]]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'j'
def sp_12_c(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 2 and multiplicity != 4 and multiplicity != 8:
raise ValueError("It is not a C2/m system!")
elif multiplicity == 2:
symbol_set = np.array(['a', 'b', 'c', 'd'])
bool_set = map(f, [[0., 0., 0.], [0., 0., 0.5], [0.5, 0., 0.], [0.5, 0., 0.5]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
elif multiplicity == 4:
symbol_set = np.array(['e', 'f', 'g', 'h', 'i'])
bool_set = map(f, [[0., 0.25, 0.25], [0.5, 0.25, 0.25], [0., 0., pos[2]], [0.5, 0., pos[2]], [pos[0], pos[1], 0.]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'j'
def sp_13_b(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 2 and multiplicity != 4:
raise ValueError("It is not a P2/c system!")
elif multiplicity == 2:
symbol_set = np.array(['a', 'b', 'c', 'd', 'e', 'f'])
bool_set = map(f, [[0., 0., 0.], [0.5, 0.5, 0.], [0., 0.5, 0.], [0.5, 0., 0.], [0., pos[1], 0.25], [0.5, pos[1], 0.25]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'g'
def sp_13_c(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 2 and multiplicity != 4:
raise ValueError("It is not a P2/c system!")
elif multiplicity == 2:
symbol_set = np.array(['a', 'b', 'c', 'd', 'e', 'f'])
bool_set = map(f, [[0., 0., 0.], [0., 0.5, 0.5], [0., 0., 0.5], [0., 0.5, 0.], [0.25, 0., pos[2]], [0.25, 0.5, pos[2]]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'g'
def sp_14_b(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 2 and multiplicity != 4:
raise ValueError("It is not a P2_1/c system!")
elif multiplicity == 2:
symbol_set = np.array(['a', 'b', 'c', 'd'])
bool_set = map(f, [[0., 0., 0.], [0.5, 0., 0.], [0., 0., 0.5], [0.5, 0., 0.5]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'e'
def sp_14_c(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 2 and multiplicity != 4:
raise ValueError("It is not a P2_1/c system!")
elif multiplicity == 2:
symbol_set = np.array(['a', 'b', 'c', 'd'])
bool_set = map(f, [[0., 0., 0.], [0., 0.5, 0.], [0.5, 0., 0.], [0.5, 0.5, 0.]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'e'
def sp_15_b(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 4 and multiplicity != 8:
raise ValueError("It is not a C2/c system!")
elif multiplicity == 4:
symbol_set = np.array(['a', 'b', 'c', 'd', 'e'])
bool_set = map(f, [[0., 0., 0.], [0., 0.5, 0.], [0.25, 0.25, 0.], [0.25, 0.25, 0.5], [0., pos[1], 0.25]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'f'
def sp_15_c(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 4 and multiplicity != 8:
raise ValueError("It is not a C2/c system!")
elif multiplicity == 4:
symbol_set = np.array(['a', 'b', 'c', 'd', 'e'])
bool_set = map(f, [[0., 0., 0.], [0., 0., 0.5], [0., 0.25, 0.25], [0.5, 0.25, 0.25], [0.25, 0., pos[2]]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
else:
return 'f'
def sp_16(multiplicity, pos):
f = lambda x: True if np.all(abs(x - pos) < 1e-2) else False
if multiplicity != 1 and multiplicity != 2 and multiplicity != 4:
raise ValueError("It is not a P222 system!")
elif multiplicity == 1:
symbol_set = np.array(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'])
bool_set = map(f, [[0., 0., 0.], [0.5, 0., 0.], [0., 0.5, 0.], [0., 0., 0.5], [0.5, 0.5, 0.], [0.5, 0., 0.5], [0., 0.5, 0.5], [0.5, 0.5, 0.5]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else:
return False
elif multiplicity == 2:
symbol_set = np.array(['i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't'])
bool_set = map(f, [[pos[0], 0., 0.], [pos[0], 0., 0.5], [pos[0], 0.5, 0.], [pos[0], 0.5, 0.5], [0., pos[1], 0.], [0., pos[1], 0.5], \
[0.5, pos[1], 0.], [0.5, pos[1], 0.5], [0., 0., pos[2]], [0.5, 0., pos[2]], [0., 0.5, pos[2]], [0.5, 0.5, pos[2]]])
bool_set = np.array(bool_set)
if np.any(bool_set):
return symbol_set[bool_set][0]
else: