.. _09_sic_calculations: .. include:: ../../examples/09_sic_calculations/README.rst ---- .. code-block:: python from eminus import Atoms, SCF from eminus.energies import get_Esic from eminus.orbitals import FLO Start with a DFT calculation for neon including a SIC calculation .. code-block:: python atoms = Atoms("Be", [0, 0, 0], ecut=10) scf = SCF(atoms, sic=True) scf.run(cgform=3) Generate Kohn-Sham and Fermi-Loewdin orbitals .. code-block:: python flo = FLO(scf) Print the self-interaction energy from the :code:`SCF` object .. code-block:: python print(f"\nKSO-SIC energy = {scf.energies.Esic} Eh") The quality of the FLO-SIC energy will vary with the FOD guess The one-shot FLO-SIC energy should be lower than the KSO-SIC one .. code-block:: python esic = get_Esic(scf, atoms.J(flo)) print(f"FLO-SIC energy = {esic} Eh") The SIC energy will also be saved in the :code:`SCF` object .. code-block:: python print(f"\nAll energies:\n{scf.energies}") Download :download:`09_sic_calculations.py <../../examples/09_sic_calculations/09_sic_calculations.py>`