Hi, I tried to generate potential vacancy ordering for Li0.5CoO2. Here is my code:
from pymatgen.core.structure import Structure
from pymatgen.transformations.advanced_transformations import EnumerateStructureTransformation
from pymatgen.io.vasp.inputs import Poscar
from pymatgen.alchemy.transmuters import StandardTransmuter
Li12 = Structure.from_file("Li1-2CoO2.cif")
Li12.add_oxidation_state_by_element({"Co": 3, "Li": 1, "O": -2})
order = EnumerateStructureTransformation(max_cell_size=2)
stm = StandardTransmuter.from_structures(Li12, order, extend_collection=10)
structures = stm.transformed_structures
for s in structures:
print(s.final_structure)
However, it shows the following error. I would appreciate if someone can help me out.
TypeError: 'EnumerateStructureTransformation' object is not iterable
Here is the cif file:
# generated using pymatgen
data_LiCoO2
_symmetry_space_group_name_H-M R-3m
_cell_length_a 2.84289827
_cell_length_b 2.84289827
_cell_length_c 14.14561550
_cell_angle_alpha 90.00000000
_cell_angle_beta 90.00000000
_cell_angle_gamma 120.00000000
_symmetry_Int_Tables_number 166
_chemical_formula_structural LiCoO2
_chemical_formula_sum 'Li3 Co3 O6'
_cell_volume 99.00910176
_cell_formula_units_Z 3
loop_
_symmetry_equiv_pos_site_id
_symmetry_equiv_pos_as_xyz
1 'x, y, z'
2 '-x, -y, -z'
3 '-y, x-y, z'
4 'y, -x+y, -z'
5 '-x+y, -x, z'
6 'x-y, x, -z'
7 'y, x, -z'
8 '-y, -x, z'
9 'x-y, -y, -z'
10 '-x+y, y, z'
11 '-x, -x+y, -z'
12 'x, x-y, z'
13 'x+2/3, y+1/3, z+1/3'
14 '-x+2/3, -y+1/3, -z+1/3'
15 '-y+2/3, x-y+1/3, z+1/3'
16 'y+2/3, -x+y+1/3, -z+1/3'
17 '-x+y+2/3, -x+1/3, z+1/3'
18 'x-y+2/3, x+1/3, -z+1/3'
19 'y+2/3, x+1/3, -z+1/3'
20 '-y+2/3, -x+1/3, z+1/3'
21 'x-y+2/3, -y+1/3, -z+1/3'
22 '-x+y+2/3, y+1/3, z+1/3'
23 '-x+2/3, -x+y+1/3, -z+1/3'
24 'x+2/3, x-y+1/3, z+1/3'
25 'x+1/3, y+2/3, z+2/3'
26 '-x+1/3, -y+2/3, -z+2/3'
27 '-y+1/3, x-y+2/3, z+2/3'
28 'y+1/3, -x+y+2/3, -z+2/3'
29 '-x+y+1/3, -x+2/3, z+2/3'
30 'x-y+1/3, x+2/3, -z+2/3'
31 'y+1/3, x+2/3, -z+2/3'
32 '-y+1/3, -x+2/3, z+2/3'
33 'x-y+1/3, -y+2/3, -z+2/3'
34 '-x+y+1/3, y+2/3, z+2/3'
35 '-x+1/3, -x+y+2/3, -z+2/3'
36 'x+1/3, x-y+2/3, z+2/3'
loop_
_atom_site_type_symbol
_atom_site_label
_atom_site_symmetry_multiplicity
_atom_site_fract_x
_atom_site_fract_y
_atom_site_fract_z
_atom_site_occupancy
Li Li0 3 0.00000000 0.00000000 0.00000000 0.5
Co Co1 3 -0.00000000 -0.00000000 0.50000000 1
O O2 6 0.00000000 0.00000000 0.23958700 1