Python Materials Genomics (pymatgen) is a robust materials analysis code that defines classes for structures and molecules with support for many electronic structure codes. It powers the Materials Project.
The following code should generate structure of Be12Ti. For both spacegroup "I4/mmm" or its number "139" (as in example below) the code generate POSCAR file with 8 Ti and 8 Be atoms, which is obviously wrong as the ratio of Be/Ti should be 12.
The input data for the structure are based on ICSD 616454.
Example code
import pymatgen as mg
from pymatgen.analysis.defects.point_defects import Interstitial
lat = mg.Lattice.tetragonal(7.35,4.19)
structure = mg.Structure.from_spacegroup("139",lat,["Be","Ti"],
[[0.25, 0.25, 0.25],
[0.35, 0.0, 0.0 ],
[0.28, 0.50, 0.0 ],
[0.0, 0.0, 0.0 ]])
structure.to(filename="POSCAR")
Error message
no error message, but wrong output to POSCAR
Suggested solution (if any)
Too many symmetry operations were applied to Ti atoms, while for Be some were missing.
Files (output POSCAR)
Ti8 Be8
1.0
7.350000 0.000000 0.000000
0.000000 7.350000 0.000000
0.000000 0.000000 4.190000
Be Ti
8 8
direct
0.250000 0.250000 0.250000 Be
0.750000 0.750000 0.750000 Be
0.750000 0.750000 0.250000 Be
0.750000 0.250000 0.250000 Be
0.750000 0.250000 0.750000 Be
0.250000 0.250000 0.750000 Be
0.250000 0.750000 0.750000 Be
0.250000 0.750000 0.250000 Be
0.350000 0.000000 0.000000 Ti
0.650000 0.000000 0.000000 Ti
0.850000 0.500000 0.500000 Ti
0.000000 0.350000 0.000000 Ti
0.150000 0.500000 0.500000 Ti
0.000000 0.650000 0.000000 Ti
0.500000 0.850000 0.500000 Ti
0.500000 0.150000 0.500000 Ti
System
Summary
Example code
Error message
Suggested solution (if any)
Files (output POSCAR)