# Lattice representation: change of unit cell

(I use VESTA to visualize supercells with the VASP POSCAR format.)

Consider the following cell which has haunted me:

POSCAR
3.5668661195641991
1.00000000 -1.00000000 -1.00000000
1.00000000  1.00000000 -1.00000000
1.50000000  0.00000000  2.50000000
A  B
8  24
Direct
1.00000000  1.00000000  1.00000000
0.06250000  0.06250000  0.25000000
0.65625000  0.15625000  0.12500000
0.71875000  0.21875000  0.37500000
0.81250000  0.81250000  0.25000000
0.15625000  0.65625000  0.12500000
0.21875000  0.71875000  0.37500000
0.93750000  0.93750000  0.75000000
0.12500000  0.12500000  0.50000000
0.53125000  0.03125000  0.62500000
0.18750000  0.18750000  0.75000000
0.59375000  0.09375000  0.87500000
0.25000000  0.25000000  1.00000000
0.31250000  0.31250000  0.25000000
0.37500000  0.37500000  0.50000000
0.03125000  0.53125000  0.62500000
0.78125000  0.28125000  0.62500000
0.43750000  0.43750000  0.75000000
0.09375000  0.59375000  0.87500000
0.84375000  0.34375000  0.87500000
0.90625000  0.40625000  0.12500000
0.56250000  0.56250000  0.25000000
0.96875000  0.46875000  0.37500000
0.62500000  0.62500000  0.50000000
0.28125000  0.78125000  0.62500000
0.68750000  0.68750000  0.75000000
0.34375000  0.84375000  0.87500000
0.75000000  0.75000000  1.00000000
0.40625000  0.90625000  0.12500000
0.50000000  0.50000000  1.00000000
0.46875000  0.96875000  0.37500000
0.87500000  0.87500000  0.50000000


I wish to rotate (or transform) this cell so that its non-orthogonal lattice vectors become orthogonal. I'm not sure anymore if this can be done.

Required lattice vectors (though, not a 100 % confident if this is what I need🙈):

a = 1.0 -1.0  0.0
b = 1.0  1.0 -2.5
c = 2.5  2.5  2.0


Original intent: This is a random FCC solid solution (SQS). I want to change the cell so that it looks like a usual FCC supercell.

• I can't give an answer, but I don't think there is anything wrong with a non-orthogonal supercell. I might recommend always using the Niggli representation of the cell as it makes it easy for others to generate the exact same cell. – Tristan Maxson Oct 6 '20 at 16:13
• I just gave an answer, but then deleted it because I think I misunderstood. Are you hoping to keep the same number of atoms, just reorganized into an orthogonal cell? – wcw Oct 10 '20 at 19:08
• @wcw yes, the same # of atoms but an orthogonal traditional FCC like cell. – Hitanshu Sachania Oct 10 '20 at 21:02
• @wcw You should undelete your post, it is good information. It is likely the best that can be done with this cell from my attempts. – Tristan Maxson Oct 11 '20 at 13:37
• Okay, I brought it back. The original question might have an answer, but I'm not sure. – wcw Oct 11 '20 at 16:43

