# 2.1. Zigzag graphene nanoribbon

Zigzag graphene nanoribbons (ZGNRs) can be obtained by cutting the planar honeycomb network of carbon atoms into quasi-one-dimensional structures along a given direction. The edges of graphene nanoribbons need to consider hydrogen passivation to satisfy all carbon valence electron bonding, which is necessary for infinite structures. The ZGNRs have been predicted to be half-metallic, ferromagnetic, and antiferromagnetic with magnetic moments at the edge sites. These edge states have been observed in scanning tunneling microscopy and are full of significance [KFEK06]. For instance, the electronic structure around the Fermi level is generally dominated by edge states, which influence the transport characteristics of ZGNR-based devices [SCL06]. Here we will study the electronic transport through a ZGNR in the FM and AFM configurations.

## 2.1.1. Building 4ZGNR device

The ZGNR can be classified by the number (N) of the carbon chains in the width as NZGNR. For practical purposes of this tutorial, we will consider a pristine 4ZGNR, periodic along the z direction. This device can be built using Device Studio modeling as shown in Fig. 2.1.2:

Open Device Studio software, go to the menu bar and click

**Build**➟**Gr_Nanoribbon**;In the

**Gr_Nanoribbon**window, check**passivate dangling bonds with hydrogen at**option, set**n = 2**and**m = 2**, click**Preview**and**Build**the structure.

In the menu bar click

**Build**➟**Redefine Crystal**;Expand the cell

**15**times in the c direction, click on**Preview**and**Build**the structure.

In the menu bar click

**Build**➟**Convert to Device**, check**Left electrode**and**Right electrode**options, click**Preview**and**Build**the structure.

## 2.1.2. SCF for electrode

The proposed device Fig. 2.1.1 can be divided into three regions: two electrodes (left and right) and a central region. The left and right electrodes are semi-infinite with periodic boundary conditions along the \(\pm\) z-direction and don’t differ from each other. The central region is terminated by buffer regions (electrode copies) and a scattering region in between. The calculation of a two-probe system typically consists of the following steps:

SCF calculation for the electrodes;

NEGF-SCF calculation for the scattering region.

The required input files for these steps could be generated using Device Studio with NanoDCAL module simulator, as follows:

In the menu bar of Device Studio, click

**Simulator**➟**NanoDCAL**➟**SCF Calculation**to pop up the interface shown in Fig. 2.1.3;Users can set calculation parameters related to SCF-NEGF method;

In this example the default parameters will be used, except for the

**Spin type**option, which will be set as**CollinearSpin**.

Click

**Generate files**;The Device Studio will create a new folder that contain the

*scf.input*files of**LeftElectrode**,**RightElectrode**and**Device**.

Now, we are ready to start the calculations. But, before doing that we’ll briefly present the simulation parameters specified in the generated files.

Electrode SCF input file

```
%%What quantities should be calculated
calculation.name = scf
%Basic setting
calculation.occupationFunction.temperature = 100
calculation.realspacegrids.E_cutoff = 80 Hartree
calculation.xcFunctional.Type = LDA_PZ81
calculation.k_spacegrids.number = [ 1 1 100 ]'
system.centralCellVectors = [[31.36 0 0]' [0 20 0]' [0 0 2.4595]']
system.spinType = CollinearSpin
%Iteration control
calculation.SCF.monitoredVariableName = {'rhoMatrix','hMatrix','totalEnergy','bandEnergy','gridCharge','orbitalCharge','spinPolar'}
calculation.SCF.convergenceCriteria = {1e-04,1e-04,[],[],[],[],[]}
calculation.SCF.maximumSteps = 200
calculation.SCF.mixMethod = Pulay
calculation.SCF.mixRate = 0.1
calculation.SCF.mixingMode = H
calculation.SCF.startingMode = H
%calculation.SCF.donatorObject = NanodcalObject.mat
```

The keywords specify the following:

`calculation.name`

This input parameter specifies the task that NanoDCAL should perform.`calculation.occupationFunction.temperature`

Electronic temperature of the system, in the unit of K.`calculation.realspacegrids.E_cutoff`

The equivalent energy cut-off of the grid density.`calculation.xcFunctional.Type`

The type of exchange-correlation functional to be used.`calculation.k_spacegrids.number`

The small k-space grid number in each direction. It is used to divide the Brillouin zone into the input number of small grids.`system.centralCellVectors`

This parameter defines the three base vectors of the central cell, either the primitive or super cell for a periodic system or the central scattering region for an open system, which is with a shape of parallelepiped.`system.spinType`

Determines the spin description.`calculation.SCF.monitoredVariableName`

Name list of variables to be monitored.`calculation.SCF.convergenceCriteria`

