tkwantoperator.
EnergySiteValidator
(syst)¶A class that tells if energy related quantities can be calculated on a given site or hopping.
In principle any site/hopping can be used, though (t)Kwant’s implementation doesn’t enable accessing the wave function on lead sites. Thus, if an energy operator is calculated on a site/hopping that involves lead sites as neighbors it would return wrong results (energy operators test against that use case to throw an exception).
syst (FiniteSystem
) – The finalized Kwant system for which sites/hoppings are checked.
Attributes
syst
¶The finalized system for which sites/hoppings are checked.
interface_site_and_neighbors_ids
¶List of all lead-interface sites and their neighbors
Methods
is_hopping_valid_for_current
(hopping)¶Returns if the energy current can be calculated correctly between the two sites of the given hopping. Sites at the interface with leads would give wrong results.
is_site_valid_for_density
(site)¶Tells if the energy density or source can be calculated correctly in the given site.
Calculating the energy density on lead-interface sites would give wrong results.
is_site_valid_for_divergence
(site)¶Tells if the energy current divergence can be calculated correctly in the given site.
Calculating the energy current divergence on lead-interface sites and their first nearest-neighbors would give wrong results.