-
Notifications
You must be signed in to change notification settings - Fork 0
/
wykoffsss.py
5637 lines (5397 loc) · 199 KB
/
wykoffsss.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
# Copyright ? 2016 YunXing Zuo
import numpy as np
from groups import SpaceGroup
from numpy.random import rand
__author__ = 'YunXing Zuo'
__email__ = '[email protected]'
__date__ = 'Dec. 8, 2016'
def pos_gen_wyckoff_positions(symbol, letter, xyz = None):
if xyz is None:
xyz = [rand(), rand(), rand()]
if symbol == 'P1':
return sp_1_pos(letter, xyz)
elif symbol == 'P-1':
return sp_2_pos(letter, xyz)
elif symbol == 'P2':
return sp_3_pos(letter, xyz)
elif symbol == 'P2_1':
return sp_4_pos(letter, xyz)
elif symbol == 'C2':
return sp_5_pos(letter, xyz)
elif symbol == 'Pm':
return sp_6_pos(letter, xyz)
elif symbol == 'Pc':
return sp_7_pos(letter, xyz)
elif symbol == 'Cm':
return sp_8_pos(letter, xyz)
elif symbol == 'Cc':
return sp_9_pos(letter, xyz)
elif symbol == 'P2/m':
return sp_10_pos(letter, xyz)
elif symbol == 'P2_1/m':
return sp_11_pos(letter, xyz)
elif symbol == 'C2/m':
return sp_12_pos(letter, xyz)
elif symbol == 'P2/c':
return sp_13_pos(letter, xyz)
elif symbol == 'P2_1/c':
return sp_14_pos(letter, xyz)
elif symbol == 'C2/c':
return sp_15_pos(letter, xyz)
elif symbol == 'P222':
return sp_16_pos(letter, xyz)
elif symbol == 'P222_1':
return sp_17_pos(letter, xyz)
elif symbol == 'P2_12_12':
return sp_18_pos(letter, xyz)
elif symbol == 'P2_12_12_1':
return sp_19_pos(letter, xyz)
elif symbol == 'C222_1':
return sp_20_pos(letter, xyz)
elif symbol == 'C222':
return sp_21_pos(letter, xyz)
elif symbol == 'F222':
return sp_22_pos(letter, xyz)
elif symbol == 'I222':
return sp_23_pos(letter, xyz)
elif symbol == 'I2_12_12_1':
return sp_24_pos(letter, xyz)
elif symbol == 'Pmm2':
return sp_25_pos(letter, xyz)
elif symbol == 'Pmc2_1':
return sp_26_pos(letter, xyz)
elif symbol == 'Pcc2':
return sp_27_pos(letter, xyz)
elif symbol == 'Pma2':
return sp_28_pos(letter, xyz)
elif symbol == 'Pca2_1':
return sp_29_pos(letter, xyz)
elif symbol == 'Pnc2':
return sp_30_pos(letter, xyz)
elif symbol == 'Pmn2_1':
return sp_31_pos(letter, xyz)
elif symbol == 'Pba2':
return sp_32_pos(letter, xyz)
elif symbol == 'Pna2_1':
return sp_33_pos(letter, xyz)
elif symbol == 'Pnn2':
return sp_34_pos(letter, xyz)
elif symbol == 'Cmm2':
return sp_35_pos(letter, xyz)
elif symbol == 'Cmc2_1':
return sp_36_pos(letter, xyz)
elif symbol == 'Ccc2':
return sp_37_pos(letter, xyz)
elif symbol == 'Amm2':
return sp_38_pos(letter, xyz)
elif symbol == 'Aem2':
return sp_39_pos(letter, xyz)
elif symbol == 'Ama2':
return sp_40_pos(letter, xyz)
elif symbol == 'Aea2':
return sp_41_pos(letter, xyz)
elif symbol == 'Fmm2':
return sp_42_pos(letter, xyz)
elif symbol == 'Fdd2':
return sp_43_pos(letter, xyz)
elif symbol == 'Imm2':
return sp_44_pos(letter, xyz)
elif symbol == 'Iba2':
return sp_45_pos(letter, xyz)
elif symbol == 'Ima2':
return sp_46_pos(letter, xyz)
elif symbol == 'Pmmm':
return sp_47_pos(letter, xyz)
elif symbol == 'Pnnn':
return sp_48_pos(letter, xyz)
elif symbol == 'Pccm':
return sp_49_pos(letter, xyz)
elif symbol == 'Pban':
return sp_50_pos(letter, xyz)
elif symbol == 'Pmma':
return sp_51_pos(letter, xyz)
elif symbol == 'Pnna':
return sp_52_pos(letter, xyz)
elif symbol == 'Pmna':
return sp_53_pos(letter, xyz)
elif symbol == 'Pcca':
return sp_54_pos(letter, xyz)
elif symbol == 'Pbam':
return sp_55_pos(letter, xyz)
elif symbol == 'Pccn':
return sp_56_pos(letter, xyz)
elif symbol == 'Pbcm':
return sp_57_pos(letter, xyz)
elif symbol == 'Pnnm':
return sp_58_pos(letter, xyz)
elif symbol == 'Pmmn':
return sp_59_pos(letter, xyz)
elif symbol == 'Pbcn':
return sp_60_pos(letter, xyz)
elif symbol == 'Pbca':
return sp_61_pos(letter, xyz)
elif symbol == 'Pnma':
return sp_62_pos(letter, xyz)
elif symbol == 'Cmcm':
return sp_63_pos(letter, xyz)
elif symbol == 'Cmce':
return sp_64_pos(letter, xyz)
elif symbol == 'Cmmm':
return sp_65_pos(letter, xyz)
elif symbol == 'Cccm':
return sp_66_pos(letter, xyz)
elif symbol == 'Cmme':
return sp_67_pos(letter, xyz)
elif symbol == 'Ccce':
return sp_68_pos(letter, xyz)
elif symbol == 'Fmmm':
return sp_69_pos(letter, xyz)
elif symbol == 'Fddd':
return sp_70_pos(letter, xyz)
elif symbol == 'Immm':
return sp_71_pos(letter, xyz)
elif symbol == 'Ibam':
return sp_72_pos(letter, xyz)
elif symbol == 'Ibca':
return sp_73_pos(letter, xyz)
elif symbol == 'Imma':
return sp_74_pos(letter, xyz)
elif symbol == 'P4':
return sp_75_pos(letter, xyz)
elif symbol == 'P4_1':
return sp_76_pos(letter, xyz)
elif symbol == 'P4_2':
return sp_77_pos(letter, xyz)
elif symbol == 'P4_3':
return sp_78_pos(letter, xyz)
elif symbol == 'I4':
return sp_79_pos(letter, xyz)
elif symbol == 'I4_1':
return sp_80_pos(letter, xyz)
elif symbol == 'P-4':
return sp_81_pos(letter, xyz)
elif symbol == 'I-4':
return sp_82_pos(letter, xyz)
elif symbol == 'P4/m':
return sp_83_pos(letter, xyz)
elif symbol == 'P4_2/m':
return sp_84_pos(letter, xyz)
elif symbol == 'P4/n':
return sp_85_pos(letter, xyz)
elif symbol == 'P4_2/n':
return sp_86_pos(letter, xyz)
elif symbol == 'I4/m':
return sp_87_pos(letter, xyz)
elif symbol == 'I4_1/a':
return sp_88_pos(letter, xyz)
elif symbol == 'P422':
return sp_89_pos(letter, xyz)
elif symbol == 'P42_12':
return sp_90_pos(letter, xyz)
elif symbol == 'P4_122':
return sp_91_pos(letter, xyz)
elif symbol == 'P4_12_12':
return sp_92_pos(letter, xyz)
elif symbol == 'P4_222':
return sp_93_pos(letter, xyz)
elif symbol == 'P4_22_12':
return sp_94_pos(letter, xyz)
elif symbol == 'P4_322':
return sp_95_pos(letter, xyz)
elif symbol == 'P4_32_12':
return sp_96_pos(letter, xyz)
elif symbol == 'I422':
return sp_97_pos(letter, xyz)
elif symbol == 'I4_122':
return sp_98_pos(letter, xyz)
elif symbol == 'P4mm':
return sp_99_pos(letter, xyz)
elif symbol == 'P4bm':
return sp_100_pos(letter, xyz)
elif symbol == 'P4_2cm':
return sp_101_pos(letter, xyz)
elif symbol == 'P4_2nm':
return sp_102_pos(letter, xyz)
elif symbol == 'P4cc':
return sp_103_pos(letter, xyz)
elif symbol == 'P4nc':
return sp_104_pos(letter, xyz)
elif symbol == 'P4_2mc':
return sp_105_pos(letter, xyz)
elif symbol == 'P4_2bc':
return sp_106_pos(letter, xyz)
elif symbol == 'I4mm':
return sp_107_pos(letter, xyz)
elif symbol == 'I4cm':
return sp_108_pos(letter, xyz)
elif symbol == 'I4_1md':
return sp_109_pos(letter, xyz)
elif symbol == 'I4_1cd':
return sp_110_pos(letter, xyz)
elif symbol == 'P-42m':
return sp_111_pos(letter, xyz)
elif symbol == 'P-42c':
return sp_112_pos(letter, xyz)
elif symbol == 'P-42_1m':
return sp_113_pos(letter, xyz)
elif symbol == 'P-42_1c':
return sp_114_pos(letter, xyz)
elif symbol == 'P-4m2':
return sp_115_pos(letter, xyz)
elif symbol == 'P-4c2':
return sp_116_pos(letter, xyz)
elif symbol == 'P-4b2':
return sp_117_pos(letter, xyz)
elif symbol == 'P-4n2':
return sp_118_pos(letter, xyz)
elif symbol == 'I-4m2':
return sp_119_pos(letter, xyz)
elif symbol == 'I-4c2':
return sp_120_pos(letter, xyz)
elif symbol == 'I-42m':
return sp_121_pos(letter, xyz)
elif symbol == 'I-42d':
return sp_122_pos(letter, xyz)
elif symbol == 'P4/mmm':
return sp_123_pos(letter, xyz)
elif symbol == 'P4/mcc':
return sp_124_pos(letter, xyz)
elif symbol == 'P4/nbm':
return sp_125_pos(letter, xyz)
elif symbol == 'P4/nnc':
return sp_126_pos(letter, xyz)
elif symbol == 'P4/mbm':
return sp_127_pos(letter, xyz)
elif symbol == 'P4/mnc':
return sp_128_pos(letter, xyz)
elif symbol == 'P4/nmm':
return sp_129_pos(letter, xyz)
elif symbol == 'P4/ncc':
return sp_130_pos(letter, xyz)
elif symbol == 'P4_2/mmc':
return sp_131_pos(letter, xyz)
elif symbol == 'P4_2/mcm':
return sp_132_pos(letter, xyz)
elif symbol == 'P4_2/nbc':
return sp_133_pos(letter, xyz)
elif symbol == 'P4_2/nnm':
return sp_134_pos(letter, xyz)
elif symbol == 'P4_2/mbc':
return sp_135_pos(letter, xyz)
elif symbol == 'P4_2/mnm':
return sp_136_pos(letter, xyz)
elif symbol == 'P4_2/nmc':
return sp_137_pos(letter, xyz)
elif symbol == 'P4_2/ncm':
return sp_138_pos(letter, xyz)
elif symbol == 'I4/mmm':
return sp_139_pos(letter, xyz)
elif symbol == 'I4/mcm':
return sp_140_pos(letter, xyz)
elif symbol == 'I4_1/amd':
return sp_141_pos(letter, xyz)
elif symbol == 'I4_1/acd':
return sp_142_pos(letter, xyz)
elif symbol == 'P3':
return sp_143_pos(letter, xyz)
elif symbol == 'P3_1':
return sp_144_pos(letter, xyz)
elif symbol == 'P3_2':
return sp_145_pos(letter, xyz)
elif symbol == 'R3':
return sp_146_pos_R(letter, xyz)
elif symbol == 'R3H':
return sp_146_pos_H(letter, xyz)
elif symbol == 'P-3':
return sp_147_pos(letter, xyz)
elif symbol == 'R-3':
return sp_148_pos_R(letter, xyz)
elif symbol == 'R-3H':
return sp_148_pos_H(letter, xyz)
elif symbol == 'P312':
return sp_149_pos(letter, xyz)
elif symbol == 'P321':
return sp_150_pos(letter, xyz)
elif symbol == 'P3_112':
return sp_151_pos(letter, xyz)
elif symbol == 'P3_121':
return sp_152_pos(letter, xyz)
elif symbol == 'P3_212':
return sp_153_pos(letter, xyz)
elif symbol == 'P3_221':
return sp_154_pos(letter, xyz)
elif symbol == 'R32':
return sp_155_pos_R(letter, xyz)
elif symbol == 'R32H':
return sp_155_pos_H(letter, xyz)
elif symbol == 'P3m1':
return sp_156_pos(letter, xyz)
elif symbol == 'P31m':
return sp_157_pos(letter, xyz)
elif symbol == 'P3c1':
return sp_158_pos(letter, xyz)
elif symbol == 'P31c':
return sp_159_pos(letter, xyz)
elif symbol == 'R3m':
return sp_160_pos_R(letter, xyz)
elif symbol == 'R3mH':
return sp_160_pos_H(letter, xyz)
elif symbol == 'R3c':
return sp_161_pos_R(letter, xyz)
elif symbol == 'R3cH':
return sp_161_pos_H(letter, xyz)
elif symbol == 'P-31m':
return sp_162_pos(letter, xyz)
elif symbol == 'P-31c':
return sp_163_pos(letter, xyz)
elif symbol == 'P-3m1':
return sp_164_pos(letter, xyz)
elif symbol == 'P-3c1':
return sp_165_pos(letter, xyz)
elif symbol == 'R-3m':
return sp_166_pos_R(letter, xyz)
elif symbol == 'R-3mH':
return sp_166_pos_H(letter, xyz)
elif symbol == 'R-3c':
return sp_167_pos_R(letter, xyz)
elif symbol == 'R-3cH':
return sp_167_pos_H(letter, xyz)
elif symbol == 'P6':
return sp_168_pos(letter, xyz)
elif symbol == 'P6_1':
return sp_169_pos(letter, xyz)
elif symbol == 'P6_5':
return sp_170_pos(letter, xyz)
elif symbol == 'P6_2':
return sp_171_pos(letter, xyz)
elif symbol == 'P6_4':
return sp_172_pos(letter, xyz)
elif symbol == 'P6_3':
return sp_173_pos(letter, xyz)
elif symbol == 'P-6':
return sp_174_pos(letter, xyz)
elif symbol == 'P6/m':
return sp_175_pos(letter, xyz)
elif symbol == 'P6_3/m':
return sp_176_pos(letter, xyz)
elif symbol == 'P622':
return sp_177_pos(letter, xyz)
elif symbol == 'P6_122':
return sp_178_pos(letter, xyz)
elif symbol == 'P6_522':
return sp_179_pos(letter, xyz)
elif symbol == 'P6_222':
return sp_180_pos(letter, xyz)
elif symbol == 'P6_422':
return sp_181_pos(letter, xyz)
elif symbol == 'P6_322':
return sp_182_pos(letter, xyz)
elif symbol == 'P6mm':
return sp_183_pos(letter, xyz)
elif symbol == 'P6cc':
return sp_184_pos(letter, xyz)
elif symbol == 'P6_3cm':
return sp_185_pos(letter, xyz)
elif symbol == 'P6_3mc':
return sp_186_pos(letter, xyz)
elif symbol == 'P-6m2':
return sp_187_pos(letter, xyz)
elif symbol == 'P-6c2':
return sp_188_pos(letter, xyz)
elif symbol == 'P-62m':
return sp_189_pos(letter, xyz)
elif symbol == 'P-62c':
return sp_190_pos(letter, xyz)
elif symbol == 'P6/mmm':
return sp_191_pos(letter, xyz)
elif symbol == 'P6/mcc':
return sp_192_pos(letter, xyz)
elif symbol == 'P6_3/mcm':
return sp_193_pos(letter, xyz)
elif symbol == 'P6_3/mmc':
return sp_194_pos(letter, xyz)
elif symbol == 'P23':
return sp_195_pos(letter, xyz)
elif symbol == 'F23':
return sp_196_pos(letter, xyz)
elif symbol == 'I23':
return sp_197_pos(letter, xyz)
elif symbol == 'P2_13':
return sp_198_pos(letter, xyz)
elif symbol == 'I2_13':
return sp_199_pos(letter, xyz)
elif symbol == 'Pm-3':
return sp_200_pos(letter, xyz)
elif symbol == 'Pn-3':
return sp_201_pos(letter, xyz)
elif symbol == 'Fm-3':
return sp_202_pos(letter, xyz)
elif symbol == 'Fd-3':
return sp_203_pos(letter, xyz)
elif symbol == 'Im-3':
return sp_204_pos(letter, xyz)
elif symbol == 'Pa-3':
return sp_205_pos(letter, xyz)
elif symbol == 'Ia-3':
return sp_206_pos(letter, xyz)
elif symbol == 'P432':
return sp_207_pos(letter, xyz)
elif symbol == 'P4_232':
return sp_208_pos(letter, xyz)
elif symbol == 'F432':
return sp_209_pos(letter, xyz)
elif symbol == 'F4_132':
return sp_210_pos(letter, xyz)
elif symbol == 'I432':
return sp_211_pos(letter, xyz)
elif symbol == 'P4_332':
return sp_212_pos(letter, xyz)
elif symbol == 'P4_132':
return sp_213_pos(letter, xyz)
elif symbol == 'I4_132':
return sp_214_pos(letter, xyz)
elif symbol == 'P-43m':
return sp_215_pos(letter, xyz)
elif symbol == 'F-43m':
return sp_216_pos(letter, xyz)
elif symbol == 'I-43m':
return sp_217_pos(letter, xyz)
elif symbol == 'P-43n':
return sp_218_pos(letter, xyz)
elif symbol == 'F-43c':
return sp_219_pos(letter, xyz)
elif symbol == 'I-43d':
return sp_220_pos(letter, xyz)
elif symbol == 'Pm-3m':
return sp_221_pos(letter, xyz)
elif symbol == 'Pn-3n':
return sp_222_pos(letter, xyz)
elif symbol == 'Pm-3n':
return sp_223_pos(letter, xyz)
elif symbol == 'Pn-3m':
return sp_224_pos(letter, xyz)
elif symbol == 'Fm-3m':
return sp_225_pos(letter, xyz)
elif symbol == 'Fm-3c':
return sp_226_pos(letter, xyz)
elif symbol == 'Fd-3m':
return sp_227_pos(letter, xyz)
elif symbol == 'Fd-3c':
return sp_228_pos(letter, xyz)
elif symbol == 'Im-3m':
return sp_229_pos(letter, xyz)
elif symbol == 'Ia-3d':
return sp_230_pos(letter, xyz)
def sp_1_pos(letter, xyz):
letters_selection = ['a']
spg = SpaceGroup('P1')
if not letter in letters_selection:
raise ValueError("It is not a P1 wyckoff position!")
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_2_pos(letter, xyz):
letters_selection = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
spg = SpaceGroup('P-1')
if not letter in letters_selection:
raise ValueError("It is not a P-1 wyckoff position!")
elif letter == 'a':
return spg.get_orbit([0., 0., 0.])
elif letter == 'b':
return spg.get_orbit([0., 0., 0.5])
elif letter == 'c':
return spg.get_orbit([0., 0.5, 0.])
elif letter == 'd':
return spg.get_orbit([0.5, 0., 0.])
elif letter == 'e':
return spg.get_orbit([0.5, 0.5, 0.])
elif letter == 'f':
return spg.get_orbit([0.5, 0., 0.5])
elif letter == 'g':
return spg.get_orbit([0., 0.5, 0.5])
elif letter == 'h':
return spg.get_orbit([0.5, 0.5, 0.5])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_3_pos(letter, xyz):
letters_selection = ['a', 'b', 'c', 'd', 'e']
spg = SpaceGroup('P2')
if not letter in letters_selection:
raise ValueError("It is not a P2 wyckoff position!")
elif letter == 'a':
return spg.get_orbit([0., xyz[1], 0.])
elif letter == 'b':
return spg.get_orbit([0., xyz[1], 0.5])
elif letter == 'c':
return spg.get_orbit([0.5, xyz[1], 0.])
elif letter == 'd':
return spg.get_orbit([0.5, xyz[1], 0.5])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_4_pos(letter, xyz):
letters_selection = ['a']
spg = SpaceGroup('P2_1')
if not letter in letters_selection:
raise ValueError("It is not a P2_1 wyckoff position!")
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_5_pos(letter, xyz):
letters_selection = ['a', 'b', 'c']
spg = SpaceGroup('C2')
if not letter in letters_selection:
raise ValueError("It is not a C2 wyckoff position!")
elif letter == 'a':
return spg.get_orbit([0., xyz[1], 0.])
elif letter == 'b':
return spg.get_orbit([0., xyz[1], 0.5])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_6_pos(letter, xyz):
letters_selection = ['a', 'b', 'c']
spg = SpaceGroup('Pm')
if not letter in letters_selection:
raise ValueError("It is not a Pm wyckoff position!")
elif letter == 'a':
return spg.get_orbit([xyz[0], 0., xyz[2]])
elif letter == 'b':
return spg.get_orbit([xyz[0], 0.5, xyz[2]])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_7_pos(letter, xyz):
letters_selection = ['a']
spg = SpaceGroup('Pc')
if not letter in letters_selection:
raise ValueError("It is not a Pc wyckoff position!")
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_8_pos(letter, xyz):
letters_selection = ['a', 'b']
spg = SpaceGroup('Cm')
if not letter in letters_selection:
raise ValueError("It is not a Cm wyckoff position!")
elif letter == 'a':
return spg.get_orbit([xyz[0], 0., xyz[2]])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_9_pos(letter, xyz):
letters_selection = ['a']
spg = SpaceGroup('Cc')
if not letter in letters_selection:
raise ValueError("It is not a Cc wyckoff position!")
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_10_pos(letter, xyz):
letters_selection = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o']
spg = SpaceGroup('P2/m')
if not letter in letters_selection:
raise ValueError("It is not a P2/m wyckoff position!")
elif letter == 'a':
return spg.get_orbit([0., 0., 0.])
elif letter == 'b':
return spg.get_orbit([0., 0.5, 0.])
elif letter == 'c':
return spg.get_orbit([0., 0., 0.5])
elif letter == 'd':
return spg.get_orbit([0.5, 0., 0.])
elif letter == 'e':
return spg.get_orbit([0.5, 0.5, 0.])
elif letter == 'f':
return spg.get_orbit([0., 0.5, 0.5])
elif letter == 'g':
return spg.get_orbit([0.5, 0., 0.5])
elif letter == 'h':
return spg.get_orbit([0.5, 0.5, 0.5])
elif letter == 'i':
return spg.get_orbit([0., xyz[1], 0.])
elif letter == 'j':
return spg.get_orbit([0.5, xyz[1], 0.])
elif letter == 'k':
return spg.get_orbit([0., xyz[1], 0.5])
elif letter == 'l':
return spg.get_orbit([0.5, xyz[1], 0.5])
elif letter == 'm':
return spg.get_orbit([xyz[0], 0., xyz[2]])
elif letter == 'n':
return spg.get_orbit([xyz[0], 0.5, xyz[2]])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_11_pos(letter, xyz):
letters_selection = ['a', 'b', 'c', 'd', 'e', 'f']
spg = SpaceGroup('P2_1/m')
if not letter in letters_selection:
raise ValueError("It is not a P2_1/m wyckoff position!")
elif letter == 'a':
return spg.get_orbit([0., 0., 0.])
elif letter == 'b':
return spg.get_orbit([0.5, 0., 0.])
elif letter == 'c':
return spg.get_orbit([0., 0., 0.5])
elif letter == 'd':
return spg.get_orbit([0.5, 0., 0.5])
elif letter == 'e':
return spg.get_orbit([xyz[0], 0.25, xyz[2]])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_12_pos(letter, xyz):
letters_selection = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
spg = SpaceGroup('C2/m')
if not letter in letters_selection:
raise ValueError("It is not a C2/m wyckoff position!")
elif letter == 'a':
return spg.get_orbit([0., 0., 0.])
elif letter == 'b':
return spg.get_orbit([0., 0.5, 0.])
elif letter == 'c':
return spg.get_orbit([0., 0., 0.5])
elif letter == 'd':
return spg.get_orbit([0., 0.5, 0.5])
elif letter == 'e':
return spg.get_orbit([0.25, 0.25, 0.])
elif letter == 'f':
return spg.get_orbit([0.25, 0.25, 0.5])
elif letter == 'g':
return spg.get_orbit([0., xyz[1], 0.])
elif letter == 'h':
return spg.get_orbit([0., xyz[1], 0.5])
elif letter == 'i':
return spg.get_orbit([xyz[0], 0., xyz[2]])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_13_pos(letter, xyz):
letters_selection = ['a', 'b', 'c', 'd', 'e', 'f', 'g']
spg = SpaceGroup('P2/c')
if not letter in letters_selection:
raise ValueError("It is not a P2/c wyckoff position!")
elif letter == 'a':
return spg.get_orbit([0., 0., 0.])
elif letter == 'b':
return spg.get_orbit([0.5, 0.5, 0.])
elif letter == 'c':
return spg.get_orbit([0., 0.5, 0.])
elif letter == 'd':
return spg.get_orbit([0.5, 0., 0.])
elif letter == 'e':
return spg.get_orbit([0., xyz[1], 0.25])
elif letter == 'f':
return spg.get_orbit([0.5, xyz[1], 0.25])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_14_pos(letter, xyz):
letters_selection = ['a', 'b', 'c', 'd', 'e']
spg = SpaceGroup('P2_1/c')
if not letter in letters_selection:
raise ValueError("It is not a P2_1/c wyckoff position!")
elif letter == 'a':
return spg.get_orbit([0., 0., 0.])
elif letter == 'b':
return spg.get_orbit([0.5, 0., 0.])
elif letter == 'c':
return spg.get_orbit([0., 0., 0.5])
elif letter == 'd':
return spg.get_orbit([0.5, 0., 0.5])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_15_pos(letter, xyz):
letters_selection = ['a', 'b', 'c', 'd', 'e', 'f']
spg = SpaceGroup('C2/c')
if not letter in letters_selection:
raise ValueError("It is not a C2/c wyckoff position!")
elif letter == 'a':
return spg.get_orbit([0., 0., 0.])
elif letter == 'b':
return spg.get_orbit([0., 0.5, 0.])
elif letter == 'c':
return spg.get_orbit([0.25, 0.25, 0.])
elif letter == 'd':
return spg.get_orbit([0.25, 0.25, 0.5])
elif letter == 'e':
return spg.get_orbit([0., xyz[1], 0.25])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_16_pos(letter, xyz):
letters_selection = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u']
spg = SpaceGroup('P222')
if not letter in letters_selection:
raise ValueError("It is not a P222 wyckoff position!")
elif letter == 'a':
return spg.get_orbit([0., 0., 0.])
elif letter == 'b':
return spg.get_orbit([0.5, 0., 0.])
elif letter == 'c':
return spg.get_orbit([0., 0.5, 0.])
elif letter == 'd':
return spg.get_orbit([0., 0., 0.5])
elif letter == 'e':
return spg.get_orbit([0.5, 0.5, 0.])
elif letter == 'f':
return spg.get_orbit([0.5, 0., 0.5])
elif letter == 'g':
return spg.get_orbit([0., 0.5, 0.5])
elif letter == 'h':
return spg.get_orbit([0.5, 0.5, 0.5])
elif letter == 'i':
return spg.get_orbit([xyz[0], 0., 0.])
elif letter == 'j':
return spg.get_orbit([xyz[0], 0., 0.5])
elif letter == 'k':
return spg.get_orbit([xyz[0], 0.5, 0.])
elif letter == 'l':
return spg.get_orbit([xyz[0], 0.5, 0.5])
elif letter == 'm':
return spg.get_orbit([0., xyz[1], 0.])
elif letter == 'n':
return spg.get_orbit([0., xyz[1], 0.5])
elif letter == 'o':
return spg.get_orbit([0.5, xyz[1], 0.])
elif letter == 'p':
return spg.get_orbit([0.5, xyz[1], 0.5])
elif letter == 'q':
return spg.get_orbit([0., 0., xyz[2]])
elif letter == 'r':
return spg.get_orbit([0.5, 0., xyz[2]])
elif letter == 's':
return spg.get_orbit([0., 0.5, xyz[2]])
elif letter == 't':
return spg.get_orbit([0.5, 0.5, xyz[2]])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_17_pos(letter, xyz):
letters_selection = ['a', 'b', 'c', 'd', 'e']
spg = SpaceGroup('P222_1')
if not letter in letters_selection:
raise ValueError("It is not a P222_1 wyckoff position!")
elif letter == 'a':
return spg.get_orbit([xyz[0], 0., 0.])
elif letter == 'b':
return spg.get_orbit([xyz[0], 0.5, 0.])
elif letter == 'c':
return spg.get_orbit([0., xyz[1], 0.25])
elif letter == 'd':
return spg.get_orbit([0.5, xyz[1], 0.25])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_18_pos(letter, xyz):
letters_selection = ['a', 'b', 'c']
spg = SpaceGroup('P2_12_12')
if not letter in letters_selection:
raise ValueError("It is not a P2_12_12 wyckoff position!")
elif letter == 'a':
return spg.get_orbit([0., 0., xyz[2]])
elif letter == 'b':
return spg.get_orbit([0., 0.5, xyz[2]])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_19_pos(letter, xyz):
letters_selection = ['a']
spg = SpaceGroup('P2_12_12_1')
if not letter in letters_selection:
raise ValueError("It is not a P2_12_12_1 wyckoff position!")
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_20_pos(letter, xyz):
letters_selection = ['a', 'b', 'c']
spg = SpaceGroup('C222_1')
if not letter in letters_selection:
raise ValueError("It is not a C222_1 wyckoff position!")
elif letter == 'a':
return spg.get_orbit([xyz[0], 0., 0.])
elif letter == 'b':
return spg.get_orbit([0., xyz[1], 0.25])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_21_pos(letter, xyz):
letters_selection = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l']
spg = SpaceGroup('C222')
if not letter in letters_selection:
raise ValueError("It is not a C222 wyckoff position!")
elif letter == 'a':
return spg.get_orbit([0., 0., 0.])
elif letter == 'b':
return spg.get_orbit([0., 0.5, 0.])
elif letter == 'c':
return spg.get_orbit([0.5, 0., 0.5])
elif letter == 'd':
return spg.get_orbit([0., 0., 0.5])
elif letter == 'e':
return spg.get_orbit([xyz[0], 0., 0.])
elif letter == 'f':
return spg.get_orbit([xyz[0], 0., 0.5])
elif letter == 'g':
return spg.get_orbit([0., xyz[1], 0.])
elif letter == 'h':
return spg.get_orbit([0., xyz[1], 0.5])
elif letter == 'i':
return spg.get_orbit([0., 0., xyz[2]])
elif letter == 'j':
return spg.get_orbit([0., 0.5, xyz[2]])
elif letter == 'k':
return spg.get_orbit([0.25, 0.25, xyz[2]])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_22_pos(letter, xyz):
letters_selection = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k']
spg = SpaceGroup('F222')
if not letter in letters_selection:
raise ValueError("It is not a F222 wyckoff position!")
elif letter == 'a':
return spg.get_orbit([0., 0., 0.])
elif letter == 'b':
return spg.get_orbit([0., 0., 0.5])
elif letter == 'c':
return spg.get_orbit([0.25, 0.25, 0.25])
elif letter == 'd':
return spg.get_orbit([0.25, 0.25, 0.75])
elif letter == 'e':
return spg.get_orbit([xyz[0], 0., 0.])
elif letter == 'f':
return spg.get_orbit([0., xyz[1], 0.])
elif letter == 'g':
return spg.get_orbit([0., 0., xyz[2]])
elif letter == 'h':
return spg.get_orbit([0.25, 0.25, xyz[2]])
elif letter == 'i':
return spg.get_orbit([0.25, xyz[1], 0.25])
elif letter == 'j':
return spg.get_orbit([xyz[0], 0.25, 0.25])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_23_pos(letter, xyz):
letters_selection = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k']
spg = SpaceGroup('I222')
if not letter in letters_selection:
raise ValueError("It is not a I222 wyckoff position!")
elif letter == 'a':
return spg.get_orbit([0., 0., 0.])
elif letter == 'b':
return spg.get_orbit([0.5, 0., 0.])
elif letter == 'c':
return spg.get_orbit([0., 0., 0.5])
elif letter == 'd':
return spg.get_orbit([0., 0.5, 0.])
elif letter == 'e':
return spg.get_orbit([xyz[0], 0., 0.])
elif letter == 'f':
return spg.get_orbit([xyz[0], 0., 0.5])
elif letter == 'g':
return spg.get_orbit([0., xyz[1], 0.])
elif letter == 'h':
return spg.get_orbit([0.5, xyz[1], 0.])
elif letter == 'i':
return spg.get_orbit([0., 0., xyz[2]])
elif letter == 'j':
return spg.get_orbit([0., 0.5, xyz[2]])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_24_pos(letter, xyz):
letters_selection = ['a', 'b', 'c', 'd']
spg = SpaceGroup('I2_12_12_1')
if not letter in letters_selection:
raise ValueError("It is not a I2_12_12_1 wyckoff position!")
elif letter == 'a':
return spg.get_orbit([xyz[0], 0., 0.25])
elif letter == 'b':
return spg.get_orbit([0.25, xyz[1], 0.])
elif letter == 'c':
return spg.get_orbit([0., 0.25, xyz[2]])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_25_pos(letter, xyz):
letters_selection = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
spg = SpaceGroup('Pmm2')
if not letter in letters_selection:
raise ValueError("It is not a Pmm2 wyckoff position!")
elif letter == 'a':
return spg.get_orbit([0., 0., xyz[2]])
elif letter == 'b':
return spg.get_orbit([0., 0.5, xyz[2]])
elif letter == 'c':
return spg.get_orbit([0.5, 0., xyz[2]])
elif letter == 'd':
return spg.get_orbit([0.5, 0.5, xyz[2]])
elif letter == 'e':
return spg.get_orbit([xyz[0], 0., xyz[2]])
elif letter == 'f':
return spg.get_orbit([xyz[0], 0.5, xyz[2]])
elif letter == 'g':
return spg.get_orbit([0., xyz[1], xyz[2]])
elif letter == 'h':
return spg.get_orbit([0.5, xyz[1], xyz[2]])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_26_pos(letter, xyz):
letters_selection = ['a', 'b', 'c']
spg = SpaceGroup('Pmc2_1')
if not letter in letters_selection:
raise ValueError("It is not a Pmc2_1 wyckoff position!")
elif letter == 'a':
return spg.get_orbit([0., xyz[1], xyz[2]])
elif letter == 'b':
return spg.get_orbit([0.5, xyz[1], xyz[2]])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_27_pos(letter, xyz):
letters_selection = ['a', 'b', 'c', 'd', 'e']
spg = SpaceGroup('Pcc2')
if not letter in letters_selection:
raise ValueError("It is not a Pcc2 wyckoff position!")
elif letter == 'a':
return spg.get_orbit([0., 0., xyz[2]])
elif letter == 'b':
return spg.get_orbit([0., 0.5, xyz[2]])
elif letter == 'c':
return spg.get_orbit([0.5, 0., xyz[2]])
elif letter == 'd':
return spg.get_orbit([0.5, 0.5, xyz[2]])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_28_pos(letter, xyz):
letters_selection = ['a', 'b', 'c', 'd']
spg = SpaceGroup('Pma2')
if not letter in letters_selection:
raise ValueError("It is not a Pma2 wyckoff position!")
elif letter == 'a':
return spg.get_orbit([0., 0., xyz[2]])
elif letter == 'b':
return spg.get_orbit([0., 0.5, xyz[2]])
elif letter == 'c':
return spg.get_orbit([0.25, xyz[1], xyz[2]])
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_29_pos(letter, xyz):
letters_selection = ['a']
spg = SpaceGroup('Pca2_1')
if not letter in letters_selection:
raise ValueError("It is not a Pca2_1 wyckoff position!")
else:
return spg.get_orbit([xyz[0], xyz[1], xyz[2]])
def sp_30_pos(letter, xyz):