I will start by re-stating your question to make sure I understand what you mean. You have a cell with lattice vectors written in Cartesian coordinates as follows: $$\begin{pmatrix} \mathbf{a}=\hat{\mathbf{x}}-\hat{\mathbf{y}}-\hat{\mathbf{z}} \\ \mathbf{b}=\hat{\mathbf{x}}+\hat{\mathbf{y}}-\hat{\mathbf{z}} \\ \mathbf{c}=1.5\hat{\mathbf{x}}+2.5\hat{\mathbf{z}} \end{pmatrix}$$ You then seek a transformation of this cell to obtain a new cell with the following lattice vectors: $$\begin{pmatrix} \mathbf{a}^{\prime}=\hat{\mathbf{x}}-\hat{\mathbf{y}} \\ \mathbf{b}^{\prime}=\hat{\mathbf{x}}+\hat{\mathbf{y}}-2.5\hat{\mathbf{z}} \\ \mathbf{c}^{\prime}=2.5\hat{\mathbf{x}}+2.5\hat{\mathbf{y}}+2\hat{\mathbf{z}} \end{pmatrix}$$ A superlattice is related to an original lattice by a transformation matrix $$S$$ whose matrix elements $$S_{ij}$$ are integers. The relation is: $$\begin{pmatrix} \mathbf{a}^{\prime} \\ \mathbf{b}^{\prime} \\ \mathbf{c}^{\prime} \end{pmatrix} = \begin{pmatrix} S_{11} & S_{12} & S_{13} \\ S_{21} & S_{22} & S_{23} \\ S_{31} & S_{32} & S_{33} \end{pmatrix} \begin{pmatrix} \mathbf{a} \\ \mathbf{b} \\ \mathbf{c} \end{pmatrix}$$ So your question is: can we find a matrix $$S$$ of integer elements that obeys this equation? I think the answer is no.

This is most easily seen with the $$\mathbf{c}^{\prime}$$ lattice vector: $$\begin{eqnarray} \mathbf{c}^{\prime}&=&S_{31}\mathbf{a}+S_{32}\mathbf{b}+S_{33}\mathbf{c} \\ &=&S_{31}(\hat{\mathbf{x}}-\hat{\mathbf{y}}-\hat{\mathbf{z}})+S_{32}(\hat{\mathbf{x}}+\hat{\mathbf{y}}-\hat{\mathbf{z}})+S_{33}(1.5\hat{\mathbf{x}}+2.5\hat{\mathbf{z}}) \\ &=&(S_{31}+S_{32}+1.5S_{33})\hat{\mathbf{x}}+(-S_{31}+S_{32})\hat{\mathbf{y}}+(-S_{31}-S_{32}+2.5S_{33})\hat{\mathbf{z}}. \end{eqnarray}$$ You want this to equal: $$\mathbf{c}^{\prime}=2.5\hat{\mathbf{x}}+2.5\hat{\mathbf{y}}+2\hat{\mathbf{z}}.$$ If you compare the $$\hat{\mathbf{y}}$$ components, your condition becomes: $$-S_{31}+S_{32}=2.5.$$ This equation has no solution for integer $$S_{ij}$$, so you cannot build the second set of cell parameters from the first.

[Disclaimer: plenty of signs and numbers, so may have a mistake in the calculation. However, you should still be able to use this strategy to figure out the correct answer if different.]

• Thank you, ProfM. Perhaps, a simple solution to get orthogonal lattice vectors is orthogonalisation of these vectors. Though, I'm not sure if those would be valid lattice vectors. @wcw's answer seems to corroborate this doubt. – Hitanshu Sachania Oct 11 '20 at 20:53
• @HitanshuSachania if I understand you correctly, you are asking a different question now. You now want to build a supercell of your original cell in which the three lattice vectors are orthogonal (and presumably the smallest possible such supercell)? If so, you still have to solve the same set of equations I have in my answer with an integer supercell matrix, but now imposing the condition of orthogonality on the final set of lattice vectors. Simply orthogonalising is not enough if the transformation introduces non-integer linear combinations. – ProfM Oct 11 '20 at 20:56
• The matrix $S = \begin{pmatrix} -3 & 1 & 0 \\ 1 & 1 & 4 \\ 0 & 4 & 0 \end{pmatrix}$ gets you orthogonal lattice vectors, I think. Not sure if it's the smallest supercell. – wcw Oct 11 '20 at 23:45
• @HitanshuSachania I think I agree with your latest comment. wcw, thanks for the matrix, not sure if it is the smallest either. Either way, the size of the supercell that a given transformation matrix gives is the determinant of the matrix. – ProfM Oct 12 '20 at 6:39
• @HitanshuSachania great! I think this one is definitely more useful – wcw Oct 12 '20 at 19:51

