TBit- Utilities for condensed matter physics tight binding calculations.

Safe HaskellNone




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.

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

Delete a list of LEdges 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.)

replicateG :: Int -> CellGraph -> CellGraph Source

Replicate a CellGraph n times, each time increasing the in and out nodes by the number of nodes in the CellGraph.