# How to calculate the formation energy of a monolayer using VASP?

I want to calculate the formation energy of WS2 monolayer unit cell using VASP. I am wandering if you could show me the detailed calculation steps in VASP to do that for WS2 or any monolayer.

• Calculate the total energy of primitive monolayer WS2: $$E$$(WS2)
• Calculate the total energy per atom for the lowest-energy configuration bulk S: $$E$$(S)
• Calculate the total energy per atom for the lowest-energy configuration bulk W: $$E$$(W)
• Estimate the formation energy: $$\Delta E_f=E(\text{WS2})-\dfrac{1}{3}E(\text{W})-\dfrac{2}{3}E(\text{S}).$$