Name

DeviceConfiguration — Class for representing a structure coupled with semi-infinite bulk, i.e. one-probe, two-probe, etc.

Synopsis

Namespace: NanoLanguage
DeviceConfiguration(
central_region,
electrodes
)

Description

Construction of the device configuration class. The DeviceConfiguration is formed from a central region given as BulkConfiguration, and one or more electrodes given as BulkConfiguration(s) as well.

DeviceConfiguration Arguments

central_region

The central described as a BulkConfiguration.

Type: A BulkConfiguration.

electrodes

Electrodes of the device given as a BulkConfiguration or a sequence of BulkConfiguration's. If there is only one given one-electrode it is considered a one-probe. If two electrodes are given, the device is considered a two-probe, with the first considered to the left electrode, and the second the right electrode. If three electrodes are given, it is considered a three-probe, where the third electrode is the gate electrode.

Type: A list of BulkConfiguration's.

DeviceConfiguration Methods

A DeviceConfiguration object provides the following methods:

  • addTags(tags, indices): Add a set of tags to atoms matching a collection of indices.

    tags

    The tags to add to matching atoms.

    indices

    The indices to match atoms against. If None, then all atoms are matched.

  • bravaisLattice(): Method for getting the Bravais lattice of the central region

  • calculator(): Return the calculator attached to the configuration, i.e. the calculator that will be used for both simulation and analysis.

  • cartesianCoordinates(): The Cartesian coordinates of the atoms in the the central region of the configuration.

  • centralRegion(): Method for obtaining the central region of a DeviceConfiguration

  • dielectricRegions(): Method for getting the dielectric regions of the central region.

  • electrodes(): Method for obtaining the electrode BulkConfiguration of a DeviceConfiguration

  • electrodesDisplacement(): Method for obtaining the displacement of the BravaisLattice of the electrodes in the C-direction in order to match the BravaisLattice of the central_region

  • elements(): The elements in the the central region of the configuration.

  • externalPotential(): Method for obtaining the external potential on the central region.

  • fractionalCoordinates(): Method for obtaining the fractional coordinates of the central configuration atoms.

  • ghostAtoms(): Method for getting the list of ghost atom indices for the central region.

  • indicesFromTags(tags): List the indices associated with a given collection of tags.

    tags

    A sequence of tags for which all matching indices should be extracted.

  • metallicRegions(): Method for getting the metallic regions of the central region.

  • nlprint(stream, name): Print a string containing an ASCII description of the DeviceConfiguration.

    stream

    The stream the description should be written to.

    Type: A stream that supports strings being written to using 'write'.

    Default: sys.stdout
    name

    The name of the configuration being printed.

    Type: String.

    Default: 'Device'
  • numberOfAtoms(): Returns the total number of atoms in the configuration

  • removeTags(tags, indices, purge): Remove a set of tags from atoms matching a collection of indices.

    tags

    The tags to remove from matching atoms. If None, then all tags are removed.

    indices

    The indices to match atoms against. If None, then all atoms are matched.

    purge

    A boolean value indicating if we completely remove the tag from the configuration, or simply leave it unassociated with any atoms.

  • setCalculator(calculator, initial_state, initial_spin): Attach a Calculator class to the configuration which will be used in calculations involving the configuration.

    calculator

    The Calculator object that should be attached to the configuration.

    Type: DeviceHuckelCalculator | DeviceLCAOCalculator

    Default: None
    initial_state

    The initial state to be used for this configuration.

    Type: DeviceConfiguration with an attached calculator.

    Default: None
    initial_spin

    The InitialSpin object to be used for this configuration.

    Type: InitialSpin | None

    Default: None for calculators not supporting spin. Maximally spin-polarized for calculators supporting spin.
  • setDielectricRegions(dielectric_regions): Set the dielectric regions of the central region.

    dielectric_regions

    A sequence of BoxRegions.

    Type: A sequence of BoxRegions.

  • setExternalPotential(external_potential): Set the external potential on the central region.

    external_potential

    The external potential.

    Type: AtomicShift or AtomicCompensationCharge

  • setMetallicRegions(metallic_regions): Set the metallic regions of the central region

    metallic_regions

    A sequence of BoxRegions.

    Type: A sequence of BoxRegions.

  • setVelocities(velocities): Function to set velocities on the configuration.

    velocities

    The velocities to set on the configuration.

    Type: A sequence of velocities, with the same length as the number of elements, or None, which deletes all velocities saved on the configurartion.

    Default: None
  • symbols(): The element symbols of the configuration.

  • tags(indices): List the tags associated with a given collection of indices.

    indices

    A tuple, list, or set of indices for which tags should be counted. If None, all indices are selected.

  • update(force_restart): Using the configurations set calculator, a self-consistent solution is generated.

    force_restart

    Force the self-consistent calculation to restart.

  • velocities(): The velocities of the atoms.

