KS

class dqc.KS(system: dqc.system.base_system.BaseSystem, xc: Union[str, dqc.xc.base_xc.BaseXC], vext: Optional[torch.Tensor] = None, restricted: Optional[bool] = None, variational: bool = False)[source]

Performing Restricted or Unrestricted Kohn-Sham DFT calculation.

Parameters
  • system (BaseSystem) – The system to be calculated.

  • xc (str) – The exchange-correlation potential and energy to be used.

  • vext (torch.Tensor or None) – The external potential applied to the system. It must have the shape of (*BV, system.get_grid().shape[-2])

  • restricted (bool or None) – If True, performing restricted Kohn-Sham DFT. If False, it performs the unrestricted Kohn-Sham DFT. If None, it will choose True if the system is unpolarized and False if it is polarized

  • variational (bool) – If True, then solve the Kohn-Sham equation variationally (i.e. using optimization) instead of using self-consistent iteration. Otherwise, solve it using self-consistent iteration.