Platforms: Unix, Linux
Module information :
Program: | Module containing all the classes, functions and parameters needed by the main programs |
---|---|
Purpose: | Prevent cluttering of the other programs |
Input(s): | none |
Output(s): | none |
This is the class for Atoms
This function takes a list of Wannier Functions and computes its barycenter.
Input(s) : | a list of Wannier Function objects |
---|---|
Output(s) : | a rank-1 numpy array containing the x, y, z coordinates of the barycenter |
A utility function that allows the user to print the information contained in each Wannier Function of a list
Input(s) : | a list of Wannier Function objects |
---|---|
Output(s) : | a string printed on the screen |
This function reads a (conductor) Hamiltonian matrix given by the Wannier90 code.
The name of the file generally ends with *_htC.dat
The format of this file is as follows :
- the first line contains comments
- the second line contains the size N of the (square) N*N matrix
- all the remaining lines are filled with numbers representing the matrix elements.
Note
the matrix elements are printed in Fortran (column major) format. This means that if the matrix has elements H(i,j) for i and j in [1,N], then the matrix elements are given in the following order
H(1,1) H(2,1) H(3,1) H(4,1) ...
H(j,1) H(j+1,1) ...
Input(s) : | a string corresponding to the name of the file containing the Hamiltonian matrix |
---|---|
Output(s) : | a rank-2 numpy array containing the Hamiltonian matrix |
This function extracts the H00 and H01 matrices from a *_htL.dat or *_htR.dat Wannier90 formatted file.
The H00 and H01 matrices correspond respectively to the on-site and off-diagonal matrix sub-blocks of a lead principal layer.
Input(s) : | a string corresponding to the name (full path) of the file containing the principal layer matrices |
---|---|
Output(s) : | a tuple with two rank-2 numpy arrays in the following order (H00,H01) |
This function is designed to read a *_tran_info.dat file and extract its content
- The format of the file is as follows:
first line contains the total number of Wannier Funtions in the system
second line contains the total number of WF in one principal layer
third line contains the number of lead unit cells in one principal layer
forth line contains the direction of conduction “x”, “y” or “z” followed by the second direction of sorting
- the next lines contain:
WF index i, xi, yi, zi, <wi| H |wi>
then comes the total number of atoms in the system
- at last the remaining lines contain:
Atomic symbol j, xj, yj, zj
xi is the x coordinate of the i-th WF
yj is the y coordinate of the j-th atom
wi is the i-th WF
<wi| H |wi> is the “on-site” matrix element associated with wi
Input(s) : | a string corresponding to the name of the *_tran_info.dat file |
---|---|
Output(s) : | an integer representing the total number of Wannier Functions in the system an integer representing the number of Wannier Functions in one principal layer an integer representing the number of unit cells in one principal layer a string giving the direction of conduction (“x”, “y” or “z”) a string giving the second direction of sorting (“x”, “y” or “z”) a list of Wannier Function objects with the proper attributes as defined in the wannier_function class an integer representing the total number of atoms in the system a list of atom objects with the proper attributes as defined in the atom class |
This function reads an XYZ formatted file and returns a list of atom objects. If it can find it, the size of the system is also returned.
Input(s) : | a string for the name of the xyz file |
---|---|
Output(s) : | a list of atom objects a float which represents the size of the system |
This function takes a list of Wannier Functions and sorts the atomic positions according to a scheme similar to the one in Wannier90.
The first direction of sorting is cond_dir and the second direction of sorting is second_dir.
Input(s) : | a list of Wannier Function objects a string that gives the first direction of sorting (which corresponds to the direction of conduction) a string that gives the second direction of sorting a float which gives the distance threshold for grouping WF |
---|---|
Output(s) : | a list of Wannier Function objects properly sorted |
This function takes a list of atom objects and sorts the atomic positions only in the direction of conduction
Input(s) : | the list of atom objects a string which represents the direction of conduction (which serves as the main direction of sorting) |
---|---|
Output(s) : | a list of atom objects in sorted order |
This function takes a list of atom objects and translate the coordinates in the direction of conduction in such a way that the left-most atom is set to 0
Input(s) : | the list of atom objects a string which represents the direction of conduction |
---|---|
Output(s) : | a list of atom objects with the properly translated coordinates |
This is the class for Wannier Functions
This function will take a Hamiltonian matrix and write it into a file in a format usable by Wannier90.
In particular, the matrix will be written to file in column-major format (see read_htC for more detail).
Input(s) : | a string corresponding to the name of the file that will contain the Hamiltonian matrix. a rank-2 numpy array containing the matrix |
---|---|
Output(s) : | a file containing the matrix |
This function is designed to write a *_tran_info.dat file from a list of data
The newly created file is called new_tran_info.dat
Input(s) : | an integer for the total number of Wannier Functions in the system an integer for the number of Wannier Functions in one principal layer an integer for the number of unit cells in one principal layer a string giving the direction of conduction (which is also the first direction of sorting) a string giving the second direction of sorting a list of Wannier Function objects an integer giving the number of atoms in the system a list of atom objects |
---|---|
Output(s) : | a file in a format similar to the *_tran_info.dat files given by Wannier90 |
This function takes a list of atom objects and prints their cartesian coordinates in a file with xyz format
Input(s) : | a string for the name of the xyz file the list of atom objects a float, the size of the system in Angstrom(s) |
---|---|
Output(s) : | a file with name filename containing the atomic positions in xyz format |