The SCF loop will stop when all monitored variables satisfy this criteria.`calculation.SCF.maximumSteps`

Name list of variables to be monitored.`calculation.SCF.convergenceCriteria`

The maximum steps in the SCF cycle.`calculation.SCF.monitoredVariableName`

Name list of variables to be monitored.`calculation.SCF.mixMethod`

With this parameter an user may select a built-in mixer.`calculation.SCF.mixRate`

A parameter to control the mixing rate with the method selected by the parameter calculation.SCF.mixMethod.`calculation.SCF.mixingMode`

In the SCF iterations, the mixing value could be any of Hamiltonian matrix, rho matrix, and real space density.`calculation.SCF.startingMode`

The SCF cycle can start from different physical quantities.`calculation.SCF.donatorObject`

The value of the starting physical quantity will be taken from the donatorObject.

The electrode input file ends with atomic basis set, *xyz* positions and initial polarization of each atom.

```
%Basic set
system.neutralAtomDataDirectory = '../'
system.atomBlock = 10
AtomType OrbitalType X Y Z SpinPolarization
C LDA-DZP 12.12999997 10.00000000 1.84463412 1
C LDA-DZP 12.83999999 10.00000000 0.61487804 1
C LDA-DZP 14.25999999 10.00000000 0.61487804 1
C LDA-DZP 14.96999998 10.00000000 1.84463412 1
C LDA-DZP 16.39000000 10.00000000 1.84463412 1
C LDA-DZP 17.10000000 10.00000000 0.61487804 1
C LDA-DZP 18.51999998 10.00000000 0.61487804 1
C LDA-DZP 19.23000000 10.00000000 1.84463412 1
H LDA-DZP 11.03500000 10.00000000 1.84463412 1
H LDA-DZP 20.32499998 10.00000000 1.84463412 1
end
```

The keywords specifies the following:

`system.neutralAtomDataDirectory`

Directory containing neutral atom (basis) files`system.atomBlock`

This block defines the number, type, orbital,*xyz*positions and spin polarization state of each atom in the system.

Note

The `SpinPolarization`

column is useful to break the symmetry between spin up and spin down, allowing magnetic solutions.
Therefore, in order to obtain the AFM state properties, we set a different `SpinPolarization`

pattern in the electrode and central region input files.

Tip

There is an alternative way to specify `system.atomBlock`

data content. When doing this, the `system.atomFile`

should be included in the electrode *scf.input* file.
Assuming that the atomic data is specified in *4zgnr-FM.xyz* file, the following block could be included in the electrode *scf.input*:

%Basic set system.neutralAtomDataDirectory = '../' system.atomBlock = 10 system.atomFile = 4zgnr-FM.xyz

In order to perform the transport calculation, we first have to calculate Hamiltonian from both electrodes. However, as we discussed before, the left and right electrodes are the same in this pristine device. Thus, the next calculations will be performed only with the left electrode.

Running the electrode scf.input

To perform the calculation download the input file `4ZGNR.elec.scf.input`

, or use Device Studio as following:

On the Device Studio navigate to the Project panel:

Go to the

**LeftElectrode**folder ➟ right click over*scf.input*file ➟**run**to pop up the Run dialog window, as shown in Fig. 2.1.4;In the Run window, press

**run**;Once the calculation has completed, the results will be returned to the

**LeftElectrode**folder.

Optionally, several ground state properties of the system could also be calculated from the obtained SCF results. In fact, the electronic properties of the electrode could be relevant to further analys of transport properties. In the next step, we’ll show how to calculate the electrode band structure.

## 2.1.3. The electrode band structure

In the Device Studio navigate to the menu bar, click on

**Simulator**➟**NanoDCAL**➟**Analysis**to set physical quantity, as shown in Fig. 2.1.5;In the

**Analysis**window, on the top left choose the**LeftElectrode**option.Navigate to the

**Analysis**panel (left side) ➟ select**BandStructure**➟ click on the*Right arrow*button to transfer**BandStructure**calculator to the**Calculation Selected**panel.

The

**Symmetry k-points**and**Number of k-points**are show on the right side, click on**path**to see/edit the K-paths along the high-symmetry points in the Brillouin zone and press**Apply**. Returning to the**Analysis**window, click**Generate files**to create the*BandStructure.input*file.

Band structure input file:

```
%%What quantities should be calculated
system.object = NanodcalObject.mat
calculation.name = bandstructure
calculation.bandStructure.symmetryKPoints = {'G','Z'}
calculation.bandStructure.numberOfKPoints = 200
calculation.bandStructure.plot = true
calculation.control.xml = true
```

The keywords specifies the following:

