Real and Reciprocal Space in 2D and 3D

Maya Berlinger

Crystallography in 2D and 3D

Lattices in 2D defined by translational symmetry points.

Lattice vectors are the shortest and next-to-shortest translations.

4 types of general 2D lattices exist:

Lattices in 3D are defined by a set of three vectors a, b, and c.

7 types of simple crystal systems exist in 3D:

(*Mathematica has a built in function for unit cells of the different crystal systems. I take these images and label them*)
Grid[
{
{
LatticeData["SimpleCubic","Image"],
LatticeData["SimpleTetragonal","Image"],
LatticeData["SimpleOrthorhombic","Image"],
LatticeData["SimpleMonoclinic","Image"]
},
{
Text[Style["Simple Cubic",Large]],
Text[Style["Simple Tetragonal",Large]],
Text[Style["Simple Orthorhomic",Large]],
Text[Style["Simple Monoclinic",Large]]
},
{LatticeData["SimpleTrigonal","Image"],
LatticeData["SimpleTriclinic","Image"],
LatticeData["SimpleHexagonal","Image"]
},
{
Text[Style["Simple Trigonal",Large]],
Text[Style["Simple Triclinic",Large]],
Text[Style["Simple Hexagonal",Large]]}
}
]

More complicated crystals can also exist. For example, body centered cubic and face centered cubic come from a simple cubic crystal structure.

(*Visualize simple cubic, FCC, and BCC*)
Grid[
{
{
LatticeData["SimpleCubic","Image"],
Graphics[{Thick,Arrowheads[.2],Arrow[{{0,0},{1,0}}]}],
LatticeData["BodyCenteredCubic","Image"],
LatticeData["FaceCenteredCubic","Image"]
},
{
Text[Style["Simple Cubic",Large]],
Text[Style["",Large]],
Text[Style["Body Centered Cubic",Large]],
Text[Style["Face Centered Cubic",Large]]
}
}
]

All images and definitions from 3.012 2017 Class Notes

What is Reciprocal Space?

General Information

Real space is the physical world around us.

Reciprocal space is a non-physical space that makes patterns in internal structures of materials easier to understand (portrays diffraction phenomena).

Reciprocal lattice vectors relate to sets of planes in real space.

Properties:

Units in (length^(-1))

Length of basis vectors in reciprocal space are  (1/(length in real space))

Volume of reciprocal unit cell is (1/(volume real unit cell))

(Subscript[d, hkl]) is the spacing of the planes in a real crystal. (Subscript[g, hkl]) is the reciprocal equivalent.

(Subscript[g, hkl]) ⊥ (Subscript[d, hkl])

|(Subscript[g, hkl])| =(1/(Subscript[d, hkl]))

X-Ray Diffraction (XRD)

Reciprocal space important for understanding XRD.

A beam of incident x-rays are diffracted in a material.

Import["https://upload.wikimedia.org/wikipedia/commons/thumb/c/c0/Bragg_diffraction_2.svg/440px-Bragg_diffraction_2.svg.png"]

This produces an electron diffraction pattern (example below is SiC). Points in pattern originate from set of planes in crystal and represent a reciprocal lattice vector. This image is in reciprocal space!

All images and definitions from 3.012 2017 Class Notes, unless otherwise noted

2D Visualization

