msg-byu / enumlib

Derivative structure enumeration library
MIT License
59 stars 34 forks source link

Possible bug in non-concentration restricted cases. #51

Closed wsmorgan closed 6 years ago

wsmorgan commented 6 years ago

When running enum.x for the following setup:

hcp binary case
bulk       # 3D case (instead of surface)
1 0 0                    # First lattice vector 
.5 0.866025403784439 0   # Second lattice vector
0 0 1.6329931618554521   # Third lattice vector
3             # binary case
2             # Two lattice points/unit cell
 0 0 0  0/1/2   # first lattice point is at the origin, can take both types of atoms
.5 0.28867513459  0.81649658093 0/1/2 # second points
1 7      # Enumerate 8-atom cells only (quadrupled cells)
.0001      # Finite precision parameter
full       

Then the first few structures in struct_enum.out are:

          1         1       1        1        1           1   1    24   1  1  1    1  0  1  0  0  1      1    0    0    0    1    0    0    0    1   00
          2         1       1        2        2           2   1    24   1  1  1    1  0  1  0  0  1      1    0    0    0    1    0    0    0    1   01
          3         1       1        2        2           3   1    24   1  1  1    1  0  1  0  0  1      1    0    0    0    1    0    0    0    1   02
          4         1       1        1        1           4   1    24   1  1  1    1  0  1  0  0  1      1    0    0    0    1    0    0    0    1   11
          5         1       1        2        2           5   1    24   1  1  1    1  0  1  0  0  1      1    0    0    0    1    0    0    0    1   12
          6         1       1        1        1           6   1    24   1  1  1    1  0  1  0  0  1      1    0    0    0    1    0    0    0    1   22
          7         2       1        4        4           1   2    24   1  1  2    1  0  1  0  0  2      1    0    0    0    1    0    0    0    1   0001
          8         3       3        4       12           2   2     8   1  1  2    1  0  1  0  1  2      1    0    0    0    1    0    0   -1    1   0001
          9         2       1        4        4           3   2    24   1  1  2    1  0  1  0  0  2      1    0    0    0    1    0    0    0    1   0002
         10         3       3        4       12           4   2     8   1  1  2    1  0  1  0  1  2      1    0    0    0    1    0    0   -1    1   0002

If I change the last line in the input file from full to part I would expect that the number of 2 atom cells would be smaller but that we should still get some of them. What we get is:

          1         2       1       12       12           1   2    24   1  1  2    1  0  1  0  0  2      1    0    0    0    1    0    0    0    1   0012
          2         3       3       12       36           2   2     8   1  1  2    1  0  1  0  1  2      1    0    0    0    1    0    0   -1    1   0012
          3         2       1       24       24           3   2    24   1  1  2    1  0  1  0  0  2      1    0    0    0    1    0    0    0    1   0102
          4         3       3       24       72           4   2     8   1  1  2    1  0  1  0  1  2      1    0    0    0    1    0    0   -1    1   0102
          5         4       3       12       36           5   2     8   1  1  2    1  0  2  0  0  1      1    0    0    0    1    1    0   -1    0   0012
          6         4       3       12       36           6   2     8   1  1  2    1  0  2  0  0  1      1    0    0    0    1    1    0   -1    0   0102
          7         4       3       12       36           7   2     8   1  1  2    1  0  2  0  0  1      1    0    0    0    1    1    0   -1    0   0112

Not a single 2 atom cell is kept. This seams extremely un-likely especially since for the binary case of:

hcp binary case
bulk       # 3D case (instead of surface)
1 0 0                    # First lattice vector 
.5 0.866025403784439 0   # Second lattice vector
0 0 1.6329931618554521   # Third lattice vector
2             # binary case
2             # Two lattice points/unit cell
 0 0 0  0/1   # first lattice point is at the origin, can take both types of atoms
.5 0.28867513459  0.81649658093 0/1 # second points
1 7      # Enumerate 8-atom cells only (quadrupled cells)
.0001      # Finite precision parameter
part       # Generate a complete listing (e.g., don't consider AAAB==BBBA)

We get:

          1         1       1        2        2           1   1    24   1  1  1    1  0  1  0  0  1      1    0    0    0    1    0    0    0    1   01
          2         2       1        8        8           1   2    24   1  1  2    1  0  1  0  0  2      1    0    0    0    1    0    0    0    1   0001
          3         3       3        8       24           2   2     8   1  1  2    1  0  1  0  1  2      1    0    0    0    1    0    0   -1    1   0001
          4         2       1        1        1           3   2    24   1  1  2    1  0  1  0  0  2      1    0    0    0    1    0    0    0    1   0101
          5         3       3        1        3           4   2     8   1  1  2    1  0  1  0  1  2      1    0    0    0    1    0    0   -1    1   0101

Where there is clearly a 2 atom cell kept. So why does the algorithm throw out all the 2 atom cells when we move to a ternary system?

glwhart commented 6 years ago

See Ex. 2 in the README file: "Note that the "part" setting on line 11 also insists that each label (0, 1, 2) must appear in each structure (so it leaves out pure binary structures in this ternary case), so there are no structures of volume 1 or 2. Try running again with the "full" setting to see that configurations will be found for volumes 1 and 2 in that case."

With the part setting, only configurations that have every element are included.