Hi all, could anyone provide some examples or tips on how to use the ferroelectricity.polarization module properly. Although I can get some information from the link below, the exact procedure seems complicated. I have also searched the previous forum posts and there doesn’t seem to be any discussion on this.
Yes, it is complicated. If you haven’t read Spaldin’s paper on the modern theory of polarization, that will shed some light on the situation. Basically you need to make a set of structures interpolated from the polar structure to a non-polar reference phase. Here’s a discussion of some of the practical issues in making these structures. Once you have done the calculations, you can then generate a Polarization object using from_outcars_and_structures, then use get_same_branch_polarization_data to get the polarization.
However, I’d recommend doing the branch fitting manually with a spreadsheet and scatter plot the first time, just so you understand how it works and can verify that you’re getting the right answer with Pymatgen.