Procedures

ProcedureLocationProcedure TypeDescription
add_hex hex_coordinates Function

Addition overload for hex type

dot_hex hex_coordinates Function

Dot overload for hex type

eq_hex hex_coordinates Function

Equality overload for hex type

eq_lattice xy_coordinates Function

polymorphic equality overload for xy_lattice type

eq_xy xy_coordinates Function

tolerance equality for xy class [absolute tol hard-coded to 1d-12] -> probably to improve...

get_flake honeytools Function

Get the lattice for a hexagon-shaped flake

get_stripe honeytools Function

Get the lattice for a hexagon-shaped flake

get_sublattice xy_coordinates Function

Extract sublattice, given a lattice and a label ("A" or "B")

get_supercell honeytools Function

Get the lattice for a honeycomb supercell

get_triangle honeytools Function

Get the lattice for a triangle-shaped flake

hex hex_coordinates Interface

constructor override

hex2center xy_coordinates Function

Convert hex coordinates to real 2D space [returning the xy coordinates of the hexagon center] Actual real-space layout has to be specified by passing a (scalar) unit_cell object.

hex2corner xy_coordinates Function

Convert hex coordinates to real 2D space [returning the xy coordinates for the hexagon corners, as appropriatiely wrapped in the "xy_lattice" type] Actual real-space layout has to be specified by passing a (scalar) unit_cell object.

hex2lattice xy_coordinates Function

Generate a type(xy_lattice) object from any given hex array, provided a suitable layout (unit-cell)

hex2site xy_coordinates Function

Convert hex coordinates to real 2D lattice sites [returning the xy coordinates for the unique unit-cell, sites "A" and "B": this of course does not account for border effects, so would be suitable only for simple, periodized, systems, which for now are out of scope.] Actual real-space layout has to be specified by passing a (scalar) unit_cell object.

hex_armchair_stripe hex_geometries Function

Build a armchair-on-top honeycomb stripe/ribbon CONVERSION TO XY SITES REQUIRES ARMCHAIR LAYOUT

hex_direction hex_neighbors Function

Return a direction in pseudo-3D hex space, given a (signed) integer label

hex_distance hex_coordinates Function

Taxicab distance of hex coordinates

hex_flake hex_geometries Function

Build a hexagon-shaped honeycomb flake

hex_hop hex_neighbors Function

Return the nearest neighbor of H, by hopping in the i-th direction. You can feed any i ∈ ℤ, but you'd get only 6 inequivalent neighbors

hex_insert hex_geometries Subroutine

Utility to grow type(hex) arrays, it is a poor man implementation of a dynamic array insertion, a là std::vector (but with no preallocation and smart doubling...)

hex_line hex_geometries Function

Draw a line between A and B, in hex space

hex_nearest hex_neighbors Function

Return the vector of all nearest hex_neighbors of hex H

hex_norm hex_coordinates Function

Taxicab norm from hex coordinates

hex_plot honeyplots Subroutine

Simple plotter for arrays of type(hex). It features two backends, giving access to either matplotlib(pyplot) or gnuplot internal machinery. Either library needs to be installed in your system for hex_plot to work. You can specify a figure_name to save the plot to disk. If not specified the plot would be just displayed in a popup window (or the terminal with suitable configuration of the gnuplot backend) and a corresponding script saved, aiming at fast reproduction (the script will all contain data). The script has a default name (hex_plot.{py,gp}), but you can optionally give your own custom string, do not forget the appropriate file extension. Regarding output formats instead, the two backends have slightly different behavior: pyplot would infer the format from the given file extension in figure_name, whilst gnuplot does need a proper "output terminal" to be set. You can do that by passing the optional set_parameter variable. Refer to original gnuplot documentation for the list of available terminals and how they should be chosen. For convenience we report that you can get the list of (system dependent) available terminals in your console by executing the gnuplot -e "set terminal" command in your shell. Furthermore all systems should be compatible with the "dumb" terminal option, which would direct the plot to the terminal itself, in the form of ASCII art. This can be very useful for HPC workflows.

hex_print hex_coordinates Subroutine

Pretty print of hex coordinates

hex_round hex_geometries Function

Round a triplet of reals to a proper hex object

Read more…
hex_supercell hex_geometries Function

Build a honeycomb supercell (parallelogram)