`calculation.bandStructure.symmetryKPoints`

The k-space fractional coordinates of those high symmetry k-points listed in symmetryKPoints, each column corresponds to one of them.`calculation.bandStructure.coordinatesOfTheSymmetryKPoints`

If an integer, it is the total number of K-points used to represent the entire band structure. If an integer array, the number of k-points used to represent each section of the band structure between those high symmetry points.`calculation.bandStructure.plot`

If true, a plot will be given after the calculation.`calculation.control.xml`

If true, a data file will be given after the calculation.

As we done before, run the *BandStructure.input* file (`4ZGNR.elec.bands.input`

), once the calculation finish the *.xml* results will return to the **LeftElectrode** folder.

Tip

The calculated results from NanoDCAL code will be given in *.mat* and *.xml* file format. In this tutorial we’ll be focus in the second one, which can be read using the Device Studio interface. However, the *.mat* results could also be loaded using *MATLAB* platform.

Spin-polarized band structure

The band structure of the 4ZGNR system in the AFM and FM spin orientations are presented in Fig. 2.1.6. Important physical insights can be taken from theses results. In the AFM configuration, the edge states of ZGNRs are expected to be spin-polarized owing to their high degeneracy, which can be seen in the flat bands around the Fermi level [KK08]. In addition, in this state, the 4ZGNR present a semiconductor behavior with a direct bandgap of 0.41 eV, while in the FM configuration the nanoribbon becomes metallic.

## 2.1.4. The electrode charge calculation

In the Device Studio navigate to the menu bar, click on

**Simulator**➟**NanoDCAL**➟**Analysis**to set physical quantity, as shown in Fig. 2.1.5;In the

**Analysis**window, near the top left corner, choose the**LeftElectrode**option.Navigate to the

**Analysis**panel (left side) ➟ select**Charge**➟ click on the*Right arrow*button to transfer**Charge**calculator to the*Calculation Selected*panel. Go to the**Charge**tab ➟ on the**Project**section choose**Atom**and click**Generate files**.

Note

In this example we considered the ferromagnetic (FM) ordering. The user should be able repeat the procedure to explore the AF configuration.

The Device Studio will include the *charge.input* file in the electrode folder as follow:

Charge input file

```
calculation.name = charge
system.object = NanodcalObject.mat
calculation.charge.whatProjected = 'Atom'
calculation.control.xml = true
```

Most of these keywords were already specified here. Thus, we’ll focus on the particular keyword that plays an important role in the analysis of the physical properties of the studied system.

The keywords specify the following:

`calculation.charge.whatProjected`

If ‘Ell’, the number of electrons with the given angular momentum will be calculated.

If ‘Orbital’ or ‘Atom’, the number of electrons of the listed orbitals or atoms will be calculated. If ‘Grid’, the charge in the listed grids will be calculated. If ‘None’, the total number of electrons will be calculated.

Run the calculation with the file `4ZGNR.elec-charge.input`

.

After the calculation is finished, the following output files are generated: *CalculatedResults.mat*, *log.txt*, and *Charge.mat*.
The *.mat* results can be loaded using the *MATLAB* platform.

Charge analysis

The output file has the following information:

```
totalCharge ➟ [3.92971689161881; 3.95043395676725; 3.99411113566212; 3.99469680950811; 3.99469680950825; 3.99411113566205; 3.95043395676723; 3.92971689161882; 1.13104120644364; 1.13104120644364]
spinPolarizedCharge_r ➟ [0.18658085; 0.019102275; 0.023152719; 0.005908618; 0.005908618; 0.023152719; 0.019102275; 0.18658085; 0.006002426; 0.006002426]
spinPolarizedCharge_theta ➟ [0; 3.141592654; 0; 3.141592654; 3.141592654; 0; 3.141592654; 0; 0; 0]
spinPolarizedCharge_phi ➟ [0;...;0]
spinMagneticMoment ➟ [1.08E-05; 1.11E-06; 1.34E-06; 3.42E-07; 3.42E-07; 1.34E-06; 1.11E-06; 1.08E-05; 3.47E-07; 3.47E-07]
whatProjected ➟ atom
indexProjected ➟ [1 2 3 4 5 6 7 8 9 10]
```

The spin-polarized charge is defined as a vector that is along the spin-polarized direction with an amplitude of \(N_{p}\) or \(N_{ap}\), where \(N_{p}\) and \(N_{ap}\) are the numbers of electrons whose spin are parallel or anti-parallel to the spin-polarized direction. In the output file each physical quantities can be analyzed as follow:

totalCharge (\(N_{p}\) and \(N_{ap}\)): Represents the total projected charges spin;

