Open boundaries

'''WARNING: The open boundaries implementation was removed in version 5.0.0 of Octopus and is no longer available.'''

This tutorial briefly sketches how to perform calculations with open (or transparent) boundaries in Octopus. Important: Please note that the features described in the following are still subject to changes and further development and certainly not as stable and reliable as required for production runs. Therefore, we very much appreciate feedback and bug reports (or even fixes).

Geometry

Open boundary calculations are only possible for the parallelepiped BoxShape, and only the planes perpendicular to the x-axis are transparent, ‘‘i. e.’’ the transport direction is along the ‘‘x’’-axis, all other boundaries are rigid walls like for the usual finite-system calculations. As the system is open at the “left” and “right” side we have to specify the character of the outside world here. This is done by giving a unit cell of two semi-infinite leads attached to the central or device region, yielding the following geometry (in 2D):

Open boundaries geometry
Open boundaries geometry

The red area is the device region also constituting the simulation box, ‘‘i. e.’’ the only part in space we treat explicitly in our simulations, which is attached to semi-infinite periodic leads (shown in green). The blue lines indicate the left and right open boundaries.

Overview of the method

Our approach to open-boundary calculations in Octopus generally consists of a three-step procedure:

Obtaining the ground state

Calculating the ground state for the above geometry requires two runs of Octopus:

We use the multi-dataset capabilities of Octopus to connect the two.

Our first example will calculate the scattering state of an attractive 1D square potential:

1D square well potential
1D square well potential

We begin with the calculation of the leads which are, in this case, flat and of zero potential, hence, we know that our result should be plane waves. We write the following input file in which we name our periodic dataset lead_ in order to reference it in subsequent calculations:


%CalculationMode
 "lead_"
 gs
%

FromScratch = yes
TheoryLevel = independent_particles

BoxShape = parallelepiped
Dimensions = 1
Spacing = 0.1

%Species
 "flat" | 0 | user_defined | 2.0 | "0"
%


- The lead.
lead_PeriodicDimensions = 1
%lead_Coordinates
 "flat" | 0 | 0 | 0
%

%lead_Lsize
 40*Spacing | 0 | 0
%

%lead_KPoints
 1 | 0.1 | 0 | 0
%

lead_Output = potential
lead_OutputHow = binary

We write out the potential in binary format because it is needed in the next run, where we will scatter the outcome of the periodic run at the square well. The following additions to the the input file will do the job:


%CalculationMode
 "lead_" | "well_"
 gs      | gs
%

<...>

V = 0.5
W = 10
%Species
 "flat" | 0 | user_defined | 2.0 | "0"
 "well" | 0 | user_defined | 2.0 | "V*(-step(x+W/2)+step(x-W/2))"
%

<...>

- The extended system with scattering center.
add_ucells = 2
%well_OpenBoundaries
 lead_dataset     | "lead_"
 lead_restart_dir | "lead_restart"
 lead_static_dir  | "lead_static"
 add_unit_cells   | add_ucells
%

%well_Coordinates
 "well" | 0 | 0 | 0
%

%well_Lsize
 20 | 0 | 0
%

A few points deserve comments:

Processing this input file with Octopus gives us the following eigenstate ($|\psi(x)|^2$ is plotted):

Extended eigenstate of 1D square well
Extended eigenstate of 1D square well

Before we turn our attention to a time-propagation, we briefly describe the console output of Octopus related to open boundaries:


******************************** Grid ********************************
<...>
Open boundaries in x-direction:
  Additional unit cells left:       3
  Additional unit cells right:      3
  Left lead read from directory:  lead_restart
  Right lead read from directory: lead_restart
<...>
Number of points in left  interface:     80
Number of points in right interface:     80
**********************************************************************

************************ Lead Green functions ************************
 st-  Spin  Lead     Energy
   1   --     L     0.005000
   1   --     R     0.005000
**********************************************************************

