The Magnetic Tunnel Junction Builder tool is used in VNL for setting up calculations for a special type of two-probe systems: A magnetic tunnel junction.
Magnetic tunnel junctions are devices that can be modeled as an insulating thin layer sandwiched between magnetic metal electrodes.
In this tutorial we will:
Use the Magnetic Tunnel Junction Builder tool to build several Fe-MgO-Fe junctions with increasing depth of the insulating magnesium oxide layers.
Create NanoLanguage scripts with the NanoLanguage Scripter tool to calculate the zero-bias conductance for the configurations we have created — both with anti-parallel and parallel magnetic polarization of the electrodes.
Create a simple batch queue using the Job Manager tool to run all the jobs.
Analyze the resulting data.
We will guide you through some of the steps that you typically will do when you are working with magnetic tunnel junctions. Even though the tutorial takes you through everything step-by-step, it is assumed that you know the basics of how to work with VNL.
To launch the Magnetic Tunnel Junction Builder tool,
double-click the
icon in the Virtual NanoLab
Toolbar. The tool will open up, displaying the magnetic tunnel
junction initialized with default settings:
Using this tool, we will create a series of systems to model iron-magnesium oxide-iron interfaces, Fe-MgO-Fe, where the depth of the insulating magnesium oxide layer is of just a few atomic layers.
We will first adjust a few geometrical parameters to make the structures closer to the relaxed one: the minimum of the total potential energy. Note that this tutorial does not aim to fully relax the structure by finely adjusting all lattice constants and geometrical parameters, but to give a general scope of how to work with magnetic tunnel junctions. Define your system by taking the following steps.
Choose Fe in the Material (bcc, 100) drop-down list located under Electrodes. Make sure that the other values are set as follows: Lattice constant (A) = 2.866, and Layers = 4.
Under Surface layers set: Left surface= 2, Right surface= 2, Last layer separation (A)= 1.2, and Surface-oxygen distance (A) = 2.0.
Under Scattering region set: Material (B2)= MgO, Number of Layers= 2, Oxygen buckling (A)= 0.2, and all Layer separations = 2.19535 (the default value).
Under Global repetition set: Repetition along A= 1, Repetition along B= 1.
Now, all parameters have been set to produce the first magnetic tunnel junction
(with 2 layers of MgO between Fe electrodes). Next, create the configuration with
these settings by left-clicking the button labeled Save/Save
As. This will create a file called Fe-MgO-Fe.py, in
your working folder. Rename it to Fe-MgO_2Layers-Fe.py.
Next, return to the Magnetic Tunnel Junction
Builder tool, and change the Number of
Layers to 3 in the Scattering region
group box. Then create the corresponding NanoLanguage script and name this
Fe-MgO_3Layers-Fe.py.
Analogously, create the configurations and associated files for systems with 4 and 5 MgO layers.
Now, you should have the following files in your working directory:
“Fe-MgO_2Layers-Fe.py”,
“Fe-MgO_3Layers-Fe.py”,
“Fe-MgO_4Layers-Fe.py”,
“Fe-MgO_5Layers-Fe.py”. The files should contain
the configuration for magnetic tunnel junctions with, respectively, 2, 3, 4 and 5
layers of MgO between Fe electrodes.
The next step is to set up NanoLanguage scripts using the NanoLanguage Scripter tool to calculate the spin polarized transport properties (i.e. the transmission spectrum) for all the magnetic tunnel junction configurations you have just built. This you do by
Open the NanoLanguage Scripter tool by double-clicking the
icon.
Loading a configuration
Once you have opened the NanoLanguage Scripter, add one of the configurations you
created by drag-and-dropping the configuration file “Fe-MgO_2Layers-Fe.py”
from your file browser onto the open NanoLanguage Scripter window. The system is now
loaded into the NanoLanguage Scripter, and the Configuration tab
shows the structure. You
can also open and load the NanoLanguage Scripter directly by drag-and-drop
the configuration directly from the Magnetic Tunnel Junction Builder 3D-window to
the Scripter icon on the toolbar.
Figure 37: The Configuration tab in the NanoLanguage Scripter showing the magnetic tunnel junction system with two layers of insulating MgO material.
Setting calculation parameters
The next step is to specify the parameters for the calculation. It is far from trivial to select an optimal set of parameters, but the general rule of thumb is to select something that is reasonable (typically, the default initial guesses will), and then vary some of the most pertinent parameters to see if the result changes. In this tutorial, we have chosen to change quite a few parameters from their default values in order to increase the convergence and accuracy of the calculation.
|
|
Note |
|---|---|
|
It is far from obvious that these settings are good for your system, instead you should always check how your result depends on your choice of parameters. |
Start by left-clicking the Method tab. This opens the first of the method dialog windows:
Figure 38: The Method tab in the NanoLanguage Scripter. You navigate through the different method dialog windows by using the drop-down list, which is initially set to Basis set.
The parameters regulating how to solve the SCF equation is divided into groups that are displayed on different dialog windows. These can be navigated through using the top-level drop-down list of the Method tab, and is set to Basis set in Figure 38.
In this tutorial, we leave most parameters to their default values, but find that changing some of the parameters increase accuracy and convergence.
Navigate to the Brillouin-Zone-Integration dialog window by choosing Brillouin Zone Integration from the drop-down list. Set the Number of k-points to 5 in the A and B directions, and 100 in the C direction. C is always taken as the transport direction and typically requires much higher k-point sampling than the transversal directions (A and B).
Navigate to the Eigenstate-Occupation dialog window by choosing Eigenstate Occupation from the drop-down list, and set the Electrode Temperature to 1300 K for both the left and the right electrodes.
Navigate to the Electron-Density dialog window by choosing Electron Density from the drop-down list, and check the Heterogeneous check box under the frame for Spin . This enables you to specify the parameters in this window individually for the central region, for the left, and the right electrodes.
Check the Initial Scaled Spin radio button and set the value to 1 in the three input fields (left, central, and right). This instructs the program to start with the highest possible spin polarization on all atoms when solving the SCF equation.
Navigate to the Energy-Contour dialog window by choosing Energy Contour from the drop-down list. Set the Integral Lower Bound to 30 Ry and the Real Axis Infinitesimal to 0.1 eV.
Navigate to the Exchange-Correlation-Functional dialog window by choosing Exchange Correlation Functional from the drop-down list, and select GGA.PBE from the Exchange Correlation Functional drop-down list.
Navigate to the Iteration-Control dialog window by choosing Iteration Control from the drop-down list, and set the Max Steps to 1000. This is usually not necessary with these parameters, but it is always better to specify too many iterations than too few.
Navigate to the Iteration-Mixing dialog window by choosing Iteration Mixing from the drop-down list, and set the Diagonal Mixing Parameter to 0.05 and the History Steps to 10.
Navigate to the TwoProbe-Algorithm dialog window by choosing TwoProbe Algorithm from the drop-down list, and set the Electrode constraint to RealSpaceDensity,
After you have set up all the calculation parameters in the Method
tab, left-click on the Self-Consistent Calculation
tab. Type
Fe-MgO_2Layers-Fe.nc in the Checkpoint Filename
input field to specify
the name of the checkpoint file. The scripter window now looks like this
Figure 39: The Self-Consistent Calculation tab in the NanoLanguage Scripter after you have set the checkpoint filename.
Now that we have set up all the parameters to calculate and store the electron density, we also need to specify which properties to calculate for the system. This is done from the Analysis tab. Left-click the Analysis tab. Figure 40 shows the Analysis tab when you are done setting up the properties in this tutorial.
First, make sure the Store Results in VNL File
is
checked, and specify the name of the VNLFile by typing
Fe-MgO_2Layers-Fe.vnl in the VNLFile Name
input field.
Second, select Total energy from the Available Quantities list and press the > button to calculate and print out the total energy. Total energy now appears in the Selected Quantities list to the right.
Similarly, select Transmission spectrum from the Available Quantities list and press the > button. Transmission spectrum appears now in the Selected Quantities list to the right. Left-click the Transmission spectrum in the Selected Quantities list; a Calculate Transmission Spectrum panel appears. Specify that the transmission spectrum is calculated for 41 energies equally distributed from -0.2 to 0.2 eV by typing 41, -0.2, and 0.2 in the three Energies input fields. Change the number of k-points in the Brillouin zone integration to 5 by modifying Number of k-points both for the A and B directions.
The scripter window looks now like this
Figure 40: The Analysis tab in the NanoLanguage Scripter. You select the properties you want to calculate by selecting a function from the Available Quantities list and moving it over to the Available Quantities list by pressing the > button.
When you have specified all the parameters in the scripter, create your NanoLanguage
script by
left-clicking Save/Save As. A script named
twoprobe_configuration_script.py is created in your working
folder. Rename it to Fe-MgO_2Layers-Fe.py. Now, we have created
the NanoLanguage script for the parallel spin configuration and are ready to submit
the script. However, before we do that we go back to the Method tab
to generate a script to calculate the anti-parallel spin system.
Generating the anti-parallel case and modifying the script
Return to the Method tab and navigate to the electron-density dialog window. Change the initial scaled spin for the right electrode from 1 to -1; leave the other parameters the way they are. Generate a new script by left-clicking Save/Save As, and rename the script.
Open the generated NanoLanguage script with your favorite editor, and locate the section where the density parameters are defined for the central region, it should be lines 81-84 if you have followed this tutorial, which looks like this:
electron_density_parameters = electronDensityParameters(
mesh_cutoff = 150.0*Rydberg,
initial_scaled_spin = [ 1., 1., 1., 1., 1., 1., 1., 1., 1., 1. ]
)
Modify the elements in the list to look like this:
electron_density_parameters = electronDensityParameters(
mesh_cutoff = 150.0*Rydberg,
initial_scaled_spin = [ 1., 1., 0., 0., 0., 0., 0., 0., -1., -1. ]
)
This sets the initial spin-polarization of each surface atom to the maximum spin-up value for the left electrode and the maximum spin-down value for the right electrode. This is also what we want for the anti-parallel spin configuration. The insulating MgO layer is spin unpolarized and should therefore have the values 0; since MgO is a closed shell system, however, it does not make any difference if you leave these at the value 1.
Now, create the scripts for the remaining configurations,
i.e. Fe-MgO_3Layers-Fe.py,
Fe-MgO_4Layers-Fe.py, and
Fe-MgO_5Layers-Fe.py.
To create a simple batch queue for execution on a local system, the Job Manager tool can be used. From your file browser, simply drag-and-drop all the script files created in the previous section one by one onto the icon of the Job Manager tool (the tool is located in the Virtual NanoLab Toolbar.
The calculations will be executed in the order that they were submitted. Note that these calculations are relatively time consuming and it will take a powerful CPU and some patience to get the corresponding results. Depending on your CPU and memory, you might need to leave a single computer running for a couple of days.
An alternative method, that would eventually allow you to save time, is to execute the computations externally and in parallel if possible, using ATK. Note that several licenses for the Atomistix ToolKit are needed in this case.
We expect that the conductance of the magnetic tunnel junction device drops exponentially with the thickness of the central insulating layer (in this case the MgO layer). This is caused by the fact that the insulating layer acts as a tunneling barrier for the incident electrons, which is well-known property of 1D systems. Note that this is approximately a 1D case since the important variations of the system are only along the Z axis.
The other expectation — and this is why these devices have a high technological interest — is that the electrical conductance is strongly dependent on the magnetic polarization of the electrodes. When both electrodes have the same magnetic polarization (parallel polarization case) the conductance should be higher than in the case when both electrodes have opposite magnetization. In fact, for some devices, the difference in conductance between the parallel case and the anti-parallel can be of several orders of magnitude.
The results of this tutorial already show both of the above mentioned effects. In the following figure, we have plotted the conductance of the iron-magnesium oxide-iron junctions as a function of the number of MgO layers, both for the parallel and anti-parallel cases.
Figure 41: Conductance of the Fe-MgO-Fe junction as a function of the number of MgO layers. Both the parallel (red dots) and anti-parallel (green dots) magnetic polarization cases can be seen. As expected, the conductance of the device is much larger for the parallel polarization case and it decreases exponentially with the number of layers (solid lines are exponential fits).