Xps 2.py
Personally, I suggest to use this one to prepare the POSCAR in XPS calculations.
In this script, I move the atom at the beginning of the element list.
For example:
This version
Ni C O 36 1 2
to
Ni Ni C O 1 35 1 2
Previous Version
Ni C O Ni 35 1 2 1