-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathremoved_stuff.py
39 lines (35 loc) · 1.32 KB
/
removed_stuff.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
# Made more sense to write a generic function I can use replace on
# def entos_structure_string(crystal, fractional=True, position_precison=5):
# if fractional:
# position_key = 'fractional'
# else:
# position_key = 'xyz'
#
# positions = crystal[position_key]
# species = crystal['species']
# n_atoms = len(positions)
# assert len(species) == len(positions)
#
# # First line
# first_position = list_to_string(positions.pop(0), precision=position_precison)
# structure_string = "structure( " + position_key + "=([['" + species.pop(0) + "', " + first_position + "],\n"
#
# indent = ' ' * (structure_string.find('[') + 1)
#
# if n_atoms == 1:
# structure_string = structure_string.rstrip('\n')[:-1]
# print(structure_string)
# return structure_string + "])\n"
#
# if n_atoms > 2:
# for ia,position in enumerate(positions[:-1]):
# position = list_to_string(position, precision=5)
# structure_string += indent + "['" + species[ia] + "', " + position + "],\n"
#
# # End line
# last_position = list_to_string(positions[-1], precision=5)
# structure_string += indent + "['" + species[-1] + "', " + last_position + "]])\n"
#
# return structure_string
#
# structure_string = entos_structure_string(pbs, fractional=True)