Pyrochlore Lattice Unit Cell Expansion

This example computes the linked cluster expansion on the pyrochlore lattice up to order 3 using four-site expansion cells.

Setup

Define the unit cell with basis positions, primitive vectors, and nearest-neighbour bonds:

using Lincege

pyro_exp_uc_basis = [
        [
                [1 / 2, 1 / 2, 1 / 2],
                [1 / 2, -1 / 2, -1 / 2],
                [-1 / 2, 1 / 2, -1 / 2],
                [-1 / 2, -1 / 2, 1 / 2],
        ],
]
pyro_exp_uc_pvecs = [[2.0, 2.0, 0.0], [2.0, 0.0, 2.0], [0.0, 2.0, 2.0]]
pyro_exp_uc_lbonds = [
        # Inside a Unit Cell
        ExpansionBond([1, 1], [1, 2], [0, 0, 0], 1),
        ExpansionBond([1, 1], [1, 3], [0, 0, 0], 1),
        ExpansionBond([1, 1], [1, 4], [0, 0, 0], 1),
        ExpansionBond([1, 2], [1, 3], [0, 0, 0], 1),
        ExpansionBond([1, 2], [1, 4], [0, 0, 0], 1),
        ExpansionBond([1, 3], [1, 4], [0, 0, 0], 1),
        # Between Unit Cells
        ExpansionBond([1, 1], [1, 2], [0, 0, 1], 1),
        ExpansionBond([1, 1], [1, 3], [0, 1, 0], 1),
        ExpansionBond([1, 1], [1, 4], [1, 0, 0], 1),
        ExpansionBond([1, 2], [1, 3], [0, 1, -1], 1),
        ExpansionBond([1, 2], [1, 4], [1, 0, -1], 1),
        ExpansionBond([1, 3], [1, 4], [1, -1, 0], 1),
]
pyro_exp_uc_ebonds = [
        Bond(1, 1, [1, 0, 0], 1),
        Bond(1, 1, [0, 1, 0], 1),
        Bond(1, 1, [0, 0, 1], 1),
        Bond(1, 1, [0, 1, -1], 1),
        Bond(1, 1, [1, 0, -1], 1),
        Bond(1, 1, [1, -1, 0], 1),
]
pyro_exp_uc_uc = ExpansionUnitCell(
        pyro_exp_uc_basis,
        pyro_exp_uc_pvecs,
        pyro_exp_uc_lbonds,
        pyro_exp_uc_ebonds,
        [[1, 1, 1, 1]]
)
ExpansionUnitCell([[0.5 0.5 -0.5 -0.5; 0.5 -0.5 0.5 -0.5; 0.5 -0.5 -0.5 0.5]], [2.0 2.0 0.0; 2.0 0.0 2.0; 0.0 2.0 2.0], [[1, 1, 1, 1]], [[1, 2, 3, 4]], ExpansionBond[ExpansionBond([1, 1], [1, 2], [0, 0, 0], 1), ExpansionBond([1, 1], [1, 3], [0, 0, 0], 1), ExpansionBond([1, 1], [1, 4], [0, 0, 0], 1), ExpansionBond([1, 2], [1, 3], [0, 0, 0], 1), ExpansionBond([1, 2], [1, 4], [0, 0, 0], 1), ExpansionBond([1, 3], [1, 4], [0, 0, 0], 1), ExpansionBond([1, 1], [1, 2], [0, 0, 1], 1), ExpansionBond([1, 1], [1, 3], [0, 1, 0], 1), ExpansionBond([1, 1], [1, 4], [1, 0, 0], 1), ExpansionBond([1, 2], [1, 3], [0, 1, -1], 1), ExpansionBond([1, 2], [1, 4], [1, 0, -1], 1), ExpansionBond([1, 3], [1, 4], [1, -1, 0], 1)], Bond[Bond(1, 1, [1, 0, 0], 1), Bond(1, 1, [0, 1, 0], 1), Bond(1, 1, [0, 0, 1], 1), Bond(1, 1, [0, 1, -1], 1), Bond(1, 1, [1, 0, -1], 1), Bond(1, 1, [1, -1, 0], 1)])

Each expansion element contains four sites. The first six ExpansionBond entries connect sites within the cell, the remaining six connect neighboring cells. The separate Bond entries define connections between expansion elements. All sites and physical bonds use label 1.

Imaging the unit cell and lattice

Load Plots and ColorSchemes to activate the plotting extension. Solid lines show physical bonds, and dashed black lines outline the primitive cell. The unit-cell view also marks neighboring sites reached by intercell physical bonds, so it shows more than the four basis sites.

using Plots, ColorSchemes
image_unit_cell(pyro_exp_uc_uc)
Example block output