spinPolarizedCharge_r (\(N_{p}\) and \(N_{ap}\)): Represents the net spin;

spinPolarizedCharge_theta and _phi : The results are consider to define the spin polarized direction in the conventional spherical coordinate system;

spinMagneticMoment: The calculated results corresponds to spin magnetic moment in unit of “eV/Tesla”;

whatProjected: The type to which the charges are projected;

indexProjected: The index of those components whose spin-polarized charge is calculated.

It is well established that ZGNRs possess localized electron states arising at their edges and with energies very close to Fermi level. These states have a small magnetic moment with the highest contribution from the carbon atoms at the edges, as we expect [EHFC10].

## 2.1.5. SCF for two-probe system

Having calculated the electrodes, we move forward to carry out the two-probe transport calculation.
Again, we present a briefly description of the *scf.input* from the central region.

Central region SCF input file

```
%%What quantities should be calculated
calculation.name = scf
%Basic setting
calculation.occupationFunction.temperature = 100
calculation.realspacegrids.E_cutoff = 80 Hartree
calculation.xcFunctional.Type = LDA_PZ81
calculation.k_spacegrids.number = [ 1 1 1 ]'
%Description of electrode
system.numberOfLeads = 2
system.typeOfLead1 = left
system.voltageOfLead1 = 0
system.objectOfLead1 = ../LeftElectrode/NanodcalObject.mat
system.typeOfLead2 = right
system.voltageOfLead2 = 0
system.objectOfLead2 = ../LeftElectrode/NanodcalObject.mat
%Contour integral
%calculation.complexEcontour.lowestEnergyPoint = 1.5 Hartree
calculation.complexEcontour.numberOfPoints = 40
calculation.realEcontour.interval = 0.0272114
calculation.realEcontour.eta = 0.0272114
system.centralCellVectors = [[31.36 0 0]' [0 20 0]' [0 0 31.9737]']
system.spinType = CollinearSpin
%Iteration control
calculation.SCF.monitoredVariableName = {'rhoMatrix','hMatrix','totalEnergy','bandEnergy','gridCharge','orbitalCharge','spinPolar'}
calculation.SCF.convergenceCriteria = {1e-04,1e-04,[],[],[],[],[]}
calculation.SCF.maximumSteps = 200
calculation.SCF.mixMethod = Pulay
calculation.SCF.mixRate = 0.1
calculation.SCF.mixingMode = H
calculation.SCF.startingMode = H
%calculation.SCF.donatorObject = NanodcalObject.mat
```

The keywords are specifies the following:

`system.numberOfLeads`

The number of leads (probes) in the system.`system.typeOfLead1`

The value must be given for each of the leads in the system. It describes the relative position of the lead to the central scattering region.`system.voltageOfLead1`

The bias voltage applied to the lead, in the unit of Volt. The change of chemical potential of the lead due to the bias voltage is -eV.`system.objectOfLead1`

The calculation of a system with leads can be performed in two steps. The first step is to perform calculation for each lead which is considered equivalently as an infinite periodic system. In the second step, the physical properties (potential, density etc.) of the leads are used as boundary conditions applied to the central scattering region of the device. In this scenario, this input value is normally a filename of the calculated and saved results of the leads.`calculation.complexEcontour.lowestEnergyPoint`

The lowest energy point on the complex energy contour.`calculation.complexEcontour.numberOfPoints`

Number of energy points used on the complex energy contour for integrating the equilibrium part of the lesser Green’s function.`calculation.realEcontour.interval`

Energy interval used to determine the number of energy points for integrating the non-equilibrium part of lesser Green’s function on the real energy axis.`calculation.realEcontour.eta`

the small eta used in the calculation of self-energy and/or Green’s function along the real energy contour.

This input file also ends with atomic basis set, *xyz* positions and initial polarization of each atom, which can be viewed below:

```
%Basic set
system.neutralAtomDataDirectory = '../'
system.atomBlock = 130
AtomType OrbitalType X Y Z SpinPolarization
C LDA-DZP 12.12999997 10.00000000 1.84464625 1
C LDA-DZP 12.12999997 10.00000000 4.30415840 1
C LDA-DZP 12.12999997 10.00000000 6.76367053 1
C LDA-DZP 12.12999997 10.00000000 9.22318268 1
C LDA-DZP 12.12999997 10.00000000 11.68269483 1
C LDA-DZP 12.12999997 10.00000000 14.14220699 1
C LDA-DZP 12.12999997 10.00000000 16.60171911 1
C LDA-DZP 12.12999997 10.00000000 19.06123128 1
C LDA-DZP 12.12999997 10.00000000 21.52074341 1
C LDA-DZP 12.12999997 10.00000000 23.98025557 1
C LDA-DZP 12.12999997 10.00000000 26.43976771 1
C LDA-DZP 12.12999997 10.00000000 28.89927987 1
C LDA-DZP 12.12999997 10.00000000 31.35879200 1
C LDA-DZP 12.83999999 10.00000000 0.61489017 1
C LDA-DZP 12.83999999 10.00000000 3.07440231 1
C LDA-DZP 12.83999999 10.00000000 5.53391447 1
C LDA-DZP 12.83999999 10.00000000 7.99342662 1
C LDA-DZP 12.83999999 10.00000000 10.45293876 1
C LDA-DZP 12.83999999 10.00000000 12.91245091 1
C LDA-DZP 12.83999999 10.00000000 15.37196306 1
C LDA-DZP 12.83999999 10.00000000 17.83147521 1
C LDA-DZP 12.83999999 10.00000000 20.29098735 1
C LDA-DZP 12.83999999 10.00000000 22.75049950 1
C LDA-DZP 12.83999999 10.00000000 25.21001164 1
C LDA-DZP 12.83999999 10.00000000 27.66952377 1
C LDA-DZP 12.83999999 10.00000000 30.12903594 1
C LDA-DZP 14.25999999 10.00000000 0.61489017 1
C LDA-DZP 14.25999999 10.00000000 3.07440231 1
C LDA-DZP 14.25999999 10.00000000 5.53391447 1
C LDA-DZP 14.25999999 10.00000000 7.99342662 1
C LDA-DZP 14.25999999 10.00000000 10.45293876 1
C LDA-DZP 14.25999999 10.00000000 12.91245091 1
C LDA-DZP 14.25999999 10.00000000 15.37196306 1
C LDA-DZP 14.25999999 10.00000000 17.83147521 1
C LDA-DZP 14.25999999 10.00000000 20.29098735 1
C LDA-DZP 14.25999999 10.00000000 22.75049950 1
C LDA-DZP 14.25999999 10.00000000 25.21001164 1
C LDA-DZP 14.25999999 10.00000000 27.66952377 1
C LDA-DZP 14.25999999 10.00000000 30.12903594 1
C LDA-DZP 14.96999998 10.00000000 1.84464625 1
C LDA-DZP 14.96999998 10.00000000 4.30415840 1
C LDA-DZP 14.96999998 10.00000000 6.76367053 1
C LDA-DZP 14.96999998 10.00000000 9.22318268 1
C LDA-DZP 14.96999998 10.00000000 11.68269483 1
C LDA-DZP 14.96999998 10.00000000 14.14220699 1
C LDA-DZP 14.96999998 10.00000000 16.60171911 1
C LDA-DZP 14.96999998 10.00000000 19.06123128 1
C LDA-DZP 14.96999998 10.00000000 21.52074341 1
C LDA-DZP 14.96999998 10.00000000 23.98025557 1
C LDA-DZP 14.96999998 10.00000000 26.43976771 1
C LDA-DZP 14.96999998 10.00000000 28.89927987 1
C LDA-DZP 14.96999998 10.00000000 31.35879200 1
C LDA-DZP 16.39000000 10.00000000 1.84464625 1
C LDA-DZP 16.39000000 10.00000000 4.30415840 1
C LDA-DZP 16.39000000 10.00000000 6.76367053 1
C LDA-DZP 16.39000000 10.00000000 9.22318268 1
C LDA-DZP 16.39000000 10.00000000 11.68269483 1
C LDA-DZP 16.39000000 10.00000000 14.14220699 1
C LDA-DZP 16.39000000 10.00000000 16.60171911 1
C LDA-DZP 16.39000000 10.00000000 19.06123128 1
C LDA-DZP 16.39000000 10.00000000 21.52074341 1
C LDA-DZP 16.39000000 10.00000000 23.98025557 1
C LDA-DZP 16.39000000 10.00000000 26.43976771 1
C LDA-DZP 16.39000000 10.00000000 28.89927987 1
C LDA-DZP 16.39000000 10.00000000 31.35879200 1
C LDA-DZP 17.10000000 10.00000000 0.61489017 1
C LDA-DZP 17.10000000 10.00000000 3.07440231 1
C LDA-DZP 17.10000000 10.00000000 5.53391447 1
C LDA-DZP 17.10000000 10.00000000 7.99342662 1
C LDA-DZP 17.10000000 10.00000000 10.45293876 1
C LDA-DZP 17.10000000 10.00000000 12.91245091 1
C LDA-DZP 17.10000000 10.00000000 15.37196306 1
C LDA-DZP 17.10000000 10.00000000 17.83147521 1
C LDA-DZP 17.10000000 10.00000000 20.29098735 1
C LDA-DZP 17.10000000 10.00000000 22.75049950 1
C LDA-DZP 17.10000000 10.00000000 25.21001164 1
C LDA-DZP 17.10000000 10.00000000 27.66952377 1
C LDA-DZP 17.10000000 10.00000000 30.12903594 1
C LDA-DZP 18.51999998 10.00000000 0.61489017 1
C LDA-DZP 18.51999998 10.00000000 3.07440231 1
C LDA-DZP 18.51999998 10.00000000 5.53391447 1
C LDA-DZP 18.51999998 10.00000000 7.99342662 1
C LDA-DZP 18.51999998 10.00000000 10.45293876 1
C LDA-DZP 18.51999998 10.00000000 12.91245091 1
C LDA-DZP 18.51999998 10.00000000 15.37196306 1
C LDA-DZP 18.51999998 10.00000000 17.83147521 1
C LDA-DZP 18.51999998 10.00000000 20.29098735 1
C LDA-DZP 18.51999998 10.00000000 22.75049950 1
C LDA-DZP 18.51999998 10.00000000 25.21001164 1
C LDA-DZP 18.51999998 10.00000000 27.66952377 1
C LDA-DZP 18.51999998 10.00000000 30.12903594 1
C LDA-DZP 19.23000000 10.00000000 1.84464625 1
C LDA-DZP 19.23000000 10.00000000 4.30415840 1
C LDA-DZP 19.23000000 10.00000000 6.76367053 1
C LDA-DZP 19.23000000 10.00000000 9.22318268 1
C LDA-DZP 19.23000000 10.00000000 11.68269483 1
C LDA-DZP 19.23000000 10.00000000 14.14220699 1
C LDA-DZP 19.23000000 10.00000000 16.60171911 1
C LDA-DZP 19.23000000 10.00000000 19.06123128 1
C LDA-DZP 19.23000000 10.00000000 21.52074341 1
C LDA-DZP 19.23000000 10.00000000 23.98025557 1
C LDA-DZP 19.23000000 10.00000000 26.43976771 1
C LDA-DZP 19.23000000 10.00000000 28.89927987 1
C LDA-DZP 19.23000000 10.00000000 31.35879200 1
H LDA-DZP 11.03500000 10.00000000 1.84464625 1
H LDA-DZP 11.03500000 10.00000000 4.30415840 1
H LDA-DZP 11.03500000 10.00000000 6.76367053 1
H LDA-DZP 11.03500000 10.00000000 9.22318268 1
H LDA-DZP 11.03500000 10.00000000 11.68269483 1
H LDA-DZP 11.03500000 10.00000000 14.14220699 1
H LDA-DZP 11.03500000 10.00000000 16.60171911 1
H LDA-DZP 11.03500000 10.00000000 19.06123128 1
H LDA-DZP 11.03500000 10.00000000 21.52074341 1
H LDA-DZP 11.03500000 10.00000000 23.98025557 1
H LDA-DZP 11.03500000 10.00000000 26.43976771 1
H LDA-DZP 11.03500000 10.00000000 28.89927987 1
H LDA-DZP 11.03500000 10.00000000 31.35879200 1
H LDA-DZP 20.32499998 10.00000000 1.84464625 1
H LDA-DZP 20.32499998 10.00000000 4.30415840 1
H LDA-DZP 20.32499998 10.00000000 6.76367053 1
H LDA-DZP 20.32499998 10.00000000 9.22318268 1
H LDA-DZP 20.32499998 10.00000000 11.68269483 1
H LDA-DZP 20.32499998 10.00000000 14.14220699 1
H LDA-DZP 20.32499998 10.00000000 16.60171911 1
H LDA-DZP 20.32499998 10.00000000 19.06123128 1
H LDA-DZP 20.32499998 10.00000000 21.52074341 1
H LDA-DZP 20.32499998 10.00000000 23.98025557 1
H LDA-DZP 20.32499998 10.00000000 26.43976771 1
H LDA-DZP 20.32499998 10.00000000 28.89927987 1
H LDA-DZP 20.32499998 10.00000000 31.35879200 1
end
```