hex_triangle hex_geometries Function

Build a triangle-shaped honeycomb flake

hex_zigzag_stripe hex_geometries Function

Build a zigzag-on-top honeycomb stripe/ribbon CONVERSION TO XY SITES REQUIRES ZIGZAG LAYOUT

ith_A_offset xy_neighbors Function

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.

ith_B_offset xy_neighbors Function

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.

ith_corner_offset xy_coordinates Function

Compute the i-th offset vector connecting the hexagon center to its corners, returning a (scalar) xy coordinate

lhs_hex hex_coordinates Function

Left scale overload for hex type

linear_interpolation hex_geometries Function

Linear interpolation from a to b, with step t a + (b - a) * t = a * (1-t) + b * t for better floating-point precision

neq_hex hex_coordinates Function

Inequality overload for hex type

neq_lattice xy_coordinates Function

polymorphic inequality overload for xy_lattice type

neq_xy xy_coordinates Function

tolerance inequality for xy class [absolute tol hard-coded to 1d-12] -> probably to improve...

new_hex_axial hex_coordinates Function

Axial cubic constructor for the hex type [s would be computed internally]

new_hex_cubic hex_coordinates Function

Safe cubic constructor for the hex type featuring an assertion on input coordinates before the initialization of the object

operator(*) hex_coordinates Interface

product overload

operator(+) hex_coordinates Interface

addition overload

operator(-) hex_coordinates Interface

subtraction overload

operator(/=) hex_coordinates Interface

inequality overload

operator(==) hex_coordinates Interface

equality overload

orientation_equality hex_layout Function

Overload of == operator for hex_orientation type

plot honeyplots Interface
print_unit_cell hex_layout Subroutine

Pretty print of hex coordinates

push_back xy_coordinates Subroutine

Poor man implementation of a dynamic array, a là std::vector (but without preallocation and smart doubling...)

rhs_hex hex_coordinates Function

Right scale overload for hex type

sub_hex hex_coordinates Function

Subtraction overload for hex type

xy_class_print xy_coordinates Subroutine

Pretty print of xy coordinates in static arrays

xy_distance xy_coordinates Function

Polymorphic euclidean distance for xy class

xy_lattice_print xy_coordinates Subroutine

Pretty print of xy coordinates in dynamic arrays

xy_nearest_neighbors xy_neighbors Subroutine

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.

Read more…
xy_next_nearest_neighbors xy_neighbors Subroutine

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.

Read more…
xy_nn_hop xy_neighbors Function

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.

xy_nnn_hop xy_neighbors Function

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.

xy_norm xy_coordinates Function

polymorphic euclidean norm for xy class

xy_ordered_union xy_coordinates Function

An ordered-keys set union for xy_lattices. It compares the lattice sites, looking at their x and y coordinates only: equal x,y entries are inserted in C just once, so to make it a set. A and B must be sets too. The sublattice labels are preserved in the process, assuming that two sites with the same x,y pertain to the same sublattice. For A the keys are assumed to be 1:size(A), and preserved as such (with an assertion). The keys of B are instead discarded, so to be replaced by size(A):size(C), which thus amounts to have result C uniquely indexed as 1, 2, ... , size(A) + size(B). This allows building consistently indexed matrices to act on the lattice array, such as real-space tight-binding hamiltonians. The keys would then be used to index other real space quantities, such as LDOS, Chern marker, local magnetization, and so on.

xy_plot honeyplots Subroutine

CURRENTLY GNUPLOT DOES NOT SUPPORT NN AND NNN LINKS, HELP IS WELCOME! Simple plotter for class(xy_lattice) objects. If optional argument nn_mask is passed it draws the nearest-neighbor bonds too. Similarly, if optional argument nnn_mask is passed a dashed link to next-nearest neighbors would be drawed. Otherwise only lallice sites. It features two backends, giving access to either matplotlib(pyplot) or gnuplot internal machinery. Either library needs to be installed in your system for hex_plot to work. You can specify a figure_name to save the plot to disk. If not specified the plot would be just displayed in a popup window (or the terminal with suitable configuration of the gnuplot backend) and a corresponding script saved, aiming at fast reproduction (the script will all contain data). The script has a default name (hex_plot.{py,gp}), but you can optionally give your own custom string, do not forget the appropriate file extension. Regarding output formats instead, the two backends have slightly different behavior: pyplot would infer the format from the given file extension in figure_name, whilst gnuplot does need a proper "output terminal" to be set. You can do that by passing the optional set_parameter variable. Refer to original gnuplot documentation for the list of available terminals and how they should be chosen. For convenience we report that you can get the list of (system dependent) available terminals in your console by executing the gnuplot -e "set terminal" command in your shell. Furthermore all systems should be compatible with the "dumb" terminal option, which would direct the plot to the terminal itself, in the form of ASCII art. This can be very useful for HPC workflows.

