Skip to content

Symmetry Operations on Lattice.py

Vicentini Filippo requested to merge github/fork/chrisrothUT/Symmetry into master

Created by: chrisrothUT

This implements translations, rotations and reflections on graphs generated by Lattice.py.

Let’s define a square grid to show how we use this

graph = nk.graph.Lattice(basis_vectors = [[1,0],[0,1]], extent=[5,5])

We can generate a SymmGroup with translations by the basis vectors as follows

graph.basis_translations()

In order to generate rotations we need to specify the period. This will generate the C4 rotational symmetry group

graph.planar_rotations(period=4,axes=(0,1))

If we specify a period that doesn’t map the lattice to itself we get a value error. Finally we can generate the reflections about a plane

graph.reflections(axis=0)

This should work for arbitrary dimensions (I only tested a cube). @femtobit @PhilipVinc @attila-i-szabo can you help me bug hunt?

`

Merge request reports