2.11. Logging¶
Tkwant provides a logger to record events and internal states during a calculation. Enabling the logger, which by default is switched off, can help to find errors in the user code and also facilitate debugging tkwant.
Logging is enabled by the following lines of code:
import tkwant
import logging
tkwant.logging.handler = tkwant.logging.debug_handler
By default, only warning messages are logged, which typically look like this:
WARNING:tkwant.manybody:1452:rank=0: no occupied states found, the chemical potential is probably wrong.
The verbosity of the logger can increased to print also status and debug information, see Level. Note that logging handler must be set after importing the tkwant module and before executing any tkwant code. A complete Example is shown below.
Tkwant’s logger is based on logging module of the Python standard library. We refer to the Logging HOWTO tutorial for more information about Python’s logging module.
2.11.1. Handlers¶
The handler specify the format of the logging output.
Tkwant has implemented two predefined stream handlers:
tkwant.logging.debug_handler
and tkwant.logging.simple_handler
.
The debug_handler can be set with:
tkwant.logging.handler = tkwant.logging.debug_handler
With this handler, a typical log output looks like:
INFO:tkwant.manybody:229:rank=0: distribution function: zero-temperature fermi-dirac
The format is:
level: module-name: line-number: MPI-rank: log message
Note that the MPI rank corresponds to the rank of tkwant’s global MPI communicator that might be different to the rank of sub-communicators.
The simple_handler is less verbose and prints only the log message. It can be set with:
tkwant.logging.handler = tkwant.logging.simple_handler
With this handler, a typical log output looks like:
distribution function: zero-temperature fermi-dirac
The format is:
log message
Alternative handlers whose API matches the logging module of the Python standard library can be set in the same way.
2.11.2. Level¶
Logging has several severity levels to control which level of log messages are
recorded. By default, tkwant is logging only warning messages
(corresponding to logging.WARNING
).
To change the log level, one has set tkwant.logging.level
to a level,
as defined in the Python logging module.
As an example, to log also progress information, the additional line of code
must be added:
tkwant.logging.level = logging.INFO
Again, the logging level must be set after importing the tkwant module and
before executing any tkwant code. The most verbose output is generated by setting
the level to logging.DEBUG
:
tkwant.logging.level = logging.DEBUG
2.11.3. Filters¶
The logging output can be filtered to reduce the output to specific parts.
To log only logging events triggered by a certain module, as e.g. tkwant.leads
,
on can set
tkwant.logging.filter = logging.Filter('tkwant.leads')
Alternatively, one can also define a filter function. The following code logs only the messages from MPI with rank zero (which is typically the root rank):
def rank_filter(record):
return True if record.rank == 0 else False
tkwant.logging.filter = rank_filter
If one likes to log only messages containing the word interval one can use
def message_filter(record):
return True if 'interval' in record.getMessage() else False
tkwant.logging.filter = message_filter
Again, the filter must be set after importing the tkwant module and before executing any tkwant code. The documentation of the Python standard library logging module provides more information to write custom filters.
2.11.4. Example¶
As an example, we show the toy example from
Getting started: a simple example with a one-dimensional chain with enabled logging and the generated output.
Note that all logging output is generated by the call to tkwant.manybody.State()
and reveals the preprocessing steps of the automatic high-level approach.
import numpy as np
import matplotlib.pyplot as plt
import kwant
import tkwant
#-------------------- enable logging --------------------------------
import logging
def rank_filter(record):
return True if record.rank == 0 else False
tkwant.logging.handler = tkwant.logging.debug_handler
tkwant.logging.level = logging.DEBUG
tkwant.logging.filter = rank_filter
#--------------------------------------------------------------------
def v(time, tau=8):
"""Time dependent perturbation V(t)"""
if time < tau:
return time / tau
return 1
def create_system(length):
def onsite_potential(site, time):
"""Time dependent onsite potential (static part + V(t))"""
return 1 + v(time)
# system building
lat = kwant.lattice.square(a=1, norbs=1)
syst = kwant.Builder()
# central scattering region
syst[(lat(x, 0) for x in range(length))] = 1
syst[lat.neighbors()] = -1
# time dependent onsite-potential at the leftmost site
syst[lat(0, 0)] = onsite_potential
# add leads
sym = kwant.TranslationalSymmetry((-1, 0))
lead_left = kwant.Builder(sym)
lead_left[lat(0, 0)] = 1
lead_left[lat.neighbors()] = -1
syst.attach_lead(lead_left)
syst.attach_lead(lead_left.reversed())
return syst
# parameters
tmax = 20
length = 5
# create system
syst = create_system(length).finalized()
times = np.linspace(0, tmax)
# define an observable
density_operator = kwant.operator.Density(syst)
# do the actual tkwant simulation
state = tkwant.manybody.State(syst, tmax=tmax)
densities = []
for time in times:
state.evolve(time)
density = state.evaluate(density_operator)
densities.append(density)
# plot the result
plt.plot(times, densities)
plt.xlabel(r'time $t$')
plt.ylabel(r'charge density $n$')
plt.show()
INFO:tkwant.manybody:1420:rank=0: initialize manybody.State
DEBUG:tkwant.manybody:122:rank=0: start lead_occupation
INFO:tkwant.manybody:229:rank=0: distribution function: zero-temperature fermi-dirac
DEBUG:tkwant.manybody:124:rank=0: lead_occupation finished
DEBUG:tkwant.manybody:1454:rank=0: occupation in lead=0 is lead occupation: distribution=<function lead_occupation.<locals>._zero_temperature_fermi_dirac_distribution at 0x7fc10879cd90>, energy_range=[(None, 0)] , bands=None
DEBUG:tkwant.manybody:122:rank=0: start calc_intervals
DEBUG:tkwant.manybody:396:rank=0: occupation in all leads assumed identical for interval calculation
DEBUG:tkwant.manybody:124:rank=0: calc_intervals finished
INFO:tkwant.manybody:1473:rank=0: initial number of intervals=2
DEBUG:tkwant.manybody:1475:rank=0: quadrature interval: lead=0, band=0, kmin=-0.000000, kmax=1.047198, order=10, quadrature=kronrod, integration_variable=momentum
DEBUG:tkwant.manybody:1475:rank=0: quadrature interval: lead=1, band=0, kmin=-0.000000, kmax=1.047198, order=10, quadrature=kronrod, integration_variable=momentum
DEBUG:tkwant.manybody:122:rank=0: start calc_energy_cutoffs
DEBUG:tkwant.manybody:124:rank=0: calc_energy_cutoffs finished
DEBUG:tkwant.leads:122:rank=0: start automatic_boundary
INFO:tkwant.leads:2051:rank=0: estimate optimal boundary conditions with parameters: tmax = 20, refl_max = 1e-06, degree=6, emin=None, emax=0, params=None
INFO:tkwant.leads:2035:rank=0: estimate absorbing boundary parameters for lead=0
DEBUG:tkwant.leads:1511:rank=0: highest velocity=1.7320508538024135 at k=1.0471975510208278, energy=-1.0354441767146887e-16, band=0, neighbor extrema at k=-1.734723475976807e-18, energy=-0.9999999999999999
DEBUG:tkwant.leads:1382:rank=0: local min/max with hightest curvature g: g=2.000016063655678, k=-1.734723475976807e-18, energy=-0.9999999999999999,band=0, neighbor extrema with smallest momentum distance at relative momentum q=1.0471975510208278
DEBUG:tkwant.leads:1962:rank=0: length_new=17.320508538024136, strength=20.17540390950118, success=False
INFO:tkwant.leads:2046:rank=0: use simple boundary for lead=0
INFO:tkwant.leads:2035:rank=0: estimate absorbing boundary parameters for lead=1
DEBUG:tkwant.leads:1511:rank=0: highest velocity=1.7320508538024135 at k=1.0471975510208278, energy=-1.0354441767146887e-16, band=0, neighbor extrema at k=-1.734723475976807e-18, energy=-0.9999999999999999
DEBUG:tkwant.leads:1382:rank=0: local min/max with hightest curvature g: g=2.000016063655678, k=-1.734723475976807e-18, energy=-0.9999999999999999,band=0, neighbor extrema with smallest momentum distance at relative momentum q=1.0471975510208278
DEBUG:tkwant.leads:1962:rank=0: length_new=17.320508538024136, strength=20.17540390950118, success=False
INFO:tkwant.leads:2046:rank=0: use simple boundary for lead=1
DEBUG:tkwant.leads:124:rank=0: automatic_boundary finished
DEBUG:tkwant.manybody:122:rank=0: start calc_tasks
DEBUG:tkwant.manybody:704:rank=0: occupation in all leads assumed identical for task calculation
DEBUG:tkwant.manybody:726:rank=0: calc quadrature weights for lead=0
DEBUG:tkwant.manybody:823:rank=0: momentum integration: kmin=-1.734723475976807e-18, kmax=1.0471975510208278, band=0, order=10, quadrature=kronrod
DEBUG:tkwant.manybody:747:rank=0: number of tasks=21
DEBUG:tkwant.manybody:749:rank=0: key=0, onebody task: lead=0, mode=0, energy=-0.9999948293377526, momentum=0.002273904121928405, weight=[0.00000000e+00 4.43209212e-06], math_weight=[0. 0.0061233], phys_weight=0.0007238079361937524
DEBUG:tkwant.manybody:749:rank=0: key=1, onebody task: lead=0, mode=0, energy=-0.9998133386878931, momentum=0.013662509717224935, weight=[1.51811637e-04 7.41354171e-05], math_weight=[0.03490903 0.01704741], phys_weight=0.004348777912409993
DEBUG:tkwant.manybody:749:rank=0: key=2, onebody task: lead=0, mode=0, energy=-0.9986628241791404, momentum=0.03656945200472678, weight=[0. 0.00033366], math_weight=[0. 0.02867012], phys_weight=0.011637821525310944
DEBUG:tkwant.manybody:749:rank=0: key=3, onebody task: lead=0, mode=0, energy=-0.9950102783429602, momentum=0.07065265597314552, weight=[0.00175839 0.00088289], math_weight=[0.07825254 0.03929068], phys_weight=0.02247073549473887
DEBUG:tkwant.manybody:749:rank=0: key=4, onebody task: lead=0, mode=0, energy=-0.9868437721880513, momentum=0.1147635699729409, weight=[0. 0.00177733], math_weight=[0. 0.04876037], phys_weight=0.03645024135757851
DEBUG:tkwant.manybody:749:rank=0: key=5, onebody task: lead=0, mode=0, energy=-0.971888867023339, momentum=0.16786075747898582, weight=[0.00610059 0.00304595], math_weight=[0.11471335 0.05727498], phys_weight=0.05318116721827177
DEBUG:tkwant.manybody:749:rank=0: key=6, onebody task: lead=0, mode=0, energy=-0.9478150858890547, momentum=0.22893982888818332, weight=[0. 0.00467098], math_weight=[0. 0.06466025], phys_weight=0.07223888443574308
DEBUG:tkwant.manybody:749:rank=0: key=7, onebody task: lead=0, mode=0, energy=-0.9126285121355702, momentum=0.29667347783248676, weight=[0.0131196 0.0065635], math_weight=[0.14098772 0.07053358], phys_weight=0.09305491478920745
DEBUG:tkwant.manybody:749:rank=0: key=8, onebody task: lead=0, mode=0, energy=-0.8650485511583199, momentum=0.3694550330809238, weight=[0. 0.00859291], math_weight=[0. 0.07475731], phys_weight=0.11494401917104756
DEBUG:tkwant.manybody:749:rank=0: key=9, onebody task: lead=0, mode=0, energy=-0.8046627732640559, momentum=0.44564835391470947, weight=[0.02123061 0.01061365], math_weight=[0.15473612 0.07735601], phys_weight=0.13720524972233453
DEBUG:tkwant.manybody:749:rank=0: key=10, onebody task: lead=0, mode=0, energy=-0.73205080762368, momentum=0.523598775510414, weight=[0. 0.0124538], math_weight=[0. 0.07824951], phys_weight=0.15915494467598312
DEBUG:tkwant.manybody:749:rank=0: key=11, onebody task: lead=0, mode=0, energy=-0.6489197647077453, momentum=0.6015491971061182, weight=[0.02787387 0.01393476], math_weight=[0.15473612 0.07735601], phys_weight=0.18013806088268022
DEBUG:tkwant.manybody:749:rank=0: key=12, onebody task: lead=0, mode=0, energy=-0.557980449747185, momentum=0.6777425179399039, weight=[0. 0.01492094], math_weight=[0. 0.07475731], phys_weight=0.1995917777050841
DEBUG:tkwant.manybody:749:rank=0: key=13, onebody task: lead=0, mode=0, energy=-0.462663079351124, momentum=0.750524073188341, weight=[0.03060765 0.01531245], math_weight=[0.14098772 0.07053358], phys_weight=0.21709439898296445
DEBUG:tkwant.manybody:749:rank=0: key=14, onebody task: lead=0, mode=0, energy=-0.3669880603657444, momentum=0.8182577221326441, weight=[0. 0.01502395], math_weight=[0. 0.06466025], phys_weight=0.2323522331368649
DEBUG:tkwant.manybody:749:rank=0: key=15, onebody task: lead=0, mode=0, energy=-0.2753243258526305, momentum=0.8793367935418419, weight=[0.02812763 0.01404378], math_weight=[0.11471335 0.05727498], phys_weight=0.2451992325821009
DEBUG:tkwant.manybody:749:rank=0: key=16, onebody task: lead=0, mode=0, energy=-0.1917621707550303, momentum=0.932433981047887, weight=[0. 0.01246442], math_weight=[0. 0.04876037], phys_weight=0.25562597452345787
DEBUG:tkwant.manybody:749:rank=0: key=17, onebody task: lead=0, mode=0, energy=-0.11977734341559056, momentum=0.9765448950476822, weight=[0.02063843 0.01036258], math_weight=[0.07825254 0.03929068], phys_weight=0.2637413263413519
DEBUG:tkwant.manybody:749:rank=0: key=18, onebody task: lead=0, mode=0, energy=-0.06265744409010686, momentum=1.0106280990161012, weight=[0. 0.00773122], math_weight=[0. 0.02867012], phys_weight=0.2696612314075196
DEBUG:tkwant.manybody:749:rank=0: key=19, onebody task: lead=0, mode=0, energy=-0.02357009411568353, momentum=1.033535041303603, weight=[0.00954638 0.00466186], math_weight=[0.03490903 0.01704741], phys_weight=0.2734643248634345
DEBUG:tkwant.manybody:749:rank=0: key=20, onebody task: lead=0, mode=0, energy=-0.0039359288830456635, momentum=1.0449236468988996, weight=[0. 0.00168576], math_weight=[0. 0.0061233], phys_weight=0.2753018418411552
DEBUG:tkwant.manybody:124:rank=0: calc_tasks finished
DEBUG:tkwant.manybody:122:rank=0: start calc_tasks
DEBUG:tkwant.manybody:704:rank=0: occupation in all leads assumed identical for task calculation
DEBUG:tkwant.manybody:726:rank=0: calc quadrature weights for lead=1
DEBUG:tkwant.manybody:823:rank=0: momentum integration: kmin=-1.734723475976807e-18, kmax=1.0471975510208278, band=0, order=10, quadrature=kronrod
DEBUG:tkwant.manybody:747:rank=0: number of tasks=21
DEBUG:tkwant.manybody:749:rank=0: key=21, onebody task: lead=1, mode=0, energy=-0.9999948293377526, momentum=0.002273904121928405, weight=[0.00000000e+00 4.43209212e-06], math_weight=[0. 0.0061233], phys_weight=0.0007238079361937524
DEBUG:tkwant.manybody:749:rank=0: key=22, onebody task: lead=1, mode=0, energy=-0.9998133386878931, momentum=0.013662509717224935, weight=[1.51811637e-04 7.41354171e-05], math_weight=[0.03490903 0.01704741], phys_weight=0.004348777912409993
DEBUG:tkwant.manybody:749:rank=0: key=23, onebody task: lead=1, mode=0, energy=-0.9986628241791404, momentum=0.03656945200472678, weight=[0. 0.00033366], math_weight=[0. 0.02867012], phys_weight=0.011637821525310944
DEBUG:tkwant.manybody:749:rank=0: key=24, onebody task: lead=1, mode=0, energy=-0.9950102783429602, momentum=0.07065265597314552, weight=[0.00175839 0.00088289], math_weight=[0.07825254 0.03929068], phys_weight=0.02247073549473887
DEBUG:tkwant.manybody:749:rank=0: key=25, onebody task: lead=1, mode=0, energy=-0.9868437721880513, momentum=0.1147635699729409, weight=[0. 0.00177733], math_weight=[0. 0.04876037], phys_weight=0.03645024135757851
DEBUG:tkwant.manybody:749:rank=0: key=26, onebody task: lead=1, mode=0, energy=-0.971888867023339, momentum=0.16786075747898582, weight=[0.00610059 0.00304595], math_weight=[0.11471335 0.05727498], phys_weight=0.05318116721827177
DEBUG:tkwant.manybody:749:rank=0: key=27, onebody task: lead=1, mode=0, energy=-0.9478150858890547, momentum=0.22893982888818332, weight=[0. 0.00467098], math_weight=[0. 0.06466025], phys_weight=0.07223888443574308
DEBUG:tkwant.manybody:749:rank=0: key=28, onebody task: lead=1, mode=0, energy=-0.9126285121355702, momentum=0.29667347783248676, weight=[0.0131196 0.0065635], math_weight=[0.14098772 0.07053358], phys_weight=0.09305491478920745
DEBUG:tkwant.manybody:749:rank=0: key=29, onebody task: lead=1, mode=0, energy=-0.8650485511583199, momentum=0.3694550330809238, weight=[0. 0.00859291], math_weight=[0. 0.07475731], phys_weight=0.11494401917104756
DEBUG:tkwant.manybody:749:rank=0: key=30, onebody task: lead=1, mode=0, energy=-0.8046627732640559, momentum=0.44564835391470947, weight=[0.02123061 0.01061365], math_weight=[0.15473612 0.07735601], phys_weight=0.13720524972233453
DEBUG:tkwant.manybody:749:rank=0: key=31, onebody task: lead=1, mode=0, energy=-0.73205080762368, momentum=0.523598775510414, weight=[0. 0.0124538], math_weight=[0. 0.07824951], phys_weight=0.15915494467598312
DEBUG:tkwant.manybody:749:rank=0: key=32, onebody task: lead=1, mode=0, energy=-0.6489197647077453, momentum=0.6015491971061182, weight=[0.02787387 0.01393476], math_weight=[0.15473612 0.07735601], phys_weight=0.18013806088268022
DEBUG:tkwant.manybody:749:rank=0: key=33, onebody task: lead=1, mode=0, energy=-0.557980449747185, momentum=0.6777425179399039, weight=[0. 0.01492094], math_weight=[0. 0.07475731], phys_weight=0.1995917777050841
DEBUG:tkwant.manybody:749:rank=0: key=34, onebody task: lead=1, mode=0, energy=-0.462663079351124, momentum=0.750524073188341, weight=[0.03060765 0.01531245], math_weight=[0.14098772 0.07053358], phys_weight=0.21709439898296445
DEBUG:tkwant.manybody:749:rank=0: key=35, onebody task: lead=1, mode=0, energy=-0.3669880603657444, momentum=0.8182577221326441, weight=[0. 0.01502395], math_weight=[0. 0.06466025], phys_weight=0.2323522331368649
DEBUG:tkwant.manybody:749:rank=0: key=36, onebody task: lead=1, mode=0, energy=-0.2753243258526305, momentum=0.8793367935418419, weight=[0.02812763 0.01404378], math_weight=[0.11471335 0.05727498], phys_weight=0.2451992325821009
DEBUG:tkwant.manybody:749:rank=0: key=37, onebody task: lead=1, mode=0, energy=-0.1917621707550303, momentum=0.932433981047887, weight=[0. 0.01246442], math_weight=[0. 0.04876037], phys_weight=0.25562597452345787
DEBUG:tkwant.manybody:749:rank=0: key=38, onebody task: lead=1, mode=0, energy=-0.11977734341559056, momentum=0.9765448950476822, weight=[0.02063843 0.01036258], math_weight=[0.07825254 0.03929068], phys_weight=0.2637413263413519
DEBUG:tkwant.manybody:749:rank=0: key=39, onebody task: lead=1, mode=0, energy=-0.06265744409010686, momentum=1.0106280990161012, weight=[0. 0.00773122], math_weight=[0. 0.02867012], phys_weight=0.2696612314075196
DEBUG:tkwant.manybody:749:rank=0: key=40, onebody task: lead=1, mode=0, energy=-0.02357009411568353, momentum=1.033535041303603, weight=[0.00954638 0.00466186], math_weight=[0.03490903 0.01704741], phys_weight=0.2734643248634345
DEBUG:tkwant.manybody:749:rank=0: key=41, onebody task: lead=1, mode=0, energy=-0.0039359288830456635, momentum=1.0449236468988996, weight=[0. 0.00168576], math_weight=[0. 0.0061233], phys_weight=0.2753018418411552
DEBUG:tkwant.manybody:124:rank=0: calc_tasks finished
DEBUG:tkwant.manybody:122:rank=0: start calc_initial_state
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.9999948293377526, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.9998133386878931, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.9986628241791404, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.9950102783429602, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.9868437721880513, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.971888867023339, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.9478150858890547, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.9126285121355702, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.8650485511583199, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.8046627732640559, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.73205080762368, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.6489197647077453, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.557980449747185, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.462663079351124, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.3669880603657444, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.2753243258526305, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.1917621707550303, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.11977734341559056, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.06265744409010686, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.02357009411568353, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.0039359288830456635, lead=0
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.9999948293377526, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.9998133386878931, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.9986628241791404, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.9950102783429602, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.9868437721880513, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.971888867023339, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.9478150858890547, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.9126285121355702, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.8650485511583199, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.8046627732640559, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.73205080762368, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.6489197647077453, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.557980449747185, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.462663079351124, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.3669880603657444, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.2753243258526305, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.1917621707550303, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.11977734341559056, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.06265744409010686, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.02357009411568353, lead=1
DEBUG:tkwant.manybody:911:rank=0: calc scattering state: energy=-0.0039359288830456635, lead=1
DEBUG:tkwant.manybody:124:rank=0: calc_initial_state finished
INFO:tkwant.manybody:1513:rank=0: set default error estimate based on density
INFO:tkwant.manybody:1854:rank=0: refinement step=0, time=0, max errsum=1.3478432769227361e-08, min errbnd=1e-05, total number of intervals=2
DEBUG:tkwant.manybody:1856:rank=0: interval_num=0, quadrature interval: lead=1, band=0, kmin=-0.000000, kmax=1.047198, order=10, quadrature=kronrod, integration_variable=momentum, max error=6.7392164590749145e-09
DEBUG:tkwant.manybody:1856:rank=0: interval_num=1, quadrature interval: lead=0, band=0, kmin=-0.000000, kmax=1.047198, order=10, quadrature=kronrod, integration_variable=momentum, max error=6.739216449713884e-09
INFO:tkwant.manybody:1859:rank=0: refinement converged
INFO:tkwant.manybody:1522:rank=0: manybody.State initialization done