(*This creates a visualization of the 2D crystal lattices in both real space and reciprocal space. The type of lattice can be chosen,or the ratio of the lattice vectors and the angle between them can be specificed*)
(*See appendix for mathematical explanation of the vectors and where the lines below came from*)
With[
{
(*These two lines create the rows of points that make up the lattice points in real space, based on b and a. Because I define the Manipulate by b/a, defining a=1 for mathematical purposes, I can use b in the equations. Theoretically, a lattice could be infinite, but this lattice is not.*)
line1=Partition[Flatten@Table[{n,m},{n,0,10,1},{m,0,10 b Sin[θ  Degree],2b Sin[θ  Degree]}],2],line2=Partition[Flatten@Table[{n+b Cos[θ  Degree],m},{n,0,10,1},{m,b Sin[θ  Degree],10 b Sin[θ Degree],2b Sin[θ  Degree]}],2],
(*Same as above, but for reciprocal space*)
line1r=Partition[Flatten@Table[{n,m/b},{n,0,10 Cos[(90-θ) Degree],2Cos[(90-θ) Degree]},{m,0,10,1}],2],
line2r=Partition[Flatten@Table[{n,m/b-Sin[(90-θ )Degree]},{n,Cos[(90-θ) Degree],10 Cos[(90-θ) Degree],2Cos[(90-θ )Degree]},{m,0,10,1}],2]
},
Manipulate[
(*Label the two lattices*)
Column[{Text[Style["      Real Space             Reciprocal Space",Large]],GraphicsRow[
{
(*Create the real space lattice centered around a specific point (the point was randomly chosen as a point close to the center of the lattice, it could be any point, but I will use this centering point for the rest of the real space code). Because the lattice is not infinite, I chose a point in the center to prevent edge effects*)
Show[
Graphics[
Point[line1],PlotRange->{{line1[[26,1]]-2,line1[[26,1]]+2},{line1[[26,2]]-2,line1[[26,2]]+2}}
],
Graphics[
Point[line2],PlotRange->{{line1[[26,1]]-2,line1[[26,1]]+2},{line1[[26,2]]-2,line1[[26,2]]+2}}
],
(*Create the two lattice vectors and label them*)
Graphics[
{Thick,Hue[0.75,0.5,0.93],Text[Style["a",Bold],line1[[32]]+{1/4,0 }],Arrow[{line1[[26]],line1[[32]]}]}
],
Graphics[
{Thick,Hue[0.36,1,0.5],Text[Style["b",Bold],line2[[22]]+{0,1/4}],Arrow[{line1[[26]],line2[[22]]}]}
],
(*Outline the unit cell*)
Graphics[
{Dashed,Line[{line1[[32]],line2[[27]]}],Line[{line2[[22]],line2[[27]]}]}
],
Graphics[
{Opacity[0.1],Polygon[{line1[[32]],line2[[27]],line2[[22]],line1[[26]]}]}
]
],
(*Repeat everything again for reciprocal space—Create the reciprocal space lattice centered around a specific point *)
Show[
Graphics[
Point[line1r],PlotRange->{{line1r[[26,1]]-2,line1r[[26,1]]+2},{line1r[[26,2]]-2,line1r[[26,2]]+2}}
],
Graphics[
Point[line2r],PlotRange->{{line1r[[26,1]]-2,line1r[[26,1]]+2},{line1r[[26,2]]-2,line1r[[26,2]]+2}}
],
(*Create the recirpocal lattice vectors and unit cell*)
Graphics[
{Thick,Hue[0.64,0.84,0.96],Text[Style["b*",Bold],line1r[[27]]+{0,1/4 }],Arrow[{line1r[[26]],line1r[[27]]}]}
],
Graphics[
{Thick,Hue[0.1,0.99,0.96],Text[Style["a*",Bold],line2r[[26]]+{1/4,0}],Arrow[{line1r[[26]],line2r[[26]]}]}
],
Graphics[
{Dashed,Line[{line1r[[27]],line2r[[27]]}],Line[{line2r[[26]],line2r[[27]]}]}
],
Graphics[
{Opacity[0.1],Polygon[{line1r[[26]],line1r[[27]],line2r[[27]],line2r[[26]]}]}
]
]
},
(*Fix the spacing of the images*)
Frame-> All,ImageSize->Scaled[0.5]
]
}
],
(*Create the maniuplate options and label them. The 4 types of lattices can be chosen, or the user can pick their own parameters.*)
Text[Style["2D Lattices: Real and Reciprocal Space",Black,Bold, Large]],
Delimiter,
Text[Style["Choose one of the 4 existing 2D lattices",Black, Medium]],
Button["Square",{b=1,θ=90}],
Button["Rectangular",{b=0.75,θ=90}],
Button["Oblique",{b=1.25,θ=100}],
Button["Hexagonal",{b=1,θ=120}],
Delimiter,
Text[Style["Or set your own parameters",Black, Medium]],
{{b,0.75,"b/a"},0,3},
{{θ,50,"θ (Degrees)"},0,180},
Alignment->Center,
ControlPlacement->Top]
]

3D Visualization

(*The function mathematically converts the lattice vectors to reciprocal space. See appendix for mathematical explanation*)
reciprocal[real_]:=Inverse[Transpose[real]]

