Thank you for you reply! My version is 2019.03. The MoS2 is doped by a Nb atom in the script. The script is fine, But the script can not obtain the bandstructure I want. I want to plot the bandstructure only contains MoS2, namly without any band provided by Nb atom. However, in the fatband setting, I donot konw how to choose the spin (up/down) and select elements (Mo, S) simultaneously. If there are any python scripts can help to achieve this function?