Wednesday 9 August 2023

Topology-matching algorithm for finding 2D lattice in a 3D lattice

I have a 3D lattice with a unit cell (i.e. the minimum repeating unit) of 16 points. Since it's a 3D lattice, it is periodic in all 3 dimensions (x, y, z). In detail, the unit cell looks like this: enter image description here

The 3 lattice vectors a1, a2, a3 are

bulk_vecs = [[14.56578026795, 0.0,            0.0          ], # a1
             [0.0,            8.919682340494, 0.0          ], # a2
             [7.282890133975, 2.973227446831, 4.20477857933]] # a3

The Cartesian coordinates of the 16 points are

bulk_coords = [[ 0.00000000,  0.00000000,  0.00000000],
               [ 10.9243352,  6.34420137,  2.66488775],
               [ 18.2072253,  6.34420137,  2.66488775],
               [ 12.7450577,  3.17210068,  1.33244387],
               [ 10.6807662,  8.91968234,  0.42187384],
               [ 16.1429338,  3.37097392,  1.19181926],
               [ 19.7843789,  9.31742882,  3.29420855],
               [ 9.34718165,  2.97322745,  1.47306849],
               [ 14.8093492,  6.34420137,  2.24301390],
               [ 9.10361267,  9.11855558,  3.43483316],
               [ 3.88501404,  0.39774648,  0.14062462],
               [ 7.03932116,  5.94645489,  2.52426313],
               [ 12.9886267,  8.91968234,  3.57545778],
               [ 7.28289013,  0.00000000,  0.00000000],
               [ 5.46216760,  3.17210068,  1.33244387],
               [ 16.3865028,  9.11855558,  3.43483316]]

Now I have a reference 2D lattice that contains 32 points in unit cell. Note that here "2D" means it is only periodic in the x and y dimensions, but can still have thickness in the z direction. Its unit cell looks like this (this is only a simple example, the unit cell can be of any shape, not necessarily cubic):

enter image description here

The 3 lattice vectors are given by

ref_vecs = [[8.1968234, 0.,          0.          ], # x-direction (periodic)
            [0.,        13.38535656, 0.          ], # y-direction (periodic)
            [0.,        0.,          7.7280392142]] # z-thickness (non-periodic)

The Cartesian coordinates of the 32 points are

ref_coords = [[ 5.65852755,  9.84826406,  0.10024035],
              [ 5.66769587,  3.14583318,  0.03049278],
              [ 5.84383908,  6.16622816,  0.33687635],
              [ 3.06154746,  11.5036515,  0.89497370],
              [ 3.04533245,  4.74684988,  0.80482405],
              [ 2.81714593,  7.85388222,  0.95654678],
              [ 3.09409158,  1.66514480,  1.21902173],
              [-0.03484920,  9.98872688,  1.91238251],
              [ 0.07586672,  6.55689489,  2.02252838],
              [ 0.15624468,  13.1218508,  2.07583316],
              [ 0.30441248,  2.82022739,  2.21046382],
              [ 5.46226670,  11.2187312,  2.95396399],
              [ 5.83993074,  5.03326172,  3.11251461],
              [ 5.40963696,  8.13117939,  3.23409626],
              [ 5.45612978,  1.47718658,  3.32634157],
              [ 2.72591886,  6.68506441,  3.86756751],
              [ 2.91602855,  3.06649570,  3.90688764],
              [ 2.95946887,  9.79329729,  3.96116732],
              [ 3.11916042,  12.9792231,  4.17677610],
              [ 0.35863087,  4.72533071,  4.75876360],
              [ 0.31594175,  11.4937246,  4.67355664],
              [ 0.03089551,  1.37091216,  4.91348486],
              [ 0.39020723,  8.35223658,  5.11836201],
              [ 5.45925351,  3.34155067,  5.87036690],
              [ 5.62981527,  13.2212649,  5.93479016],
              [ 5.64259931,  6.46196620,  5.93435713],
              [ 5.83825398,  9.54653517,  6.08472919],
              [ 2.80592452,  4.61964086,  6.76956275],
              [ 3.15087591,  11.6754589,  6.98585963],
              [ 2.68542186,  1.40293444,  7.10791606],
              [ 2.73378423,  8.13529985,  7.12898617],
              [ 0.03114729, -0.01057378,  7.78083813]]

This reference 2D lattice represents something similar to a "thick layer" extracted from a 3D lattice and its 2 lattice vectors in the x and y directions are parallel to a1 and a2 (i.e. parallel to the xy-plane). Now I want to find a parallel 2D lattice inside the current 3D lattice that best matches this reference 2D lattice. The similarity should depend on the topology of the two 2D lattice unit cells. For example, the reference unit cell could be thought as applying small perturbations to the fractional coordinates and lattice parameters of the best-matched 2D lattice unit cell. Below is an illustration for the 2D lattice extraction from the 3D lattice: enter image description here

To search in the space of all possible parallel 2D lattice unit cells in a 3D lattice space is difficult, especially considering that I might need to expand the 3D lattice unit cell to search in the whole space (but how much should I expand?). I would like to know if there's any algorithm that can find the best topology-matching 2D lattice unit cell in the whole 3D lattice space relatively fast. Specifically, I want to obtain the lattice vectors and the 32 Cartesian coordinates of the best-matched 2D lattice unit cell. Any sugguestions or even ideas are welcome.



from Topology-matching algorithm for finding 2D lattice in a 3D lattice

No comments:

Post a Comment