Working with crystal structures
GTPack contains several functions to work with space groups and crystal structures, which are illustrated within this tutorial. Since different crystal structures cannot be implemented by referring to the space group number, a user defined database has to be created. This database is written to a list called spcgrp. To distinguish the structures, e.g. the Pearson Symbol or Strukturbericht Symbol can be taken into account.
| GTInstallStructure[Structure] | installs a crystal structure,by appeding it to the list spcgrp. |
| GTAllStructures[] | prints all structures that are currently installed within the list spcgrp. |
| GTGetStructure[Information] | displays an installed crystal structure from a certain information (e.g.Pearson symbol,Strukturbericht designation,name). |
| GTSaveStructures[File] | saves the content of the list spcgrp (list of installed crystal structures) to an arbitrary File. |
| GTLoadStructures[File] | loads the content of the list spcgrp (list of installed crystal structures) from an arbitrary File. |
| GTPlotStructure[Structure, Min,Max] | plots a crystal Structure within a certain plot range,defined by Min and Max. |
Needs["GroupTheory`"]As a first example the diamond structure is considered. From the Naval Research page (http://cst-www.nrl.navy.mil/lattice/) we get:
# Prototype : C (diamond)
# Pearson Symbol : cF8
# Strukturbericht Designation : A4
# Space Group : Fd3m (Cartesian and lattice coordinate listings available)
# Number : 227
# Other Elements with this Structure : Si, Ge, Sn
# Reference : Ashcroft and Mermin, p.76.
# Primitive Vectors :
A1 = ½ a Y + ½ a Z
A2 = ½ a X + ½ a Z
A3 = ½ a X + ½ a Y
# Basis Vectors :
B1 = -1/8 A1 - 1/8 A2 - 1/8 A3 = -1/8 a X - 1/8 a Y - 1/8 aZ (C) (8 a)
B2 = +1/8 A1 + 1/8 A2 + 1/8 A3 = +1/8 a X + 1/8 a Y + 1/8 aZ (C) (8 a)
diamond = {{"C", "Diamond"}, "cF8", "A4", "Fd3m", 227, {{0, a / 2, a / 2}, {a / 2, 0, a / 2}, {a / 2, a / 2, 0}}, {{{-a / 8, -a / 8, -a / 8}, "C"}, {{a / 8, a / 8, a / 8}, "C"}}, {a -> 355}};nacl = {{"NaCl", "NaCl"}, "cF8", "B1", "FmOverscriptBox[3, _]m", 225, {{0, a / 2, a / 2}, {a / 2, 0, a / 2}, {a / 2, a / 2, 0}}, {{{0, 0, 0}, "Na"}, {{a / 2, a / 2, a / 2}, "Cl"}}, {a -> 564.02}};fluorite = {{"SubscriptBox[CaF, 2]", "Fluorite"}, "cF12", "C1", "FmOverscriptBox[3, _]m", 225, {{0, a / 2, a / 2}, {a / 2, 0, a / 2}, {a / 2, a / 2, 0}}, {{{0, 0, 0}, "Ca"}, {{a / 4, a / 4, a / 4}, "F"}, {{-a / 4, -a / 4, -a / 4}, "F"}}, {}};wurtzite = {{"ZnS", "Wurtzite"}, "hP4", "B4", "SubscriptBox[P6, 3 mc]", 186, {{a / 2, -a / 2Sqrt[3], 0}, {a / 2, a / 2Sqrt[3], 0}, {0, 0, c}}, {{{a / 2, a / 2 / Sqrt[3], 0}, "Zn"}, {{a / 2, -a / 2 / Sqrt[3], c / 2}, "Zn"}, {{a / 2, a / 2 / Sqrt[3], u c}, "S"}, {{a / 2, -a / 2 / Sqrt[3], (1 / 2 + u) c}, "S"}}, {a -> 382, c -> 626, u -> 3 / 8}};spcgrpGTInstallStructure[diamond]
GTInstallStructure[nacl]
GTInstallStructure[wurtzite]
GTInstallStructure[fluorite]GTAllStructures[]GTInstallStructure[diamond]GTGetStructure["B1"]SetDirectory[NotebookDirectory[]];
GTSaveStructures["spcgrp_test.m"]GTLoadStructures["spcgrp_test.m"]NaCl = GTGetStructure["NaCl"]min = {0, 0, 0} /. a -> 564;
max = {2 a, 2 a, 2 a} /. a -> 564;scale = 1.
GTPlotStructure[NaCl, min, max, scale]scale = .25
GTPlotStructure[NaCl, min, max, scale]