Run the *scf.input* file from the **Device** (`4ZGNR.CentralRegion.scf.input`

).

## 2.1.6. Transmission calculation

Once the self-consistent two-probe calculation finish, it is time to compute the most fundamental quantum transport property, the transmission spectrum.
The *transmission.input* file can be created following the steps below:

In menu bar of Device Studio, click on

**Simulator**➟**NanoDCAL**➟**Analysis**to set physical quantity, as shown in Fig. 2.1.7;In the

**Analysis**window, on the top left choose the**Device**option;Navigate to the

**Analysis**panel (left side) ➟ select**Transmission**➟ click on the*Right arrow*button to transfer**Transmission**calculator to the**Calculation Selected**panel.

The

**TransmissionSpectrum**options are shown in the right side of the**Analysis**window. Edit the**k-point sampling**set to**n1 = 1**,**n2 = 1**and**n3 = 100**and click**Generate files**.

Transmission input file

```
%%What quantities should be calculated
system.object = NanodcalObject.mat
calculation.name = transmission
calculation.transmission.kSpaceGridNumber = [ 1 1 100 ]'
calculation.transmission.energyPoints = [-2.00:0.005:2.00]
calculation.transmission.plot = true
calculation.control.xml = true
```

The keywords specifies the following:

`calculation.transmission.kSpaceGridNumber`

