kwant.system.Site

class kwant.system.Site(family, tag, _i_know_what_i_do=False)[source]

Bases: tuple

A site, member of a SiteFamily.

Sites are the vertices of the graph which describes the tight binding system in a Builder.

A site is uniquely identified by its family and its tag.

Parameters
  • family (an instance of SiteFamily) – The ‘type’ of the site.

  • tag (a hashable python object) – The unique identifier of the site within the site family, typically a vector of integers.

Raises

ValueError – If tag is not a proper tag for family.

Notes

For convenience, family(*tag) can be used instead of Site(family, tag) to create a site.

The parameters of the constructor (see above) are stored as instance variables under the same names. Given a site site, common things to query are thus site.family, site.tag, and site.pos.

Methods

count(value, /)[source]

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)[source]

Return first index of value.

Raises ValueError if the value is not present.

Attributes

family[source]

The site family to which the site belongs.

pos[source]

Real space position of the site.

This relies on family having a pos method (see SiteFamily).

tag[source]

The tag of the site.

Previous topic

5.1. kwant.system – Low-level interface of systems

Next topic

kwant.system.SiteArray

This Page