Tutorial 13: Reading from a xyz file

Warning: the version of NanoTCAD_ViDES.py available here solves some problems with the definition of defects in the material (to be released in the new version of the code).

In this tutorial, we will go through the definition of a
system by means of a molecular editor.
In particular, we will consider a nanoribbon, where a hole is defined in the middle.
We will exploit the molecule editor Avogadro, which can be found here.
Any other editor can work as well.

Let’s first define a nanoribbon with 5 atoms along the transversal direction and long 3 nm. Please pay attention that the number of slices have to be at least larger than 4, in order to correctly compute the transport with the Hamiltonian class.

In order to do that we can simply use the following script:

GNR=nanoribbon(5,3);
save_format_xyz("ribbon.xyz",GNR.x[:-10],GNR.y[:-10],GNR.z[:-10],"C")

 

In order to generate the hole in nanoribbon (central part of the device), we can exploit Avogadro as in this movie, opening the ribbon.xyz file just created above.

Now we have to elaborate the generated file (ribbon5_test.xyz) so to be “understood” by NanoTCAD ViDES simulator, i.e. we have to create the Hamiltonian in the format described in the tutorial 9.

We will use the create_H_from_xyz command.

As usual, let’s import the NanoTCAD ViDES module

from NanoTCAD_ViDES import *

Let’s extract the x,y and z vectors of the atoms coordinated from the created file, through the get_xyz_from_file command

[x,y,z]=get_xyz_from_file("ribbon5_test.xyz");

and let’s create the Hamiltonian (the hopping parameter has been set to -2.7 and the onsite energy to 0).

[H_GNR_hole,n,Nc]=create_H_from_xyz(x,y,z,1,0,-2.7,1.45,3);
At this point, we can create the Hamiltonian class 
H_hole=Hamiltonian(n,Nc);
H_hole.H=H_GNR_hole;
H_hole.Eupper=1.5;
H_hole.Elower=-1.5;
H_hole.dE=0.1;

and compute transport 

H_hole.charge_T()

Comments are closed.