Electronic configuration¶
ec
attribute is an object from the ElectronicConfiguration
class that has additional method for manipulating the configuration. Internally the configuration is represented as a OrderedDict
from the collections
module where tuples (n, s)
(n
is the principal quantum number and s
is the subshell label) are used as keys and shell occupations are the values
[1]:
from mendeleev import Si
[2]:
Si.ec.conf
[2]:
OrderedDict([((1, 's'), 2),
((2, 's'), 2),
((2, 'p'), 6),
((3, 's'), 2),
((3, 'p'), 2)])
the occupation of different subshells can be access supplying a proper key
[3]:
Si.ec.conf[(1, "s")]
[3]:
2
to calculate the number of electrons per shell type
[4]:
Si.ec.electrons_per_shell()
[4]:
{'K': 2, 'L': 8, 'M': 4}
get the largest value of the pricipal quantum number
[5]:
Si.ec.max_n()
[5]:
3
Get the largest value of azimutal quantum number for a given value of principal quantum number
[6]:
Si.ec.max_l(n=3)
[6]:
'p'
Find the large noble gas-like core configuration
[7]:
Si.ec.get_largest_core()
[7]:
('Ne', <ElectronicConfiguration(conf="1s2 2s2 2p6")>)
Get the total number of electrons
[8]:
Si.ec.ne()
[8]:
14
Last subshell
[9]:
Si.ec.last_subshell()
[9]:
((3, 'p'), 2)
Get unpaired electrons
[10]:
Si.ec.unpaired_electrons()
[10]:
2
Remove electrons by ionizing returns a new configuration with an electron removed
[11]:
ionized = Si.ec.ionize()
print(ionized)
1s2 2s2 2p6 3s2 3p1
We can check that it actually has less electrons:
[12]:
ionized.ne()
[12]:
13
Spin occupations by subshell
[13]:
Si.ec.spin_occupations()
[13]:
OrderedDict([((1, 's'), {'pairs': 1, 'alpha': 1, 'beta': 1, 'unpaired': 0}),
((2, 's'), {'pairs': 1, 'alpha': 1, 'beta': 1, 'unpaired': 0}),
((2, 'p'), {'pairs': 3, 'alpha': 3, 'beta': 3, 'unpaired': 0}),
((3, 's'), {'pairs': 1, 'alpha': 1, 'beta': 1, 'unpaired': 0}),
((3, 'p'), {'pairs': 0, 'alpha': 2, 'beta': 0, 'unpaired': 2})])
Calculate the spin only magnetic moment
[14]:
Si.ec.spin_only_magnetic_moment()
[14]:
2.8284271247461903
Calculate the screening constant using Slater’s rules for 2s
orbital
[15]:
Si.ec.slater_screening(n=2, o="s")
[15]:
4.1499999999999995
Standalone use¶
You can use the ElectronicConfiguration
as a standalone class and use all of the methods shown above.
[16]:
from mendeleev.econf import ElectronicConfiguration
[17]:
ec = ElectronicConfiguration("1s2 2s2 2p6 3s1")
Get the valence only configuration
[18]:
ec.get_valence()
[18]:
<ElectronicConfiguration(conf="3s1")>