Usage Examples

Construct a device system consisting of a hydrogen molecule connected with two chains of Lithium atoms.

# Define A,B directions of lattice
vector_a = [5.0, 0.0, 0.0]*Angstrom
vector_b = [0.0, 5.0, 0.0]*Angstrom

#  setup electrode 
electrode = BulkConfiguration(
    bravais_lattice=UnitCell(vector_a, vector_b, 
                             [0.0, 0.0, 9.0]*Angstrom),
    elements=[Lithium, Lithium, Lithium],
    cartesian_coordinates=[[ 2.5,  2.5,  1.5],
                           [ 2.5,  2.5,  4.5],
                           [ 2.5,  2.5,  7.5]]*Angstrom
    )

# setup  Central region
central_region = BulkConfiguration(
    bravais_lattice= UnitCell(vector_a, vector_b, 
                             [0.0, 0.0, 22.0]*Angstrom),
    elements=[Lithium, Lithium, Lithium, Hydrogen, Hydrogen, 
              Lithium, Lithium,  Lithium],
    cartesian_coordinates=[[  2.5,   2.5,   1.5],
                           [  2.5,   2.5,   4.5],
                           [  2.5,   2.5,   7.5],
                           [  2.5,   2.5,  10.5],
                           [  2.5,   2.5,  11.5],
                           [  2.5,   2.5,  14.5],
                           [  2.5,   2.5,  17.5],
                           [  2.5,   2.5,  20.5]]*Angstrom  
     )

#setup Device configuration
device_configuration = DeviceConfiguration(
    central_region,
    [electrode, electrode]
    )

li_h2_li.py

Notes

  • The setup of device configurations with two electrodes

    A device system with two electrodes is created by placing two electrode BulkConfiguration to the left and the right of of a central BulkConfiguration. The properties within the electrode regions are fixed at their bulk properties, while the central region of the device configuration is described self-consistently. The device configuration must fulfill the following properties:

    • The electrodes and the central BulkConfiguration must have the same cell vectors in the A and B direction.

    • The C direction must be perpendicular to the A and B directions.

    • If the left A-B face of the central unit cell is aligned with the left A-B face of the left electrode, the first atoms in the central unit cell must be identical with the atoms in the left electrode. See Figure 5 for an example.

    • If the right A-B face of the central unit cell is aligned with the right A-B face of the right electrode, the last atoms in the central unit cell must be identical with the atoms in the right electrode. See Figure 5 for an example.

    Upper panel: Example for the constituents of a device system with 2 electrodes. The constituents are Left Electrode, Central Region, Right Electrode. Note that the first atoms in the central region must be positioned identical to the atoms in the left electrode. Similarly, the last atoms in the central region must be positioned relative to the right face of the unit cell, identical to the atoms in the right electrode. Lower panel: The (periodically-repeated) two-probe system. The unit cell of the central region is indicated with dashed lines while the unit cells of the electrodes are indicated by solid lines.

    Figure 5: Upper panel: Example for the constituents of a device system with 2 electrodes. The constituents are Left Electrode, Central Region, Right Electrode. Note that the first atoms in the central region must be positioned identical to the atoms in the left electrode. Similarly, the last atoms in the central region must be positioned relative to the right face of the unit cell, identical to the atoms in the right electrode. Lower panel: The (periodically-repeated) two-probe system. The unit cell of the central region is indicated with dashed lines while the unit cells of the electrodes are indicated by solid lines.


  • Vacuum basis sets (ghost atoms) can be included in the DeviceConfiguration, by specifying a ghost_atoms list for the BulkConfiguration of the central and electrode regions.