the small k-space grid number in each direction which, together with kSpaceGridShift, are used to produce the parameter kSpacePoints.`calculation.transmission.energyPoints`

The energy points at which the transmission will be calculated. Note that the energy values are measured from chemical potential of a lead having zero applied voltage.`calculation.bandStructure.coordinatesOfTheSymmetryKPoints`

The k-space fractional coordinates of those high symmetry k-points listed in symmetryKPoints, each column corresponds to one of them.

Run the simulation with the transmission input file `4ZGNR.Transmission.input`

.

Transmission spectrum

Next, you should analyses the results from the produced transmission dataset (*.xml* and *.mat*) that can then be plotted using the MATLAB or Device Studio by:

In menu bar of Device Studio, click on

**Simulator**➟**NanoDCAL**➟**Analysis Plot**➟ import*Transmission.xml*file.

As expected for a perfect 1D system, the transmission spectrum in Fig. 2.1.8 exhibits a sequence of steps with several integer steps (conducting channels) and narrow jump points, which is consistent with the band structures (Fig. 2.1.6). The transmission spectrum for both AFM and FM configurations exhibits an enhanced transmission around the Fermi level. Typically, transmission peaks are very high because of edge states.For the AFM configuration exhibit a gap at the Fermi energy of about 0.41 eV for both the spin-up and spin-down with the maximum transmission probability T(E)~2. Meanwhile, the transmission probability for FM configuration is similar for the two spin channels, except for the two narrow peaks with opposite spins contributions around zero (in line with Fig. 2.1.6), with a maximum transmission probability of these peaks of about T(E)~4.

## 2.1.7. Spin current calculation

After setting up a zero-bias calculation, the spin transmission will demonstrate the probability of the electrons flowing between the left and right electrodes. The NEGF-DFT approach can be employed to calculate the spin-dependent current when a bias is applied between the two 4ZGNR electrodes, allowing us to understand how such devices will behave under finite source (left)-drain (right) bias.

In order to get spin current as a function of voltage (I-V) we should perform SCF calculations considering bias voltage difference between the leads. Thus, we should rerun the SCF calculation (as shown here) for the two-probe system changing the value at the keyword, as shows below:

```
system.voltageOfLead1 = 0.0
system.voltageOfLead2 = 0.2
```

Note

Note that in this example we considered a bias voltage of 0.2 V and the user should be able to explore the transport properties for a set of different bias voltages (0.2, 0.4, 0.6, 0.8, and 1.0).

In order calculate the I-V curve the user can generate *IVcurve.input* file with
Device Studio software.
The *IVcurve.input* file can be created following the steps below:

In menu bar of Device Studio, click on

**Simulator**➟**NanoDCAL**➟**Analysis**to set parameters, as shown in Fig. 2.1.9:In the

**Analysis**window, on the top left choose the**Device**option;Navigate to the

**Analysis**panel (left side) ➟ select**IVcurve**➟ click on the*Right arrow*button to transfer**IVcurve**calculator to the**Calculation Selected**panel.

The

**current-voltage**options are shown in the right side of the**Analysis**window. The**k-point sampling**can be set to**n1 = 1**,**n2 = 1**and**n3 = 1**and click**Generate files**.

IV-curve input file

```
calculation.name = ivc
calculation.control.temporaryDirectory = ./
calculation.IVCurve.systemObjectStatus = 'AllCalculated'
calculation.IVCurve.systemObjectFiles = ../NanodcalObject.mat
calculation.IVCurve.kSpaceGridNumber = [1 1 1]'
calculation.control.xml = true
```

Warning

Note that the **calculation.IVCurve.systemObjectFiles** keyword should be used to include the *NanodcalObject.mat* files related with the different bias voltage calculations.
For example, to plot an I-V curve for bias voltage between 0.2 V to 1.0 V the keyword could change to:

```
calculation.IVCurve.systemObjectFiles = {
'../0.2Vb/NanodcalObject.mat','../0.4Vb/NanodcalObject.mat',
'../0.6Vb/NanodcalObject.mat','../0.8Vb/NanodcalObject.mat',
'../1.0Vb/NanodcalObject.mat'}
```

After running the *IVcurve.input* file (`IVcurve.input`

) the I-V dataset will be generated (*CalculatedResults.mat*, *log.txt*, and *CurrentVoltageCurves.mat*) and this *.mat* results can be loaded using *MATLAB* platform.

I-V analysis for FM configuration

In the output file (*CurrentVoltageCurves.mat*), the user will find the following information for spin-current analysis:

```
V1 ➟ [0,0,0,0]
I1 ➟ [-1.451751858838228e-05 ,-1.820533556641101e-05, -1.776464654964069e-05, -1.774221231130539e-05, -1.808853635862505e-05]
I1_spinDecomposed(1,:) ➟ [-7.743554393063080e-06, -1.125202100217556e-05, -1.103301116773889e-05, -1.113620148884284e-05, -1.108656493318672e-05]
I1_spinDecomposed(2,:) ➟ [-6.773964195319202e-06, -6.953314564235451e-06, -6.731635381901803e-06, -6.606010822462556e-06, -7.001971425438325e-06]
V2 ➟ [0.2, 0.4, 0.6, 0.8, 1]
I2 ➟ [1.451751858838228e-05, 1.820533556641098e-05, 1.776464654964070e-05, 1.774221231130537e-05, 1.774221231130537e-05]
I2_spinDecomposed(1,:) ➟ [7.743554393063065e-06, 1.125202100217556e-05, 1.103301116773889e-05, 1.113620148884283e-05, 1.108656493318672e-05]
I2_spinDecomposed(2,:) ➟ [6.773964195319210e-06, 6.953314564235415e-06, 6.731635381901803e-06, 6.606010822462549e-06, 7.001971425438333e-06]
```

Note

`V1`

and`V2`

: 1D double array with the number of sets of the applied bias voltages.`I1`

and`I2`

: 1D double array with the length of the number of sets of the applied bias voltages. The currents from lead 1 and 2 under the corresponding applied bias voltages.`I1_spinDecomposed`

and`I2_spinDecomposed`

: Double matrix, with the dimension of the number of spin components by the number of sets of the applied bias voltage. The spin-decomposed currents from lead 1 and lead 2 under the corresponding applied bias voltages.

In order to further analyze the Current-Voltage curves, we plot spin current for various applied biases, as shown in Fig. 2.1.10. Just for convenience, we will label 1 and 2 components as spin-up and spin-down, respectively.

The current for spin-up (solid blue line) and spin-down (solid red line) increases uniformly until 0.2 V. Beyond this value, there is a great increase in spin-up current compared to the spin-down one. This behavior is expected for a pristine zigzag graphene nanoribbon.

J. Taylor, H. Guo, and J. Wang. Ab initio modeling of quantum transport properties of molecular electronic devices. Phys. Rev. B 63, (2001), p. 245407.

M. N. Baibich, J. M. Broto, A. Fert, F. Nguyen Van Dau, F. Petroff, P. Etienne, G. Creuzet, A. Friederich, and J. Chazelas. Giant Magnetoresistance of (001)Fe/(001)Cr Magnetic Superlattices. Phys. Rev. Lett. 61 (1988), p. 2472.

P. X. Qin, H. Yan, X. N. Wang, Z. X. Feng, H. X. Guo, X. R. Zhou, H. J. Wu, X. Zhang, Z. G. G. Leng, H. Yu Chen, and Z. Q. Liu. Noncollinear spintronics and electric-field control: a review. Rare Met. 39 (2020), p. 95.

S. A. Wolfd, D. Awschalomr, J. M. Daughton, S. V. Molnar, M. L. Roukes, A. Y. Chtchelkanova, and D. M. Treger. Spintronics: A Spin-Based Electronics Vision for the Future. Science 294 (2001), p. 1488.

Y. Kobayashi, K.-I. Fukui, T.i Enoki, and K. Kusakabe. Edge state on hydrogen-terminated graphite edges investigated by scanning tunneling microscopy. Phys. Rev. B 73 (2006), p. 125415.

W. Y. Kim, and K. S. Kim. Prediction of very large values of magnetoresistance in a graphene nanoribbon device. Nat. Nanotechnol. 3 (2008), p. 408.

E. Kan, H. Xiang, F. Wu, C. Lee, J. Yang, and M.-H. Whangbo. Ferrimagnetism in zigzag graphene nanoribbons induced by main-group adatoms. AIP Advances 3 (2013), p. 092105.