tightbinder.models.AgarwalaChern#
- class AgarwalaChern(side=1, t=1, m=1, t2=0, lda=0, r=1.1)[source]#
Bases:
SystemImplementation of the Agarwala model of amorphous Chern insulators in 2D, which is a generalization of the BHZ model for arbitrary atomic positions, with additional terms to break particle-hole and inversion symmetry.
- Parameters:
side – First-neighbour distance in the crystalline system. Defaults to 1.
t – Hopping parameter. Defaults to 1.
m – Mass term. Defaults to 1.
t2 – Particle-hole symmetry breaking parameter. Defaults to 0.
lda – Inversion symmetry breaking parameters. Defaults to 0
r – Cutoff distance for neighbour interaction. Defaults to side*1.1.
Methods
Method to add one atom from a numbered species into a specific position.
Method to add a list of atoms of specified species at some positions.
Method to add a hopping between two atoms of the motif.
Same method as add_hopping but we input a list of hoppings at once.
Method to find the coordination number for a specific atom in the crystal.
Routine to compute a mesh of the first Brillouin zone using the Monkhorst-Pack algorithm.
Routine to compute the first neighbour distance.
Method to compute neighbour distance up to neighbours nni.
Method to compute the area of the unit cell.
Method to find the coordination number of the solid.
Method to compute the geometric center of the crystal from the positions of the atoms of the motif.
Determines the crystallographic group associated to the material from the configuration file.
Routine to compute high symmetry points depending on the dimension of the system.
Method to extend the system by attaching a copy of the motif displaced by some input vector.
Method to find which atoms do not have neighbours, i.e. they are disconnected from the lattice.
Method to find the first neighbours of the atoms of the motif.
Routine to determine the atoms of the solid with the lowest coordination atoms.
From a list of atoms (motif), it sets the list of bonds within the solid.
Routine to evaluate the Bloch Hamiltonian at a given k point.
Routine to generate a path in reciprocal space along the high symmetry points (HSPs) indicated.
Method to obtain the indices of the outermost atoms of the motif, taking into account boundary conditions.
Deprecated in favour of identify_motif_edges.
Method to obtain the indices of the outermost atoms of the motif.
Routine to initialize the matrices that compose the Bloch Hamiltonian
Method to visualize the crystalline structure (Bravais lattice + motif) in two dimensions.
Method to visualize the crystalline structure (Bravais lattice + motif).
Method to plot a wireframe of the system according to the detected bonds.
Routine to compute the reciprocal lattice basis vectors from the Bravais lattice basis.
Routine to reduce the dimensionality of the System object along the specified directions, by repeating unit cells along those directions until a given size (number of unit cells) is reached.
Method to remove the atom at the specified index from the motif.
Method to remove the atoms specified in a list with all their indices.
Method to remove disconnected atoms from the motif.
TO BE IMPLEMENTED YET (is it really necessary?).
Routine to generate a ribbon for a 2D crystal.
Method to rotate the whole system in the xy plane by some angle.
Diagonalize the Hamiltonian to obtain the band structure and the eigenstates.
Routine to generate a supercell for a system using the number of cells along each Bravais vectors specified in ncells.
Routine to initialize or update the intrinsic attributes of the Crystal class whenever the Bravais lattice is changed.
Method to render a 3d visualization of the crystal using the self.vpython library.
Attributes
basisdimboundarybravais_latticefillingmatrix_typemotifndimnorbitalsunit_cell_list- add_atom(position, species=0)#
Method to add one atom from a numbered species into a specific position.
- add_atoms(atoms, species=None)#
Method to add a list of atoms of specified species at some positions. Built on top of method add_atom.
- add_bond(initial, final, cell=(0.0, 0.0, 0.0), neigh='1')#
Method to add a hopping between two atoms of the motif. NB: The hopping has a specified direction, from initial to final. The HSince the final Hamiltonian is computed taking into account hermiticity, it is not necessary to specify the hopping in the other direction. (TODO: Change this, no longer working like this).
- Parameters:
initial (
int) – Index of initial atom of the bond.final (
int) – Index of final atom of the bond.cell (
Union[list,tuple,ndarray]) – Array with cell containing the final atom. Defaults to [0., 0., 0.].neigh (
str) – String to denote if the bond corresponds to first neighbour, second, etc. Defaults to ‘1’.
- Return type:
- add_bonds(initial, final, cells=None, neigh=None)#
Same method as add_hopping but we input a list of hoppings at once.
- Parameters:
initial (
List[int]) – List of indices of initial atom of the bond.final (
List[int]) – List of indices of final atom of the bond.cell – List of cell vectors containing the final atom. Defaults to None, which corresponds to the origin cell.
neigh (
List[str]) – List of strings to denote if the bonds corresponds to first neighbour, second, etc respectively. Defaults to None, which corresponds to all being ‘1’.
- Return type:
- static atom_coordination_number(index, bonds)#
Method to find the coordination number for a specific atom in the crystal.
- brillouin_zone_mesh(mesh)#
Routine to compute a mesh of the first Brillouin zone using the Monkhorst-Pack algorithm.
- Parameters:
mesh (
list) – List with the number of kpoints along each axis.- Return type:
ndarray- Returns:
Array with all kpoints, nk x 3
- compute_first_neighbour_distance(near_cells=None)#
Routine to compute the first neighbour distance. DEPRECATED since there is compute_neighbour_distances which works up to n neighbour distances.
- compute_neighbour_distances(nni)#
Method to compute neighbour distance up to neighbours nni.
- compute_unit_cell_area()#
Method to compute the area of the unit cell. TODO: Adapt for 1D and 3D
- Return type:
- Returns:
Value of unit cell area.
- coordination_number()#
Method to find the coordination number of the solid. Returns coordination number of solid, and a list with the different individual coordinations numbers found within the solid.
- crystal_center()#
Method to compute the geometric center of the crystal from the positions of the atoms of the motif. Calculated as the average of all atomic positions.
- Return type:
ndarray- Returns:
Numpy array with the cartesian coordinates of the center
- crystallographic_group()#
Determines the crystallographic group associated to the material from the configuration file. NOTE: Only the group associated to the Bravais lattice, reduced symmetry due to presence of motif is not taken into account. Its purpose is to provide a path in k-space to plot the band structure. Workflow is the following: First determine length and angles between basis vectors. Then we separate by dimensionality: first we check angles, and then length to determine the crystal group.
- Return type:
- determine_high_symmetry_points()#
Routine to compute high symmetry points depending on the dimension of the system. These symmetry points will be used to plot the band structure along the main reciprocal paths of the system (irreducible BZ). Returns a dictionary with pairs {letter denoting high symmetry point: its coordinates}
- Return type:
- extend_copy(vector, n=1)#
Method to extend the system by attaching a copy of the motif displaced by some input vector.
- Parameters:
vector – Vector by which we displace the copy of the system.
n – Number of copies to attach. The n-th copy will be displaced by n*vector. Defaults to 1.
- Returns:
Extended system.
- find_disconnected_atoms()#
Method to find which atoms do not have neighbours, i.e. they are disconnected from the lattice.
- find_first_neighbours()#
Method to find the first neighbours of the atoms of the motif. :rtype:
list:return: List of the corresponding bonds.
- find_lowest_coordination_atoms(include_first_neighbours=False)#
Routine to determine the atoms of the solid with the lowest coordination atoms. TODO: Define parameter to specify storing atoms with coordinations lower than one specified.
- find_neighbours(mode='minimal', nn=1, r=None)#
From a list of atoms (motif), it sets the list of bonds within the solid. I.e.: Atom list -> List of neighbours/atom. By default it will look for the minimal distance between atoms to determine first neighbours. For amorphous systems the option radius is available to determine neighbours within a given radius R. Boundary conditions can also be set, either PBC (default) or OBC.
- hamiltonian_k(k)[source]#
Routine to evaluate the Bloch Hamiltonian at a given k point. It adds the k dependency of the Bloch Hamiltonian through the complex exponentials.
- Parameters:
k (
Union[list,ndarray]) – k vector (Array 1x3)conditions – defaults to PBC. Can be either PBC or OBC
- Return type:
ndarray- Returns:
Bloch Hamiltonian matrix
- high_symmetry_path(nk, points)#
Routine to generate a path in reciprocal space along the high symmetry points (HSPs) indicated. The HSPs must be within those corresponding to the associated symmetry group, otherwise the method will throw an error.
- identify_boundary(alpha=0.4, ndim=2, verbose=False, corner_atoms=False)#
Method to obtain the indices of the outermost atoms of the motif, taking into account boundary conditions. NB: Currently works only in 2D
- Parameters:
alpha (
float) – This parameters tunes the shape of the boundary. For alpha=0, the boundary is a convex hull; as alpha increases the boundary becomes more concave. Default value is 0.4ndim (
int) – Dimension of the expected boundary. Defaults to 2.verbose (
bool) – Boolean parameter to print indices of boundary atoms. Defaults to False.cornes_atoms – Boolean to toggle detection of atoms that might be shared by the periodic boundary and the open boundary.
- Return type:
ndarray- Returns:
Indices of atoms in the boundary.
- Raises:
AssertionError – Crystal dimension different from two raises error. Also raises if bonds are not computed.
- identify_convex_hull(loop=6)#
Deprecated in favour of identify_motif_edges. Method to obtain the atoms that correspond to the edges of the system. This method uses directly the ConvexHull method from Scipy to identify the outmost points of the motif. Compute the ConvexHull three times, each time removing the points detected in the previous iteration.
NB: If given 3d points, they must not be coplanar for the algorithm to work. If they are, then the points must be given as 2d
- Parameters:
loop (
int) – Number of times the ConvexHull is applied, to increase number of points in the edge.- Return type:
ndarray- Returns:
Indices of atoms belonging to edges of motif.
- identify_motif_edges(alpha=0.4, ndim=2)#
Method to obtain the indices of the outermost atoms of the motif. Note that this method returns exclusively the outermost atoms, independently of the boundary conditions. To take into account boundary conditions, one should call identify_boundary() from System. NB: Currently works only in 2D
- Parameters:
alpha (
float) – This parameters tunes the shape of the boundary. For alpha=0, the boundary is a convex hull; as alpha increases the boundary becomes more concave. Default value is 0.4ndim (
int) – Dimension of the boundary. If the system lies on a plane, the boundary is two-dimensional, so ndim = 2 (default value).
- Return type:
ndarray- Returns:
Indices of atoms in the boundary.
- Raises:
AssertionError – Crystal dimension different from two raises error.
ValueError – Crystal motif must have at least three atoms. Raised by Delaunay class.
- initialize_hamiltonian(find_bonds=True)[source]#
Routine to initialize the matrices that compose the Bloch Hamiltonian
- plot_2d_crystal(ax=None, fontsize=10, size=10)#
Method to visualize the crystalline structure (Bravais lattice + motif) in two dimensions. If the crystal is 3D, it will plot only the x, y coordinates.
- plot_crystal(cell_number=1, crystal_name='')#
Method to visualize the crystalline structure (Bravais lattice + motif).
- plot_wireframe(ax=None, linewidth=1, alpha=0.5, color='black')#
Method to plot a wireframe of the system according to the detected bonds.
- reciprocal_lattice()#
Routine to compute the reciprocal lattice basis vectors from the Bravais lattice basis. The algorithm is based on the fact that a_idot b_j=2PIdelta_ij, which can be written as a linear system of equations to solve for b_j. Resulting vectors have 3 components independently of the dimension of the vector space they span.
- Return type:
- reduce(**ncells)#
Routine to reduce the dimensionality of the System object along the specified directions, by repeating unit cells along those directions until a given size (number of unit cells) is reached. Thus we make the original system finite along those directions.
- remove_atom(index)#
Method to remove the atom at the specified index from the motif. Note that this method does not remove existing bonds corresponding to the removed atom.
- remove_atoms(indices)#
Method to remove the atoms specified in a list with all their indices. Built upon the method remove_atom.
- remove_disconnected_atoms()#
Method to remove disconnected atoms from the motif. Based on the method remove_atoms.
- ribbon(width, orientation='horizontal', periodic=False)#
Routine to generate a ribbon for a 2D crystal. It is designed to create rectangular ribbons, based on a rectangular lattice. Therefore there must exist a combination of basis vectors such that we can obtain a rectangular supercell. Otherwise the method returns an error.
- Parameters:
width (
int) – Width of the ribbon (number of cells).orientation (
str) – ‘horizontal’ or ‘vertical’. Defaults to ‘horizontal’.periodic (
bool) – Boolean to keep the ribbon periodic along the direction it is built. Defauts to False. Turning this one would correspond to a nanotube instead of nanoribbon (finite).
- Return type:
- Returns:
Modified System object.
- rotate(angle=90)#
Method to rotate the whole system in the xy plane by some angle.
- solve(kpoints=None, neigval=None)#
Diagonalize the Hamiltonian to obtain the band structure and the eigenstates.
- Parameters:
- Returns:
Spectrum object.
- supercell(update=True, **ncells)#
Routine to generate a supercell for a system using the number of cells along each Bravais vectors specified in ncells.
- update()#
Routine to initialize or update the intrinsic attributes of the Crystal class whenever the Bravais lattice is changed.
- Return type: