Open ondracka opened 8 months ago
Test case can be for example this one https://nomad-lab.eu/prod/v1/gui/search/entries/entry/id/zuujgx-OmtrS1lR8c0qpnNPDfPXC (1s corehole in atom 64) or this one https://nomad-lab.eu/prod/v1/staging/gui/search/entries/entry/id/zm2Az7Mvlcq8C_qUhJF8NTCE-62r (Ti2p3/2 corehole in atom 13).
This will go into method.atom_parameters.core_hole
Core-hole during calculation means electron from core-level, like C1s for carbon was excited (removed). Unfortunately, this info is not in the standard Wien2k output file (.scf file). We need to look for .inc file and parse it from there. The core-hole is not marked explicitly though :cry: what the file contains are in fact core-level occupancies. Thus in practice, we for example look for the occupancy of C1s orbital and if it contains less than 2 electrons we would mark a core-hole in the metainfo.
The format of the *.inc file looks like this:
There is
1 0.00 0 NUMBER OF ORBITALS (EXCLUDING SPIN), SHIFT, IPRINT
line for every atom in the calculation. The first number is how many deep core levels the atom has. This specific example comes from TiN calculation, thus in this example we would have 2Ti atoms and 2N atoms.This is typical Ti
the 4 lines correspond to 1s, 2s, 2p1/2 and 2p3/2 levels (anything besides s orbitals is splitted in two due to spin-orbital interaction). First number on the line is the principle quantum number n of the specific orbital (e.g., if you have 1s orbital n is 1, for 2s n is 2, ). Second is kappa (this is so-called relativistic quantum number), the last one is occupancy.
See the following table how you can decipher kappa.
So for example kappa -2 means p orbital (orbital angular quantum number l = 1) and total angular momentum quantum number j = 3/2. The corresponding maximum occupancy is 4 electrons. Kappa 1 would mean p orbital as well, j=1/2 and maximum occupancy 2 electrons.
The idea is we parse the file and always check if the occupancy corresponds to the maximum occupancy from the table. If so, we go on. If it is smaller, like in the example above it would be for the last atom, where occupancy is only one, we create a atom parameters section for the corresponding atom and a core-hole subsection: https://nomad-lab.eu/prod/v1/staging/gui/analyze/metainfo/nomad.datamodel.datamodel.EntryArchive/run/method/atom_parameters/core_hole (see also OpenMX parser where this is already implemented). We add _atomindex to the atom_parameters section where index is the index of the specific atom in the inc file (in this case it would be probably 4 but I need to double check if the index runs from 0 or 1). Than in the core_hole subsection we add
n_quantum_number = 1
,l_quantum_number = 0
,j_quantum_number = 1/2
,n_electrons_excited = 1
andoccupancy = 1
.