All of the lattice files are now updated, but except for a few cases I have not taken full advantage of the new facilities. See also Hamiltonian for related information.

There is now a naming scheme for the lattice sites. For any `Lattice`

object, you can set the 'coordinates' via the `fix_coordinates()`

family of member functions. For a small lattice, you can just supply the names directly. For example, the {$U(1)$} Kondo lattice makes a unit cell out of a spin-1/2 and a Hubbard site, and names them 'f' and 'c'.

// Construct the site blocks

SiteBlock fSite = CreateU1SpinSite(0.5);

SiteBlock cSite = CreateU1HubbardSite();

// construct the lattice

Lattice UnitCell(SymmetryList("N:U(1),Sz:U(1)"), fSite, cSite);

UnitCell.fix_coordinates("f", "c");

Lattice MyLattice = repeat(UnitCell, L);

MyLattice.fix_coordinates();

Here, the UnitCell coordinates are set directly. To set the coordinates in this fashion you must supply the same number of coordinate strings as there are sites in the lattice. The existing coordinate labels (if any) are replaced by the new labels. There is also a template version that takes any parameter T and just converts it to a string (so it must have an appropriate `operator<<`

), as a convenience. If you want to explicitly label a large lattice, you can instead supply an iterator range and use `fix_coordinates_from_sequence(FwdIter, FwdIter)`

.

In this example we have supplied a `SymmetryList`

object explicitly, because the `SiteBlock`

's have different symmetries (ie. the spin only has a spin 'S', not a particle number). It is a good idea to always supply the symmetry list when combining different `SiteBlock`

's.

The `fix_coordinates()`

function (with no arguments) labels the coordinates with integers 1,2,.... But it does not overwrite existing coordinates; instead it adds the integer label to the end of the existing coordinate, and only increments the integer whenever there is a duplicate existing label. In the Kondo lattice example, the UnitCell of length 2 has coordinates "f" and "c". The second `fix_coordinates()`

function will result in coordinates "f,1", "c,1", "f,2", "c,2", ...

The count of duplicate coordinates is kept for each distinct coordinate. For example, if we had a unit cell with coordinates "f", "f", "c" (ie. "f" appears twice), then repeating that unit cell would give coordinates "f,1", "f,2", "c,1", "f,3", "f,4", "c,2", ....

The function `fix_coordinates_prepend()`

works in exactly the same way, but instead of adding the new coordinate to the end of the existing list, it adds it to the start. This is used in hubbardladder-so4 so that the coordinates are (L'th leg, N'th rung), the same as they were in mptoolkit-0.7.3.

You **must** call some function from the `fix_coordinates`

family before you construct an `OperatorList`

object. Calling `fix_coordinates`

twice on the same lattice is an error.

A good example of a more complex lattice is `hubbardladder-so4.cpp`

. Two bipartite unit cells are created, for the A-B and B-A variants. These are then joined into two different rungs (A-B-A-B-...) and (B-A-B-A-...), which are then labelled with `fix_coordinates()`

. These two rungs are then joined into a 'super cell', which is repeated L/2 times to construct the final lattice. `fix_coordinates_prepend()`

is used so that the second coordinate comes first.

The naming scheme for the two Kondo lattice programs is now consistent, 'f' for the localized spins, 'c' for the conduction band.