# DeviceAlgorithmParameters¶

class DeviceAlgorithmParameters(initial_density_type=None, electrode_constraint=None, self_energy_calculator_real=None, self_energy_calculator_complex=None, non_equilibrium_method=None, equilibrium_method=None, store_grids=None, store_basis_on_grid=None, scf_restart_step_length=None, enforce_different_electrodes=None)

Class for representing algorithm parameters relevant for the device calculation.

Parameters: initial_density_type (EquivalentBulk | NeutralAtom) – Select the method used for constructing the initial density. Default: NeutralAtom electrode_constraint (ElectrodeConstraint.Off | ElectrodeConstraint.DensityMatrix) – Constrain system variables to the electrode bulk values (see ElectrodeConstraint for the available options.) The default value differs if the class is used in a DeviceConfiguration or in a SurfaceConfiguration. Default: self_energy_calculator_real (RecursionSelfEnergy | KrylovSelfEnergy | DirectSelfEnergy | SparseRecursionSelfEnergy | FeastSelfEnergy) – The SelfEnergyCalculator that should be used for calculating the real energies in the contour integral. Default: A default RecursionSelfEnergy instance self_energy_calculator_complex (RecursionSelfEnergy | SparseRecursionSelfEnergy) – The SelfEnergyCalculator that should be used for calculating the complex energies in the contour integral. Default: A default RecursionSelfEnergy instance non_equilibrium_method (GreensFunction | SparseGreensFunction | ScatteringStates) – The density matrix method employed in the real part of the contour integration. Default: A default GreensFunction instance equilibrium_method (GreensFunction | SparseGreensFunction) – The density matrix method employed in the complex part of the contour integration. Default: A default GreensFunction instance store_grids (bool) – Enable or disable the storage of grids that can be reused in the SCF process. True will increase the memory usage, but reduce the computation time. Default: True store_basis_on_grid (Automatic | True | False) – Control the storage of the basis functions on a real space grid. When enabled, increases the memory usage but reduces the computation time. Default: Automatic scf_restart_step_length (PhysicalQuantity of type length) – The maximum distance that an atom can move so that the calculation can be restarted from the previous initial state. Default: 0.1 * Ang enforce_different_electrodes (bool) – Enforce separate calculations for the left and right electrodes, when enabled. When disabled, electrodes are treated identical if they differ by a constant translation. Default: False
electrodeConstraint()
Returns: The type of the electrode constraint. ElectrodeConstraint.Off | DensityMatrix
enforceDifferentElectrodes()
Returns: If separate calculations for the left and right electrodes should be enforced. bool
equilibriumMethod()
Returns: The equilibrium method for the complex contour integration. GreensFunction | SparseGreensFunction
initialDensityType()
Returns: The initial density type. EquivalentBulk | NeutralAtom
nonEquilibriumMethod()
Returns: The non-equilibrium method for the real contour integration. GreensFunction | SparseGreensFunction | ScatteringStates
scfRestartStepLength()
Returns: The SCF restart step length of this calculator. PhysicalQuantity of type length
selfEnergyCalculatorComplex()
Returns: The self energy calculator for the complex energies. RecursionSelfEnergy | SparseRecursionSelfEnergy
selfEnergyCalculatorReal()
Returns: The self energy calculator for the real energies. RecursionSelfEnergy | KrylovSelfEnergy | DirectSelfEnergy | SparseRecursionSelfEnergy | FeastSelfEnergy
storeBasisOnGrid()
Returns: If the storage of the basis functions on a real space grids is enabled or not Automatic | True | False
storeGrids()
Returns: If the storage of grids is enabled or not bool

## Usage Examples¶

Setup a non-self-consistent calculation with an equivalent bulk initial density.

device_algorithm_parameters = DeviceAlgorithmParameters(
initial_density_type=EquivalentBulk(electrode_constraint_length=7.*Ang)
)

calculator = DeviceHuckelCalculator(
device_algorithm_parameters=device_algorithm_parameters,
iteration_control_parameters=NonSelfconsistent,
)


Use a RecursionSelfEnergy for the real axis contour integral

device_algorithm_parameters = DeviceAlgorithmParameters(
self_energy_calculator_real=RecursionSelfEnergy(storage_strategy=NoStorage())
)

calculator = DeviceHuckelCalculator(
device_algorithm_parameters=device_algorithm_parameters,
electrode_voltages=(-0.5,0.5)*Volt
)


## Notes¶

The initial_density_type is only used for setting up the starting guess for the self-consistent loop, while the electrode_constraint will constrain the density matrix at each step during the self-consistent loop.

The self_energy_calculator_complex is used for evaluating the self energy at each point along the complex contour. The self_energy_calculator_real is only used for calculating the real axis integral for finite bias calculations. Thus for zero bias calculations, the keyword self_energy_calculator_real has no effect.