Name

Eigenstate — Class for calculating an eigenstate

Synopsis

Namespace: NanoLanguage
Eigenstate(
configuration,
quantum_number,
projection_list,
spin
)

Description

A class for calculating the eigenstate of a particular orbital in a configuration.

Eigenstate Arguments

configuration

The configuration for which the eigenstate should be calculated.

Type: MoleculeConfiguration | BulkConfiguration | DeviceConfiguration

quantum_number

The quantum number of the desired eigenstate.

Type: integer

Default: 0
projection_list

Specifies the orbitals within the configuration to include in the calculation.

Type: ProjectionList.

Default: All atoms included : ProjectionList(All)
spin

The spin to calculate the eigenstate for.

Type: Spin.Up | Spin.Down

Default: Spin.Up

Eigenstate Methods

A Eigenstate object provides the following methods:

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

    x

    The cartesian x coordinate.

    Type: physical quantity with type length.

    y

    The cartesian y coordinate.

    Type: physical quantity with type length.

    z

    The cartesian z coordinate.

    Type: physical quantity with type length.

  • evaluate(x, y, z): Evaluate in the point x,y,z

    x

    The cartesian x coordinate.

    Type: physical quantity with type length.

    y

    The cartesian y coordinate.

    Type: physical quantity with type length.

    z

    The cartesian z coordinate.

    Type: physical quantity with type length.

  • gridCoordinate(i, j, k): Return the coordinate for a given grid index.

    i

    The grid index in the A direction.

    Type: integer

    j

    The grid index in the B direction.

    Type: integer

    k

    The grid index in the C direction.

    Type: integer

  • nlprint(stream): Print a string containing an ASCII table useful for plotting the eigenstate.

    stream

    The stream the eigenstate should be written to.

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

    Default: sys.stdout
  • scale(scale): Scale the field with a double.

    scale

    The parameter to scale with.

    Type: float

  • shape(): Query function for getting the shape of the data.

  • spin(): Query for the spin.

  • toArray(): Return the values of the grid as a numpy array slicing off any units.

  • unit(): Get the unit of the data in the grid.

  • unitCell(): Return the unit cell for the grid.

  • volumeElement(): Get the volume element of the grid.

Usage Examples

Calculate and save the eigenstate for water molecule in a NetCDF file.

# Define elements
elements = [Oxygen, Hydrogen, Hydrogen]

# Define coordinates
cartesian_coordinates = [[  0.0,   0.000000000000,   1.20198000e-01],
                         [  0.0,   7.59572000e-01,  -4.86714000e-01],
                         [  0.0,  -7.59606000e-01,  -4.86721000e-01]]*Angstrom

# Set up configuration
molecule_configuration = MoleculeConfiguration(
    elements=elements,
    cartesian_coordinates=cartesian_coordinates
    )

# define a a calculator
molecule_configuration.setCalculator(LCAOCalculator())

# calculate and save the eigenstate with quantum number 0
eigenstate = Eigenstate(molecule_configuration, 0)
nlsave('eigenstate.nc', eigenstate)

eigenstate.py

For examples on how to average and handle 3-d grids, see the examples for ElectronDifferenceDensity and ElectrostaticDifferencePotential.

Notes

Using a projection list means that only the part of the Hamiltonian involving the atoms in the projection list will be used in the diagonalization to find the eigenstates.

Notice that the Eigenstate method neglects interactions across the unit cell boundaries. This makes sense physically for a MoleculeConfiguration where the interactions are artifacts of the calculation. For the BulkConfiguration and DeviceConfiguration however, the interactions across cell boundaries represent something real, so care should be taken when interpreting the results. For BulkConfiguration see Bloch state for an alternative analysis object.