-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
69 lines (54 loc) · 2.2 KB
/
test.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
# from casecount2 import *
import matplotlib.pyplot as plt
# from readinginput import *
from itertools import combinations, combinations_with_replacement
from ase.spacegroup import crystal
from casecount import *
import numpy as np
from functions import *
from cellcheck import lattice_angle
import collections
sim_box = np.array([[10.695, -2.119, 0.594],
[-1.692, 5.842, 1.004],
[0.029, 1.677, 5.2001]])
# compound = ['P', 'S', 'S', 'S', 'S']
# sym_no = 31
# system_initial_tuple = [(0.0000000000000000, 0.3193858310057314, 0.3004191256249643),
# (0.2201941407319539, 0.1687908743112779, 0.1891720597598417),
# (0.7798058592740501, 0.1687908743112779, 0.1891720597598417),
# (0.0000000000000000, 0.6213979744118994, 0.1856207017628689),
# (0.0000000000000000, 0.3119861906253145, 0.6394921055933835)]
# system_transform = crystal(compound, system_initial_tuple, spacegroup=sym_no, cell=sim_box)
# print(system_transform.positions)
ratio = [1, 3]
rigid_type = 'Tetrahedron'
x = SymCases(rigid_type, ratio, 3)
# print(f'sym:{sym_no}')
# print(f'sym_no:{sym_no}')
# print(f'rigid_type:{rigid_type}')
b = x.case_list(113)
for key in b.keys():
print(f'{key}: {b[key]}')
# c = case_count(rigid_type, ratio, 3, 1, 200)
# sym_information(sym_no, b, 3)
# root_path = os.getcwd()
# output_path = root_path + '/output'
# trail_path = root_path + '/SymTest/sym1/case2/trail'
# relax_path = root_path + '/SymTest/sym1/case2/relax'
# log_path = root_path + '/SymTest/sym31/case1/log_file'
# cell = [(6.9336127435, 0., 0.),
# (0., 6.9336127435, 0.),
# (0., 0., 6.9336127435)]
# atom_cor1 = np.array([6.684002684734, 3.4321383080325, 1.3312536467520002])
# atom_cor2 = direct_cartesian_transform(atom_cor1, cell, 'CtoD')
# atom_cor3 = [(atom_cor2[0], atom_cor2[1], atom_cor2[2])]
# # print(atom_cor2)
# # print(atom_cor3)
# # exit()
# x = crystal('Li', atom_cor3, spacegroup=6, cell=cell)
# p = x.positions
# print(p)
# aa = ['s3', 's3', 's3', 's4', 's5', 's5', 's5', 's5', 's5', 's6', 's6', 's6']
# bb = [1,2,3,4]
# x = [item for item, count in collections.Counter(bb).items() if count > 1]
# print(x)