I used the structure manipulation scripts provided by AIRSS to generate the conventional cell associated with your primitive cell. I think AIRSS uses Spglib under the hood for this task, so you could probably use Spglib directly if you wanted.

Original cell

New cell

POSCAR file

POSCAR
1.0000000000000000
10.0886200000   0.0000000000   0.0000000000
0.0000000000   7.1337300000   0.0000000000
-2.5221540330   0.0000000000  10.0886187273
A         B
16        48
Direct
0.0000000000   0.0000000000   0.0000000000
0.4375000000   0.5000000000   0.7500000000
0.0937500000   0.2500000000   0.8750000000
0.0312500000   0.2500000000   0.6250000000
0.6875000000   0.5000000000   0.7500000000
0.0937500000   0.7500000000   0.8750000000
0.0312500000   0.7500000000   0.6250000000
0.5625000000   0.5000000000   0.2500000000
0.5000000000   0.5000000000   0.0000000000
0.9375000000   0.0000000000   0.7500000000
0.5937500000   0.7500000000   0.8750000000
0.5312500000   0.7500000000   0.6250000000
0.1875000000   0.0000000000   0.7500000000
0.5937500000   0.2500000000   0.8750000000
0.5312500000   0.2500000000   0.6250000000
0.0625000000   0.0000000000   0.2500000000
0.3750000000   0.5000000000   0.5000000000
0.2187500000   0.2500000000   0.3750000000
0.3125000000   0.5000000000   0.2500000000
0.1562500000   0.2500000000   0.1250000000
0.2500000000   0.5000000000   0.0000000000
0.1875000000   0.5000000000   0.7500000000
0.1250000000   0.5000000000   0.5000000000
0.2187500000   0.7500000000   0.3750000000
0.9687500000   0.2500000000   0.3750000000
0.0625000000   0.5000000000   0.2500000000
0.1562500000   0.7500000000   0.1250000000
0.9062500000   0.2500000000   0.1250000000
0.8437500000   0.2500000000   0.8750000000
0.9375000000   0.5000000000   0.7500000000
0.7812500000   0.2500000000   0.6250000000
0.8750000000   0.5000000000   0.5000000000
0.9687500000   0.7500000000   0.3750000000
0.8125000000   0.5000000000   0.2500000000
0.9062500000   0.7500000000   0.1250000000
0.7500000000   0.5000000000   0.0000000000
0.8437500000   0.7500000000   0.8750000000
-0.0000000000   0.5000000000   0.0000000000
0.7812500000   0.7500000000   0.6250000000
0.6250000000   0.5000000000   0.5000000000
0.8750000000   0.0000000000   0.5000000000
0.7187500000   0.7500000000   0.3750000000
0.8125000000   0.0000000000   0.2500000000
0.6562500000   0.7500000000   0.1250000000
0.7500000000   0.0000000000   0.0000000000
0.6875000000   0.0000000000   0.7500000000
0.6250000000   0.0000000000   0.5000000000
0.7187500000   0.2500000000   0.3750000000
0.4687500000   0.7500000000   0.3750000000
0.5625000000   0.0000000000   0.2500000000
0.6562500000   0.2500000000   0.1250000000
0.4062500000   0.7500000000   0.1250000000
0.3437500000   0.7500000000   0.8750000000
0.4375000000   0.0000000000   0.7500000000
0.2812500000   0.7500000000   0.6250000000
0.3750000000   0.0000000000   0.5000000000
0.4687500000   0.2500000000   0.3750000000
0.3125000000   0.0000000000   0.2500000000
0.4062500000   0.2500000000   0.1250000000
0.2500000000   0.0000000000   0.0000000000
0.3437500000   0.2500000000   0.8750000000
0.5000000000   0.0000000000   0.0000000000
0.2812500000   0.2500000000   0.6250000000
0.1250000000   0.0000000000   0.5000000000
`

I realize this isn't exactly what you wanted (e.g., the new cell vectors aren't actually orthogonal), but I am leaving it here because of the comments requesting for me to undelete the answer.