Creating a eutectic strucutre

Good Morning Everyone,
I plan on using pymatgen for pre and post analyzing LiCl-KCl systems that are run in VASP and have gone through all the examples on the Jupyter notebooks. Can someone explain to me how to create a eutectic structure in pymatgen or if it is possible?

Hi @Kai_Duemmler, could you clarify what you want with a eutectic structure? Do you know the specific composition of the eutectic?

Hello @mkhorton
The structure is 43% KCl and 57% LiCl but I believe I have create a eutectic structure by create a super cell for LiCl with 216 atoms then I removed 16 atoms (8 Li and 8 Cl) and then replaced 43 Li atoms with K atoms. Is there a simpler way than this to do it?

Yes, the general method is first to create a disordered Structure with fractional atomic occupancies, e.g. licl_structure.replace_species({'Li': {'Li':0.4, 'Cl': 0.6}}), and then use a transformation to create an ordered approximation of this system, which would be a supercell.

There are several transformations in pymatgen to do this, an OrderDisorderTransformation, a EnumerationStructureTransformation (requires additional install of enumlib) and an SQSTransformation (requires additional install of atat). Which method is preferred depends on your specific system, SQSTransformation may be good for a eutectic, but I would recommend reading the original publication.

Depending on your calculation method, it’s often helpful to round your occupancies to some small rational fraction so your resulting supercell does not have to be as large (we have a DiscretizeOccupanciesTransformation to do that for you, but it’s probably quicker to do manually unless you’re running a large amount of calculations).

Also, just to add, creating the supercell manually is completely ok too if that works for you! It all depends on the system being studied and the simulation method, which are questions that pymatgen can’t answer.