Repeat the cell along all three primitive vectors with cells=0:1, giving eight cells plus endpoints of outgoing bonds. The optional gray dashed lines connect expansion-element centers; they are separate from physical bonds. Both UnitCell and ExpansionUnitCell support repeated 3D lattice plots.

image_lattice(pyro_exp_uc_uc; cells=0:1, show_expansion_bonds=true)
Example block output

Building the lattice and clusters

The following code generates clusters up to order 3, starting with translational clusters and reducing to isomorphic clusters. Here order counts expansion elements.

Use StrongClusterExpansionLattice because these expansion cells do not share sites.

m_order = 3
lattice = StrongClusterExpansionLattice(m_order, pyro_exp_uc_uc)

trans_clusters = TranslationClusterSet(lattice)
clusters_from_lattice!(trans_clusters, lattice)

iso_clusters = IsomorphicClusterSet(lattice)
reduce_clusters!(iso_clusters, trans_clusters)
ClusterSet{IsomorphicHasher} with 5 clusters

Computing the expansion

The final NLCE expansion weights are computed recursively.

expansion = Expansion(iso_clusters, lattice)
summation!(expansion, m_order)
Expansion(Dict{UInt64, Lincege.ExpansionCluster}(0x7aeda23d159698c7 => Lincege.ExpansionCluster(Vertices: [165, 171, 172, 508, 514, 515, 851, 857, 858, 1194, 1200, 1201], 1.0, UInt64[0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0xd07f403ac7161f7e, 0xd6fecc8fc555a8f8, 0xd07f403ac7161f7e, 0xd6fecc8fc555a8f8, 0xd6fecc8fc555a8f8, 0xd07f403ac7161f7e], Dict{UInt64, Float64}(0x7aeda23d159698c7 => 1.0, 0xd07f403ac7161f7e => -3.0, 0xd6fecc8fc555a8f8 => 3.0, 0x14acd1057b698a40 => 0.0)), 0x072df54518b9791d => Lincege.ExpansionCluster(Vertices: [123, 124, 172, 466, 467, 515, 809, 810, 858, 1152, 1153, 1201], 1.0, UInt64[0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0xd6fecc8fc555a8f8, 0xd6fecc8fc555a8f8, 0xd07f403ac7161f7e, 0xd07f403ac7161f7e, 0xd6fecc8fc555a8f8, 0xd07f403ac7161f7e], Dict{UInt64, Float64}(0x072df54518b9791d => 1.0, 0xd6fecc8fc555a8f8 => 3.0, 0xd07f403ac7161f7e => -3.0, 0x14acd1057b698a40 => 0.0)), 0xd07f403ac7161f7e => Lincege.ExpansionCluster(Vertices: [124, 172, 467, 515, 810, 858, 1153, 1201], 1.5, UInt64[0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0xd6fecc8fc555a8f8, 0xd6fecc8fc555a8f8], Dict{UInt64, Float64}(0xd07f403ac7161f7e => 1.0, 0xd6fecc8fc555a8f8 => -2.0, 0x14acd1057b698a40 => 0.0)), 0xbab90e6cabeb2734 => Lincege.ExpansionCluster(Vertices: [123, 172, 220, 466, 515, 563, 809, 858, 906, 1152, 1201, 1249], 10.5, UInt64[0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0xd6fecc8fc555a8f8, 0xd6fecc8fc555a8f8, 0xd07f403ac7161f7e, 0xd6fecc8fc555a8f8, 0xd07f403ac7161f7e], Dict{UInt64, Float64}(0xd6fecc8fc555a8f8 => 1.0, 0xbab90e6cabeb2734 => 1.0, 0xd07f403ac7161f7e => -2.0, 0x14acd1057b698a40 => 0.0)), 0xd6fecc8fc555a8f8 => Lincege.ExpansionCluster(Vertices: [172, 515, 858, 1201], 0.25, UInt64[0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40, 0x14acd1057b698a40], Dict{UInt64, Float64}(0xd6fecc8fc555a8f8 => 1.0, 0x14acd1057b698a40 => -4.0)), 0x14acd1057b698a40 => Lincege.ExpansionCluster(Vertices: [1], 1.0, UInt64[], Dict{UInt64, Float64}(0x14acd1057b698a40 => 1.0))), Vector{UInt64}[[0x14acd1057b698a40], [0xd6fecc8fc555a8f8], [0xd07f403ac7161f7e], [0x7aeda23d159698c7, 0x072df54518b9791d, 0xbab90e6cabeb2734]], 1)

Writing to JSON

Lastly, write the results to a JSON file for future computations.

write_to_json(expansion, lattice, joinpath(output_dir, "pyrochlore_lattice_unit_cell_expansion.json"))