## Describing semicore states with local orbitals

If the treatment of a semicore state as a core electron leads to a ghost band the user typically resolves this issue by switching the treatment of these respective electrons to a valence electron treatment. This procedure involves several steps that have to be performed in a consistent way.

The starting point is the identification of the responsible semicore states. This is done by identifying those core electron states with the highest eigenenergies.

For each atom type the eigenenergies of the core electron states are provided in the coreStates elements of the out.xml file. The number of core electrons lost from the respective MT sphere is also listed in this tag. An example for such an output is provided below. It features $3p1/2$ and $3p3/2$ states with very high lying eigenenergies.

<coreStates atomType="     1" atomicNumber=" 23" spin="1"
kinEnergy="    941.0636778793" eigValSum="   -550.9805159504"
lostElectrons=" 0.111893">
<state n="1" l="0" j="0.5" energy="-195.9388108744" weight="2.000"/>
<state n="2" l="0" j="0.5" energy="-21.4169509005" weight="2.000"/>
<state n="2" l="1" j="0.5" energy="-17.9790788510" weight="2.000"/>
<state n="2" l="1" j="1.5" energy="-17.7189379876" weight="4.000"/>
<state n="3" l="0" j="0.5" energy="-1.8913495403" weight="2.000"/>
<state n="3" l="1" j="0.5" energy="-0.9625902671" weight="2.000"/>
<state n="3" l="1" j="1.5" energy="-0.9318007834" weight="4.000"/>
</coreStates>


After identifying the core electron states to be moved to the valence description the number of electrons in these states has to be counted. This is done by multiplying for each state the electrons in it by the number of atoms in the respective atom group and adding these numbers up for all considered states of all considered atom groups.

For each atom type and each state the number of core electrons per atom is provided in coreStates/state/@weight. In general these are 2 electrons for $s$ states, 6 electrons for $p$ states, 10 electrons for $d$ states, and 14 electrons for $f$ states if spin-orbit splitting is neglected.

To move the description of the semicore electrons from the core electrons to the valence electrons the respective core electron states have to be removed in the input file and the number of valence electrons has to be increased.

In the electron configuration as provided in an electronConfig tag the respective states listed in atomSpecies/species/electronConfig/coreConfig have to be moved directly to the section of the valence electrons in atomSpecies/species/electronConfig/valenceConfig. The number of valence electrons is specified in calculationSetup/bzIntegration/@valenceElectrons. It has to be adapted even if the electron configuration is specified directly.

The last step is the extension of the LAPW basis by local orbitals (LOs). For this you have to consider the main quantum number of the semicore states and the orbital character.

For the addition of semicore LOs (SCLOs) a new lo tag has to be inserted in the atomSpecies/species section. All of these tags have to be at the end of the section. The tag involves the specification of the LO type in atomSpecies/species/lo/@type. For the description of semicore states this has to be set to SCLO. It specifies details of the LO energy parameter calculation procedure. SCLO extrapolates the spherical effective MT potential by a confining potential outside the MT sphere, considers an atomic problem with this potential, and uses the eigenenergy related to the specified main quantum number and angular momentum quantum number as LO energy parameter. The main quantum number is specified in atomSpecies/species/lo/@n and the angular momentum quantum number in atomSpecies/species/lo/@l. The last parameter that has to be specified in this tag is the degree of the energy derivative of the solution to the atomic problem. This is specified in atomSpecies/species/lo/@eDeviv. For the most common usage of the function $u_{l}^\alpha(r_\alpha,E_{l}^\text{lo})$ this has to be set to 0. If higher order energy derivatives of the function have to be used the respective degree of the derivative has to be specified here. An example for the specififaction of $3p$ semicore LOs is shown below.

<lo type="SCLO" l="1" n="3" eDeriv="0"/>