# get_order_grouped¶

tenpy.models.lattice.get_order_grouped(shape, groups)[source]

Variant of get_order(), grouping some sites of the unit cell.

This function is usefull for lattices with a unit cell of more than 2 sites (e.g. Kagome). For 2D lattices with a unit cell, the ordering goes first within a group , then along y, then the next group (for the same x-value), again along y, and finally along x when all groups are done.

As an example, consider the Kagome lattice.

Note

In this doc-string, the word ‘direction’ referst to a physical direction of the lattice or the index u of the unit cell as an “artificial direction”.

Parameters
• shape (tuple of int) – The shape of the lattice, i.e., the length in each direction.

• groups (tuple of tuple of int) – A partition and reordering of range(shape[-1]) into smaller groups. The ordering goes first within a group, then along the last spatial dimensions, then changing between different groups and finally in Cstyle order along the remaining spatial dimensions.

Returns

order – An order of the sites for Lattice.order in the specified ordering.

Return type

ndarray (np.prod(shape), len(shape))

Lattice.ordering()
method in Lattice to obtain the order from parameters.
Lattice.plot_order()
visualizes the resulting order in a Lattice.