Defining all neighbors shells for given xy lattices
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private, | parameter | :: | N | = | 6 | |
real(kind=8), | private, | parameter | :: | PI | = | 4d0*atan(1d0) |
Return the nearest neighbor of a lattice site, by hopping in the i-th direction. You can feed any i ∈ ℤ, but you can get only 3 inequivalent neighbors, depending on the label of the given site: "A" and "B" activate two different suitable sets of hopping directions. A lattice layout is required to build the concrete hopping vectors.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(unit_cell), | intent(in) | :: | layout | |||
type(xy_site), | intent(in) | :: | S | |||
integer, | intent(in) | :: | i |
Return the i-th next-nearest neighbor of a lattice site, by taking two xy_nn_hops in the suitable direction. You can feed any i ∈ ℤ, but you can get only 6 inequivalent neighbors, depending on the label of the given site: "A" and "B" activate two different suitable sets of NN hops, A lattice layout is required to build the concrete hoppings.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(unit_cell), | intent(in) | :: | layout | |||
type(xy_site), | intent(in) | :: | S | |||
integer, | intent(in) | :: | i |
Compute the offset vector connecting a site with label "A", to its i-th neighbor, returning a (scalar) xy coordinate. It takes any i ∈ ℤ, but there will only be 3 inequivalent output vectors, pointing to the three nearest neighbors.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(unit_cell), | intent(in) | :: | layout | |||
integer, | intent(in) | :: | i |
Compute the offset vector connecting a site with label "B", to its i-th neighbor, returning a (scalar) xy coordinate. It takes any i ∈ ℤ, but there will only be 3 inequivalent output vectors, pointing to the three nearest neighbors.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(unit_cell), | intent(in) | :: | layout | |||
integer, | intent(in) | :: | i |
Build a mask for the nearest neighbors of a given lattice. It is a NxN matrix, with N the number of sites in the lattice, stocking .true. values only for the pairs of sites linked by a "NN-bond". It calls internally xy_shells, for all inter-site distances, so if you need more than NNs consider calling xy_shells directly. Note that we provide a similar subroutine for next-nearest-neighbors, which optionally gives also the NNs, so if just two shells are needed you should call that.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(xy_lattice), | intent(in) | :: | lattice | |||
logical, | intent(out), | allocatable | :: | nn_mask(:,:) |
Build a mask for the next-nearest neighbors of a given lattice. It is a NxN matrix, with N the number of sites in the lattice, storing .true. values only for the pairs of sites linked by a "NNN-bond". Optionally builds a nearest-neighbors mask, too. It calls internally xy_shells, for all inter-site distances, so if you need more than NNNs consider calling xy_shells directly. Note that we provide a similar subroutine for nearest-neighbors only, so if you just need NNs consider calling it.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(xy_lattice), | intent(in) | :: | lattice | |||
logical, | intent(out), | allocatable | :: | nnn_mask(:,:) | ||
logical, | intent(out), | optional, | allocatable | :: | nn_mask(:,:) |
Build a /ordered/ set of all inter-atomic distances in a given xy_lattice and a table storing distances among all sites. Searching this matrix for the n-th set entry gives a mask of all pairs of atomic sites that are n-th order neigbors. E.g. shell_table == distance_set(1) would provide a mask for nearest neighbors, from which we can build the tight-binding hopping term of the corresponding lattice hamiltonian.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(xy_lattice), | intent(in) | :: | lattice | |||
real(kind=8), | intent(out), | allocatable | :: | shell_table(:,:) | ||
real(kind=8), | intent(out), | allocatable | :: | distance_set(:) |