# ElectrodeConstraint¶

This module is used to constrain variables in a device system to the bulk electrode values, up to a certain distance. Electrode constraints are turned off with the keyword ElectrodeConstraint.Off. Alternatively, a constraint on the density matrix can be defined by declaring an instance of ElectrodeConstraint.DensityMatrix.

## Usage Examples¶

Setup a calculation with a constrained density matrix.

electrode_constraint = ElectrodeConstraint.DensityMatrix(
electrode_constraint_length=6.*Ang
)
device_algorithm_parameters = DeviceAlgorithmParameters(
electrode_constraint=electrode_constraint
)

calculator = DeviceHuckelCalculator(
device_algorithm_parameters = device_algorithm_parameters,
)