LocalDeviceDensityOfStates

class LocalDeviceDensityOfStates(configuration, energy=None, kpoints=None, kpoints_weights=None, contributions=None, self_energy_calculator=None, energy_zero_parameter=None, infinitesimal=None)

Constructor for the Local Device Density of States (LDDOS) class. This class inherits from the GridValues class.

Parameters:
  • configuration (DeviceConfiguration | SurfaceConfiguration) – The one or two-probe configuration with attached calculator for which the LDDOS. should be calculated.
  • energy (PhysicalQuantity of type energy.) – The energy for which the LDDOS should be calculated.
    Default: 0.0*eV
  • kpoints (MonkhorstPackGrid or a list of k-points.) – The k-points for which the LDDOS should be calculated.
    Default: MonkhorstPackGrid(nx,ny), where nx, ny is the sampling used for the self consistent calculation.
  • kpoints_weights (list of floats.) – The weight of each k-point for which the transmission spectrum should be calculated. This should only be specified if kpoints is given as a list of k-points.
    Default: The weights corresponding to the MonkhorstPackGrid, or list of [1.,1.,..] if k-points are specified as floats.
  • contributions (Left | Right | All) – The density contributions to include in the LDDOS.
    Default: All
  • self_energy_calculator (DirectSelfEnergy | RecursionSelfEnergy | SparseRecursionSelfEnergy | KrylovSelfEnergy) – The self energy calculator to be used for the LDDOS.
    Default: RecursionSelfEnergy(storage_strategy=NoStorage())
  • energy_zero_parameter (AverageFermiLevel | AbsoluteEnergy.) – Specifies the choice for the energy zero.
    Default: AverageFermiLevel
  • infinitesimal (PhysicalQuantity of type energy.) – Small energy, used to move the density of states calculation away from the real axis. This is only relevant for recursion-style self-energy calculators.
    Default: 1.0e-6*eV
axisProjection(projection_type='sum', axis='c', spin=None, projection_point=None, coordinate_type=<class 'NL.ComputerScienceUtilities.NLFlag._NLFlag.Fractional'>)

Get the values projected on one of the Cartesian axes.

Parameters:
  • projection_type (str) –
    The type of projection to perform. Should be either
    • ‘sum’ for the sum over the plane spanned by the two other axes.
    • ‘average’ or ‘avg’ for the average value over the plane spanned by the two other axes.
    • ‘line’ for the value along a line parallel to the axis and through a point specified by the projection_point parameter.


    Default: ‘sum’

  • axis (str) – The axis to project the data onto. Should be either ‘a’, ‘b’ or ‘c’.
    Default: ‘c’
  • spin (Spin.Sum | Spin.Z | Spin.X | Spin.Y | Spin.Up | Spin.Down | Spin.RealUpDown | Spin.ImagUpDown) – Which spin component to project on.
    Default: Spin.All
  • projection_point (sequence, PhysicalQuantity) – Axis coordinates of the point through which to take a line if projection_type is ‘projection_point’. Must be given as a sequence of three coordinates [a, b, c]. It the numbers have units of length, they are first divided by the length of the respective primitive vectors [A, B, C], and then interpreted as fractional coordinates. Unitless coordinates are immidiately interpreted as fractional.
  • coordinate_type (Fractional | Cartesian) – Flag to toggle if the returned axis values should be given in units of Angstrom (NLFlag.Cartesian) or in units of the norm of the axis primitive vector (NLFlag.Fractional).
    Default: Fractional
Returns:

A 2-tuple of 1D numpy.arrays containing the axis values and the projected data.

Return type:

tuple.

contributions()
Returns:The contributions used in the LDDOS calculation.
Return type:Left | Right | All
derivatives(x, y, z, spin=None)

Calculate the derivative in the point (x, y, z).

Parameters:
  • x (PhysicalQuantity with type length) – The Cartesian x coordinate.
  • y (PhysicalQuantity with type length) – The Cartesian y coordinate.
  • z (PhysicalQuantity with type length) – The Cartesian z coordinate.
  • spin (Spin.All | Spin.Sum | Spin.Up | Spin.Down | Spin.X | Spin.Y | Spin.Z) – The spin component to project on.
    Default: Spin.All
Returns:

The gradient at the specified point for the given spin. For Spin.All, a tuple with (Spin.Sum, Spin.X, Spin.Y, Spin.Z) components is returned.

Return type:

PhysicalQuantity of type energy-1 × length-4

energy()
Returns:The energy used in this LDDOS.
Return type:PhysicalQuantity of type energy.
energyZero()
Returns:The energy zero used for the energy scale in this LDDOS.
Return type:PhysicalQuantity of type energy.
energyZeroParameter()
Returns:The specified choice for the energy zero.
Return type:AverageFermiLevel | AbsoluteEnergy
evaluate(x, y, z, spin=None)

Evaluate in the point (x, y, z).

Parameters:
  • x (PhysicalQuantity with type length) – The Cartesian x coordinate.
  • y (PhysicalQuantity with type length) – The Cartesian y coordinate.
  • z (PhysicalQuantity with type length) – The Cartesian z coordinate.
  • spin (Spin.All | Spin.Sum | Spin.Up | Spin.Down | Spin.X | Spin.Y | Spin.Z) – The spin component to project on.
    Default: Spin.All
Returns:

The value at the specified point for the given spin. For Spin.All, a tuple with (Spin.Sum, Spin.X, Spin.Y, Spin.Z) components is returned.

Return type:

PhysicalQuantity of type energy-1 × length-3

gridCoordinate(i, j, k)

Return the coordinate for a given grid index.

Parameters:
  • i (int) – The grid index in the A direction.
  • j (int) – The grid index in the B direction.
  • k (int) – The grid index in the C direction.
Returns:

The Cartesian coordinate of the given grid index.

Return type:

PhysicalQuantity of type length.

metatext()
Returns:The metatext of the object or None if no metatext is present.
Return type:str | unicode | None
nlprint(stream=None)

Print a string containing an ASCII table useful for plotting the AnalysisSpin object.

Parameters:stream (python stream) – The stream the table should be written to.
Default: NLPrintLogger()
primitiveVectors()
Returns:The primitive vectors of the grid.
Return type:PhysicalQuantity of type length.
scale(scale)

Scale the field with a float.

Parameters:scale (float) – The parameter to scale with.
setMetatext(metatext)

Set a given metatext string on the object.

Parameters:metatext (str | unicode | None) – The metatext string that should be set. A value of “None” can be given to remove the current metatext.
shape()
Returns:The number of grid points in each direction.
Return type:tuple of three int.
spin()
Returns:The spin the local device density of states is calculated for, always Spin.All.
Return type:Spin.All
spinProjection(spin=None)

Construct a new GridValues object with the values of this object projected on a given spin component.

Parameters:spin (Spin.All | Spin.Sum | Spin.X | Spin.Y | Spin.Z) – The spin component to project on.
Default: Spin.All
Returns:A new GridValues object for the specified spin.
Return type:GridValues
toArray()
Returns:The values of the grid as a numpy array slicing off any units.
Return type:numpy.array
unit()
Returns:The unit of the data in the grid.
Return type:A physical unit.
unitCell()
Returns:The unit cell of the grid.
Return type:PhysicalQuantity of type length.
volumeElement()
Returns:The volume element of the grid represented by three vectors.
Return type:PhysicalQuantity of type length.

Usage Examples

Calculate the LocalDeviceDensityOfStates for a DeviceConfiguration and save the result for visualization with QuantumATK:

ldos = LocalDeviceDensityOfStates(device_configuration, 0.0*eV, contributions=All)
nlsave('ldos.nc',ldos)

For examples on working with 3D grids, see HartreePotential and ElectronDensity.

Notes

The routine utilizes the symmetries of the configuration to reduce the computational load for k-point averaging.

The local density of states (LDOS) \(D(E, {\bf r})\) for a device is computed via the spectral density matrix \(\rho(E)=\rho^L(E)+\rho^R(E)\) (cf. The non-equilibrium Green’s function (NEGF) method) where \(L/R\) denotes the contribution from the left/right electrode (see the keyword contributions above) as

\[D(E,\mathbf{r}) = \sum_{ij} \rho_{ij}(E) \phi_i(\mathbf{r})\phi_j(\mathbf{r}),\]

where we note that the basis set orbitals, \(\phi_i(\mathbf{r})\), are real functions in QuantumATK through the use of spherical harmonics.

The LDOS is related to the DeviceDensityOfStates (DDOS) \(D(E)\) via an integral over all space.

If the function is integrated over both space and energy with the Fermi function,

\[\int D(E,\mathbf{r}) f\left(\frac{E-\mu}{k_B T}\right) dE d \mathbf{r} = \sum_{ij} D_{ij} S_{ij} = N,\]

it will give the total number of electrons \(N\).