(*This creates a visualization of the 3D crystal structures in both real space and reciprocal space. The type of simple crystal system can be chosen, or the 3 lattice vectors can be specified.*)
With[{real={{a11,a12,a13},{a21,a22,a23},{a31,a32,a33}}},
Manipulate[
Grid[
(*Define and draw the lattice vectors in real space, (real lattice vector matrix specified in the With[] above). The vectors are labeled*)
{
{
Labeled[
Graphics3D[
{
{
Thick,Arrow[{{{0,0,0},real[[1]]},{{0,0,0},real[[2]]},{{0,0,0},real[[3]]}}],
{
Inset[Text[Style["a",Bold,Medium]],real[[1]]+{.2,0,0}],Inset[Text[Style["b",Bold,Medium]],real[[2]]+{0,.2,0}],Inset[Text[Style["c",Bold,Medium]],real[[3]]+{0,0,.2}]
}
},
(*Take the lattice vectors, turn them into the boundaries of a 3D shape, and add atoms at each corner*)
{
Opacity[0.3],Parallelepiped[{0,0,0},real]
},
{
Purple,Sphere[real[[1]],0.1],Sphere[real[[2]],0.1],Sphere[real[[3]],0.1],Sphere[real[[1]]+real[[2]],0.1],Sphere[real[[1]]+real[[3]],0.1],Sphere[real[[3]]+real[[2]],0.1],Sphere[real[[1]]+real[[2]]+real[[3]],0.1],Sphere[{0,0,0},0.1]
}
},
(*Label the crystal*)
Boxed->False,PlotLabel->Style["Real Space",Black,20]
],
(*Compute volume of real unit cell*)
TextGrid[{{"Volume:",Volume[Parallelepiped[{0,0,0},real]]}}]
],
(*Do everything again for reciprocal space*)
Labeled[
(*Define reciprocal lattice vectors, create unit cell, and add atoms to each corner*)
Graphics3D[
{
{
Thick,Red,Arrow[{{{0,0,0},reciprocal[real][[1]]},{{0,0,0},reciprocal[real][[2]]},{{0,0,0},reciprocal[real][[3]]}}],
{
Inset[Text[Style["a*",Bold,Medium]],reciprocal[real][[1]]+{.3,0,0}],Inset[Text[Style["b*",Bold,Medium]],reciprocal[real][[2]]+{0,.3,0}],Inset[Text[Style["c*",Bold,Medium]],reciprocal[real][[3]]+{0,0,.3}]
}
},
{
Opacity[0.3],Parallelepiped[{0,0,0},reciprocal[real]]
},
{
Purple,Sphere[reciprocal[real][[1]],0.1],Sphere[reciprocal[real][[2]],0.1],Sphere[reciprocal[real][[3]],0.1],Sphere[reciprocal[real][[1]]+reciprocal[real][[2]],0.1],Sphere[reciprocal[real][[1]]+reciprocal[real][[3]],0.1],Sphere[reciprocal[real][[3]]+reciprocal[real][[2]],0.1],Sphere[reciprocal[real][[1]]+reciprocal[real][[2]]+reciprocal[real][[3]],0.1],Sphere[{0,0,0},0.1]}
},
Boxed->False,PlotLabel->Style["Reciprocal Space",Black,20]
],
(*Caclulate volume*)
TextGrid[{{"Volume:",Volume[Parallelepiped[{0,0,0},reciprocal[real]]]}}]
]
}
},
Dividers->Center,Spacings->10],
(*Create labels for the manipulate options. The user can either choose one of the 7 pre-set crystal systems, or set their own lattice vectors*)
Text[Style["3D Crystal System: Real and Reciprocal Space",Black,Bold, Large]],
Delimiter,
Text[Style["Choose one of the 7 existing 3D crystal systems",Medium]],
(*Note, there are other values that can be set for the crystal lattice vectors below (excluding cubic). I chose one example to display of each kind.*)
Button["Cubic",real={{1,0,0},{0,1,0},{0,0,1}}],
Button["Tetragonal",real={{1,0,0},{0,1,0},{0,0,0.5}}],
Button["Orthorhobmic",real={{1,0,0},{0,0.75,0},{0,0,0.5}}],
Button["Monoclinic",real={{1,0,0},{0,0.5,0},{1,0,1}}],
Button["Rhombohedral",real={{1,1,0},{0,1,1},{1,0,1}}],
Button["Triclinic",real={{1,1,0},{1,0.5,0},{1,1,1}}],
Button["Hexagonal",real={{1,0,0},{1/2,Sqrt[3]/2,0},{0,0,1}}],
Delimiter,
Text[Style["Set your own parameters",Medium]],
Grid[
{
{
Text[ ""],Text[Style["x-direction",Bold, Medium]],Text[Style["y-direction",Bold, Medium]],Text[Style["z-direction",Bold, Medium]]
},
{
Text[Style["a lattice vector",Bold,Medium]],
Control[{{a11,1,""},0,1}],
Control[{{a12,0,""},0,1}],
Control[{{a13,0,""},0,1}]
},
{
Text[Style["b lattice vector",Bold,Medium]],
Control[{{a21,0,""},0,1}],
Control[{{a22,1,""},0,1}],
Control[{{a23,0,""},0,1}]
},
{
Text[Style["c lattice vector",Bold,Medium]],
Control[{{a31,0,""},0,1}],
Control[{{a32,0,""},0,1}],
Control[{{a33,1,""},0,1}]
}
}
],
Alignment->Center
]
]

