Name

calculateEffectivePotential Calculates the real-space Kohn-Sham effective potential.

Synopsis

Namespace: ATK.KohnSham or ATK.TwoProbe
LocalPotential calculateEffectivePotential(self_consistent_calculation)

Description

Function that calculates and returns the local real-space self-consistent Kohn-Sham effective potential V_{\rm eff}({\bf r}).

List of arguments

self_consistent_calculation

An object returned from a previously performed self-consistent calculation.

Default: None

Returned object methods

The returned object from calculateEffectivePotential() has the following two query methods:

  • Array toArray(): Returns the real-space representation of the effective potential in a NumPy array with dimensions (n1,n2,n3) for a spin-unpolarized calculation and (2,n1,n2,n3) for a spin-polarized calculation with the spin-up component as the first entry.

  • PhysicalUnit toUnit(): Returns the unit of the effective potential.

Usage examples

from ATK.KohnSham import *
        
configuration = ...
scf = executeSelfConsistentCalculation(...)
effective_potential = calculateEffectivePotential(scf)

f = VNLFile("results.vnl")
f.addToSample(configuration,"My sample")
f.addToSample(effective_potential,"My sample")

Notes

As shown in the above example, the returned object from this function can be placed in a VNL file; this can then be visualized in the Nanoscope in Virtual NanoLab.

The dimension of the returned array is (2,n_1,n_2,n_3) for spin-polarized calculations and (n_1,n_2,n_3) otherwise. The size of the array, i.e. the numbers n_i (i=1,2,3) depends on the mesh cut-off. The shape of the array can be obtained using the shape property, if you for example would like to perform calculations using the raw data:

effective_potential_object = calculateEffectivePotential(scf)
effective_potential = effective_potential_object.toArray()
unit = effective_potential_object.toUnit()
array_shape = effective_potential.shape
print array_shape
(2,100,124,226)  # example output

The output example refers to a spin-polarized calculation, where the leading dimension is 2. Note that shape is an object property (i.e. there are no parentheses), and not a method like toUnit()!

The object returned from this function supports basic algebraic operations such as addition and subtraction. This, for example, makes it possible to calculate the voltage drop across a two-probe system, by making two calculations at zero and finite bias, respectively, and subtracting the effective potentials. The result of the operation is still of the type LocalPotential and can be added to a VNL file:

from ATK.TwoProbe import *

atomic_configuration = ...

# zero bias calculation
scf_0V = executeSelfConsistentCalculation(...)

# bias calculation
scf_1V = executeSelfConsistentCalculation(...)
effpot_0V = calculateEffectivePotential(scf_0V)
effpot_1V = calculateEffectivePotential(scf_1V)
voltage_drop = pot_1V - pot_0V

vnl_file = VNLFile("voltage_drop.vnl")
vnl_file.addToSample(atomic_configuration,'my sample')
vnl_file.addToSample(voltage_drop,'my sample')