Read more…
xy_print xy_coordinates Interface
xy_shells xy_neighbors Subroutine

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.

call~~graph~~CallGraph interface~hex hex_coordinates::hex proc~new_hex_axial hex_coordinates::new_hex_axial interface~hex->proc~new_hex_axial proc~new_hex_cubic hex_coordinates::new_hex_cubic interface~hex->proc~new_hex_cubic interface~operator(+) hex_coordinates::operator(+) proc~add_hex hex_coordinates::add_hex interface~operator(+)->proc~add_hex interface~operator(-) hex_coordinates::operator(-) proc~sub_hex hex_coordinates::sub_hex interface~operator(-)->proc~sub_hex interface~operator(==) hex_coordinates::operator(==) proc~eq_hex hex_coordinates::eq_hex interface~operator(==)->proc~eq_hex interface~operator(ASTERISK) hex_coordinates::operator(*) proc~dot_hex hex_coordinates::dot_hex interface~operator(ASTERISK)->proc~dot_hex proc~lhs_hex hex_coordinates::lhs_hex interface~operator(ASTERISK)->proc~lhs_hex proc~rhs_hex hex_coordinates::rhs_hex interface~operator(ASTERISK)->proc~rhs_hex interface~operator(SLASH=) hex_coordinates::operator(/=) proc~neq_hex hex_coordinates::neq_hex interface~operator(SLASH=)->proc~neq_hex interface~plot honeyplots::plot proc~hex_plot honeyplots::hex_plot interface~plot->proc~hex_plot proc~xy_plot honeyplots::xy_plot interface~plot->proc~xy_plot interface~xy_print xy_coordinates::xy_print proc~xy_class_print xy_coordinates::xy_class_print interface~xy_print->proc~xy_class_print proc~xy_lattice_print xy_coordinates::xy_lattice_print interface~xy_print->proc~xy_lattice_print none~operator(==) xy_coordinates::xy%operator(==) proc~eq_xy xy_coordinates::xy%eq_xy none~operator(==)->proc~eq_xy none~operator(==)~2 xy_coordinates::xy_lattice%operator(==) proc~eq_lattice xy_coordinates::xy_lattice%eq_lattice none~operator(==)~2->proc~eq_lattice none~operator(==)~3 hex_layout::hex_orientation%operator(==) proc~orientation_equality hex_layout::hex_orientation%orientation_equality none~operator(==)~3->proc~orientation_equality none~operator(==)~4 xy_coordinates::xy_site%operator(==) none~operator(==)~4->proc~eq_xy none~operator(SLASH=) xy_coordinates::xy%operator(/=) proc~neq_xy xy_coordinates::xy%neq_xy none~operator(SLASH=)->proc~neq_xy none~operator(SLASH=)~2 xy_coordinates::xy_lattice%operator(/=) proc~neq_lattice xy_coordinates::xy_lattice%neq_lattice none~operator(SLASH=)~2->proc~neq_lattice none~operator(SLASH=)~3 xy_coordinates::xy_site%operator(/=) none~operator(SLASH=)~3->proc~neq_xy proc~eq_lattice->proc~eq_xy proc~get_flake honeytools::get_flake proc~hex2lattice xy_coordinates::hex2lattice proc~get_flake->proc~hex2lattice proc~hex_flake hex_geometries::hex_flake proc~get_flake->proc~hex_flake proc~get_stripe honeytools::get_stripe proc~get_stripe->proc~hex2lattice proc~hex_armchair_stripe hex_geometries::hex_armchair_stripe proc~get_stripe->proc~hex_armchair_stripe proc~hex_zigzag_stripe hex_geometries::hex_zigzag_stripe proc~get_stripe->proc~hex_zigzag_stripe proc~get_sublattice xy_coordinates::get_sublattice proc~get_supercell honeytools::get_supercell proc~get_supercell->proc~hex2lattice proc~hex_supercell hex_geometries::hex_supercell proc~get_supercell->proc~hex_supercell proc~get_triangle honeytools::get_triangle proc~get_triangle->proc~hex2lattice proc~hex_triangle hex_geometries::hex_triangle proc~get_triangle->proc~hex_triangle proc~hex2center xy_coordinates::hex2center proc~hex2corner xy_coordinates::hex2corner proc~hex2corner->proc~hex2center proc~ith_corner_offset xy_coordinates::ith_corner_offset proc~hex2corner->proc~ith_corner_offset proc~hex2lattice->proc~hex2corner proc~xy_ordered_union xy_coordinates::xy_ordered_union proc~hex2lattice->proc~xy_ordered_union proc~hex2site xy_coordinates::hex2site proc~hex2site->proc~hex2center proc~hex2site->proc~ith_corner_offset proc~hex_insert hex_geometries::hex_insert proc~hex_armchair_stripe->proc~hex_insert proc~hex_direction hex_neighbors::hex_direction proc~hex_distance hex_coordinates::hex_distance proc~hex_norm hex_coordinates::hex_norm proc~hex_distance->proc~hex_norm proc~hex_flake->proc~hex_insert proc~hex_hop hex_neighbors::hex_hop proc~hex_hop->proc~hex_direction proc~hex_line hex_geometries::hex_line proc~hex_line->proc~hex_distance proc~hex_line->proc~hex_insert proc~hex_round hex_geometries::hex_round proc~hex_line->proc~hex_round proc~linear_interpolation hex_geometries::linear_interpolation proc~hex_line->proc~linear_interpolation proc~hex_nearest hex_neighbors::hex_nearest proc~hex_nearest->proc~hex_hop proc~hex_plot->proc~hex2corner add_plot add_plot proc~hex_plot->add_plot filename filename proc~hex_plot->filename initialize initialize proc~hex_plot->initialize options options proc~hex_plot->options plot plot proc~hex_plot->plot savefig savefig proc~hex_plot->savefig showfig showfig proc~hex_plot->showfig xlabel xlabel proc~hex_plot->xlabel ylabel ylabel proc~hex_plot->ylabel proc~hex_print hex_coordinates::hex_print proc~hex_triangle->proc~hex_insert assert assert proc~hex_triangle->assert proc~hex_zigzag_stripe->proc~hex_insert proc~ith_a_offset xy_neighbors::ith_A_offset proc~ith_b_offset xy_neighbors::ith_B_offset proc~neq_hex->proc~eq_hex proc~neq_lattice->proc~eq_lattice proc~neq_xy->proc~eq_xy proc~new_hex_cubic->assert proc~print_unit_cell hex_layout::unit_cell%print_unit_cell proc~push_back xy_coordinates::xy_lattice%push_back proc~xy_distance xy_coordinates::xy_distance proc~xy_norm xy_coordinates::xy_norm proc~xy_distance->proc~xy_norm proc~xy_lattice_print->interface~xy_print proc~xy_nearest_neighbors xy_neighbors::xy_nearest_neighbors proc~xy_shells xy_neighbors::xy_shells proc~xy_nearest_neighbors->proc~xy_shells proc~xy_next_nearest_neighbors xy_neighbors::xy_next_nearest_neighbors proc~xy_next_nearest_neighbors->proc~xy_shells proc~xy_nn_hop xy_neighbors::xy_nn_hop proc~xy_nn_hop->proc~ith_a_offset proc~xy_nn_hop->proc~ith_b_offset proc~xy_nnn_hop xy_neighbors::xy_nnn_hop proc~xy_nnn_hop->proc~xy_nn_hop proc~xy_ordered_union->proc~push_back proc~xy_plot->proc~get_sublattice proc~xy_plot->add_plot proc~xy_plot->filename proc~xy_plot->initialize proc~xy_plot->options proc~xy_plot->plot proc~xy_plot->savefig proc~xy_plot->showfig proc~xy_plot->xlabel proc~xy_plot->ylabel proc~xy_shells->proc~xy_distance sort sort proc~xy_shells->sort
Help