The Green’s functions of the leads are required to include the effects of the leads in the Lippmann-Schwinger equation for the simulation region. More information can be found in this [https://www.physik.fu-berlin.de/~lorenzen/physics/transport_nq_yrm08.pdf poster] which was presented at the 5th Nanoquanta Young Researchers Meeting 2008.

Time propagation

We give two small examples for time propagations.

TODO: Add examples with TD potentials in the central region and in the leads. Give an example of a calculation of an I-V-curve (as soon as current calculation is fixed).

Propagating an eigenstate

As a first time-dependent simulation we simply propagate the eigenstate obtained in the previous section in time without any external influences. We expect that $|\psi(x)|^2$ will not change and that $\psi(x)$ picks up a phase which is shown in this movie:

file=Open_boundaries_square_well_eigenstate_propagation.swf|width=720|height=504|quality=best

In order to obtain the input data for the movie we add a third dataset to our input file starting a td calculation:


%CalculationMode
 gs      | gs      | td
 "lead_" | "well_" | "well_"
 1       | 2       | 3
%

Note that this dataset shares label with the ground state run. This enables Octopus to find the correct initial state and avoids the need to repeat the OpenBoundaries block. Apart from the td dataset we only have to give the usual TD parameters: timestep and number of steps in the propagation.


TDMaximumIter = 300
TDTimeStep = 0.5

For completeness, we mention some of Octopus’ output related to open boundaries in TD propagations:


************************** Open Boundaries ***************************
Type of memory coefficients:           full
MBytes required for memory term:     59.326
Maximum BiCG iterations:                100
BiCG residual tolerance:            1.0E-12
Included additional terms:              memory source
TD lead potential (L/R):                  0         0
**********************************************************************

This block gives some details about the parameters of the propagation algorithm:

The calculation of the memory coefficients is accompanied by the oputput


Info: Calculating missing coefficients for memory term of left lead.
[ 52/301]  17%|****                      |     05:06 ETA

and takes very long. Indeed, this is one of the bottlenecks in the algorithm.

Propagation of a Gaussian wavepacket

Our second example is the propagation of a Gaussian-shaped charge distribution in 2D that is initially completely localized in the central region. This calculation is the “standard” test for all implementations of open boundaries. Therefore, it is worth repeating it here. As there are no charges outside the central region we have to disable the source term which is repsonsible for injection of density into our simulation region. Furthermore, the initial state of our time propagation is now given as an entry in the UserDefinedStates block and not as the result of a ground state calculation. Nevertheless, the two ground-state calculations for a completely flat 2D strip have to be performed to initialize certain datastructures.

The part of the input describing the flat 2D strip looks like this:


%CalculationMode
 gs      | gs
 "lead_" | "flat_"
%

FromScratch = yes

TheoryLevel = independent_particles

Dimensions = 2
BoxShape = parallelepiped
Spacing = 0.25

%Species
 "flat" | 0 | user_defined | 2.0 | "0"
%

- The lead.
lead_PeriodicDimensions = 1
%lead_Coordinates
 "flat" | 0 | 0 | 0
%
%lead_Lsize
 4*Spacing | 4 | 0
%
%lead_KPoints
 1 | 0.25 | 0 | 0
%
lead_Output = potential
lead_OutputHow = binary

- The central region.
%flat_OpenBoundaries
 lead_dataset     | "lead_"
 lead_restart_dir | "lead_restart"
 lead_static_dir  | "lead_static"
 add_unit_cells   | 0
%
%flat_Coordinates
 "flat" | 0 | 0 | 0
%
%flat_Lsize
 4 | 4 | 0
%

For the propagation we now override the initial state by giving an explicit formula of a 2D Gaussian wavepacket with initial momentum $(1.75, 1)$


i = {0, 1}
kx = 1.75
ky = 1.0
alpha = 0.5
i = {0, 1}
flat_OnlyUserDefinedInitialStates = yes
%flat_UserDefinedStates
 1 | 1 | 1 | formula | "exp(i*(kx*x + ky*y))*exp(-alpha*r*r)"
%

and add the TD dataset:


%CalculationMode
 gs      | gs      | td
 "lead_" | "flat_" | "flat_"
%

We disable the source term by the line


flat_OpenBoundariesAdditionalTerms = mem_term

The default of OpenBoundariesAdditonalTerms is mem_term + src_term, so solely giving mem_term disables the source term.

Feeding the input into Octopus and generating a movie of $|\psi(x, y, t)|^2$ gives

file=Open_boundaries_wavepacket_propagation.swf|width=720|height=504|quality=best

Since the wavepacket has an initial momentum in the $x$- as well as in $y$-directions, the open boundary at the right and the rigid wall at the back are easily recognized.

References



  1. S. Kurth, G. Stefanucci, C.-O. Almbladh, A. Rubio, E. K. U. Gross, Time-dependent quantum transport: A practical scheme using density functional theory, Phys. Rev. B 72 35308 (2005);  ↩︎