Safe Haskell | None |
---|---|

Language | Haskell98 |

- primLattice :: [LEdge Displacement] -> CellGraph -> Lattice
- setPrimLattice :: CellGraph -> Parameterizable CellGraph
- delLEdges :: (Eq b, DynGraph gr) => [LEdge b] -> gr a b -> gr a b
- replicateE :: Int -> Int -> LEdge Displacement -> [LEdge Displacement]
- replicateG :: Int -> CellGraph -> CellGraph

# Documentation

primLattice :: [LEdge Displacement] -> CellGraph -> Lattice Source

Determine a primitive lattice for a given `CellGraph`

.

This is currently accomplished by determining the diameter of the thegraph, collecting all non-zero displacements from an arbitary site to itself which are within a diameter's worth of NN hopping, and returning a maximal linearly independent subset of these with a preference for vectors with smaller L2 norms.

For finite nanoribbons such as those generated by
`decompactify`

, the graph
diameter can be quite large. This means that finding the primitive
lattice vectors as described above can become unreasonably slow. In the
future, we will label decompactified lattice vectors in the CellGraph
so that `graphDiameter`

will understand not to count them.

setPrimLattice :: CellGraph -> Parameterizable CellGraph Source

Sets the `latticeData`

field of the `Parameters`

state according to a `primLattice`

.

delLEdges :: (Eq b, DynGraph gr) => [LEdge b] -> gr a b -> gr a b Source

Delete a list of `LEdge`

s from a graph.

replicateE :: Int -> Int -> LEdge Displacement -> [LEdge Displacement] Source

Replicate a `LEdge`

n times, each time
increasing the in and out nodes by m. (n is the first argument,
m the second, somewhat stupidly.)