Appendix and References

Appendix:

2D reciprocal space calculation:
With basis vectors of a real space lattice (Subscript[a, 1]) and (Subscript[a, 2]) (which are equivalent to a and b), the basis vectors of the reciprocal space lattice (SuperStar[(Subscript[a, 1])])and (SuperStar[(Subscript[a, 2])]) (which are equivalent to a* and b*) are defined by:
(Subscript[a, i]).(SuperStar[(Subscript[a, j])])=0 if i≠j
(Subscript[a, i]).(SuperStar[(Subscript[a, j])])=1 if i=j
This leads to a geometric visual:

Import["http://www.chembio.uoguelph.ca/educmat/chm729/recip/reci1.gif"]

Note on line1 and line2 code in 2D visualization:

	In the code, there is line1 and line2. They are made up of alternating rows of dots, which represent the lattice sites. line1 is dots separated by 2bSin[θ] in the y direction and 1 in the x direction. line2 also has points separated by 2bSin[θ] in the y direction and 1 in the x direction. However, the x values are shifted by bCos[θ] compared to line1.
	Rather than allowing a and b to be chosen, the user can set the ratio of b/a. Consequently, we can treat a as 1 and b as the b/a ratio chosen by the user to simplify the visual. 
	A similar approach was used to create the reciprocal lattice.

3D reciprocal space calculation:
With basis vectors of a real space lattice (Subscript[a, 1]), (Subscript[a, 2]), and  (Subscript[a, 3]) (which are equivalent to a, b, and c), the basis vectors of the reciprocal space lattice  (SuperStar[(Subscript[a, 1])]), (SuperStar[(Subscript[a, 2])]), and  ((Subscript[a, 3])^( * ))(which are equivalent to a*, b*, and c*) are defined by:
(Subscript[a, i]).(SuperStar[(Subscript[a, j])])=0 if i≠j
(Subscript[a, i]).(SuperStar[(Subscript[a, j])])=1 if i=j
The following equations can be used to calculate each reciprocal lattice vector:
(SuperStar[(Subscript[a, 1])])= (((Subscript[a, 2])×(Subscript[a, 3]))/((Subscript[a, 1]).((Subscript[a, 2])×(Subscript[a, 3]))))
(SuperStar[(Subscript[a, 2])])= (((Subscript[a, 3])×(Subscript[a, 1]))/((Subscript[a, 2]).((Subscript[a, 3])×(Subscript[a, 1]))))
(SuperStar[(Subscript[a, 3])])= (((Subscript[a, 1])×(Subscript[a, 2]))/((Subscript[a, 3]).((Subscript[a, 1])×(Subscript[a, 1]))))
These vectors have the relationship:
[(SuperStar[(Subscript[a, 1])]),(SuperStar[(Subscript[a, 2])]),((Subscript[a, 3])^( * ))]=([(Subscript[a, 1]),(Subscript[a, 2]),((Subscript[a, 3])^( ))]ᵀ)-1

References:

3.012 Fall 2017 Lecture Notes
General information/some math

https://en.wikipedia.org/wiki/Reciprocal_lattice
Explains the math behind reciprocal space

http://demonstrations.wolfram.com/ReciprocalLattice2D/
I used this source to see what a good manipulate could look like (I did not look at the Source Code, only at what the visual looked like)