Академический Документы
Профессиональный Документы
Культура Документы
crystallographic structures
Andersson, Gustav Ls, Johan Strandberg, Rickard
941223-1939 910228-5856 880215-0618
gustand@kth.se johanlaa@kth.se rstran@kth.se
1
Contents
1 Intro 3
2 Theory 4
2.1 Crystals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2.1 Simple cubic . . . . . . . . . . . . . . . . . . . . . . . 5
2.2.2 Body-centered cubic . . . . . . . . . . . . . . . . . . . 5
2.2.3 Face-centered cubic . . . . . . . . . . . . . . . . . . . . 5
2.2.4 Hexagonal Close-packed . . . . . . . . . . . . . . . . . 5
2.2.5 Rock salt . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2.6 Flourite . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Defects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.4 Calculating the packing factor . . . . . . . . . . . . . . . . . . 8
3 Programming 10
3.1 Type of files . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.1.1 Custom file . . . . . . . . . . . . . . . . . . . . . . . . 11
3.1.2 POSCAR file . . . . . . . . . . . . . . . . . . . . . . . 12
3.1.3 .xyz file . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4 Discussion 15
5 Sources 16
2
1 Intro
For our course in Modern Physics, we were asked to choose and work on
one of many projects presented to us. We chose Familiarization with and
visualization of crystallographic not only because we wanted to know more
about crystals, but also to brush up on our programming.
The purpose of this specific project was twofold; to begin with, develop
a basic understanding regarding crystallography. Secondly, to expand an
existing script in python, written by our instructor Antoine Claisse, which
makes drawing crystals an easy task.
3
2 Theory
In this section, the essential theory of crystals will be addressed. This in-
cludes the definition of one, some of the different structures it may have and
also a few words regarding defects that may occur. Most of this information
is taken from the book Introduction to Solid State Physics [1].
2.1 Crystals
All matter is made up of atoms - and matter can either be crystalline or not.
When we speak of matter in this sense, were referring to solid material.
What defines a crystal is the periodic array of its atoms; a highly ordered
structure. An ideal one would be constructed by the repetition of identical
structural units in space; a simple example of this would be copper, where
this unit is made up of one single atom.
r0 = r + n1 a + n2 b + n3 c
where n1 , n2 and n3 are integers and the arrangement looks the same when
viewed from both r0 and r, the lattice is defined by these sets of points.
2.2 Structures
When we speak of different structures of crystals, were actually referring
to different types of lattices - and we will focus on those that are three-
dimensional. These can be visualized by observing a unit cell, the (not
always, but the most obvious - also called the conventional unit cell) small-
est unit that the crystal is built from. There are quite a few, and we will not
address all of them.
4
2.2.1 Simple cubic
A great place to start is with the easiest one - simple cubic. It is composed
of eight atoms residing in the corners of a cube. This is basically positioning
single atoms on a lattice with points that are equally spaced in all directions.
The fundamental translation vectors must be orthogonal, and this, of course,
applies to all the cubic types. An example of an element with this kind of
structure would be Polonium [2]. Assuming all atoms are of the same size,
the packing factor will be 0.52.
5
Figure 4: HCP, picture credit: [3]
This is the most volume efficient way of stacking spheres (along with the
FCC structure) with a packing factor of about 0.74, and this is, of course,
calculated for the case when all the atoms are of the same size. FCCs and
HCPs are based on the same way of arrangement, the difference is in how
the sheets of atoms are stacked.
For this structure, the packing factor isnt as easy to calculate, since there
are more than one type of atom present. For NaCl, however, it is 0.65.
2.2.6 Flourite
The structure of flourite is also quite special. Its unit cell could be described
as a face-centered cubic type with a smaller simple cubic residing inside of
it - at least thats what it looks like from the positions of the atoms. See fig.
6.
6
Figure 6: Flourite, picture credit: [5]
2.3 Defects
Weve learnt that the atoms or molecules in a crystal occur in ordered struc-
tures. However, in nature, most of these arent perfect - defects may occur.
There are a few different kinds of these, point defects, line defects, planar
defects, and so on. We will be focusing almost solely on the first mentioned.
If an atom resides somewhere in the crystal where there usually arent any,
its an intersitial defect. These two types of defects may happen simultane-
ously - if an atom moves from its original position to an interstitial site (a
site where an atom may fit), a vacancy is made. These are often referred to
as a Frenkel pair or Frenkel defect.
Another interesting defect apart from the ones discussed above are grain
boundaries - a type of planar defect. These usually form when two indepen-
7
dently growing crystals meet and are quite noticeable because of the sudden
change in direction of the lattice.
To find out the volume taken up by the atoms, we must first figure out how
many atoms fit in this cell. By analysing this picture, this isnt very hard
at all. If youd puzzle all the pieces together, there would be four whole
spheres. Four atoms (of the same size) take up the volume
4 16
Vatoms = 4 r3 = r3
3 3
where r denotes their individual radius. Now weve got to calculate the
volume of the cell, and to do this, we want to find length of one of its sides.
The diagonal distance across a face will be four atomic radii in length, which
means that
a2 + b2 = c2 , b = a, c = 4r 2a2 = 16r2 a = 8r
Vunitcell = a3 = ( 8r)3 = 8 8r3 = 16 2r3
8
Thereby, we get
16
3 r3
packing f actor = = ' 0.74
16 2r3 3 2
Basically, this is how its done. However, if there more than one type of atom
in the structure, it can be a bit harder. Also, weve mentioned before that
a face-centered cubic structure packs atoms in the most efficient way, which
means with the highest packing factor. Even though its not that simple,
looking at the picture used here, this fact becomes a bit more intuitive.
9
3 Programming
After we had gone through all the necessary theory, we started to focus on
the task of expanding said python script. In the original version given to
us, one could get drawn representations of crystals by specifying things like
structural type, placement of atoms, colors and sizes of these, links between
them and so on, in a text document. Our job was to allow the program to
read from other type of files. Since this project was done in a limited amount
of time, we could only make this possible for a few.
Now, this still requires certain functions reading certain files in the correct
way. The thing is, however, that with an object, one can create methods
doing all sorts of things - which is especially easy when all information is
available from the same place. Aside from our draw-method, which returns
the necessary information to draw a crystal with the script, weve got, for
example, the repeat-method. It simply repeats the crystal in a given direc-
tion.
10
If one would look at BCC structure (with a single atom residing in the
middle), one would understand that this works quite well. However, with
more complex crystals, it might not. Keep in mind - this method isnt even
needed (but can obviously be used) for crystals described in our custom file;
one could just specify where all the links are supposed to go. It becomes
much more obvious when we look at the other two files we chose imple-
ment support for - .xyz and POSCAR. These are common types used when
describing crystals, and of course, can be read by other software.
The first line tells us which kind of crystal it is - in this case its a BBC,
but it might as well be FCC, CUBIC, and so on. The second line specifies
the size. Each number represents the length of the sides of the crystal, and,
weirdly enough, in cartesian coordinates, these are in the case of cubic types
actually in the order of x, z, y (= a, b, c) - this is decided by the original
script.
The third line can be used to decide on how many times one would like
to repeat the crystal (the integers) and the letters denote which direction
this is done. This means that in this case, it would repeat the unit cell once
in the a-direction. On the fourth line, information about the number, size
and color of the atoms are given. This is done in plain text, and different
types are separated by a comma.
11
The rest is a description on where the atoms are supposed to go, and how
they are connected. On each row, the first three numbers denote its coor-
dinates (a, b, c). If there is a colon followed by other coordinates (which
may be more than one, separated by commas) one the same line, this tells
us which atom(s) this one is supposed to connect to. Its important to note
that the atoms will be done in order - if its specified like it is in our example,
the first eight coordinates will be given to first eight blue atoms, and so on.
If we let the program draw this example, itll look like this:
The first line is treated as a comment line - it is not used for anything (in our
case). The second line denotes something called the universal scaling factor.
It is, however, not used. The following three lines defines the unit cell by
describing the three lattice vectors a, b and c. When reading a POSCAR
file with our script, these should be set like in the example above.
The sixth line specifies how the number of atoms, where a separation in-
dicates a different kind. These will then be assigned in order, just like for
12
our custom file. The seventh line should always say direct, and this is not
used when drawing the crystal. All that follows after this are coordinates
of the atoms. As one might notice, there is no information about how links
should be drawn - this is where our connect_atoms-method comes in handy.
This particular example would result in the following crystal.
This would be a face-centered cubic type of crystal, with two vacancy defects.
Whether or not the green atoms are supposed to be linked, currently, the
method will draw it anyway - it could need some improvement.
The number on the first line tells us how many atoms that are present - this
and the second line, for comments, arent used in our xyz-reading function.
The following lines contain information about the element and position of
each atom. Weve made it so that if there are more than one element present,
they will be differently coloured. Drawn, its a simple cubic crystal with a
substitutional defect.
13
The coordinates are sometimes given in ngstroms, and they may be negative
as well. This is countered by the function reading the file by finding the
biggest negative coordinate on each of the three axis, and moving it such
that these become zero (and thereby, everything else positive).
14
4 Discussion
There are, of course, a few things in the code that could really need an im-
provement. Especially the drawing criteria included in the connect_atoms-
method - it works fine for some types of crystals, but absolutely not for all.
However, in such a limited time, a flawless, complete program werent ex-
pected of us either.
The strength of our code, wed argue, lies within the different classes. This
makes everything so much easier - write a custom function reading and ex-
tracting data from a certain file, store this in objects, and operate on them
using methods. Like for example, our repeat-method. First of all, it needs
all information regarding atoms and links to properly duplicate itself in the
direction chosen by the user. It also needs to store all those newly appointed
coordinates of atoms and links to be able to draw it later on.
We were supposed to, if time allowed (which it didnt) to have the pro-
gram be able to read complex defects from a separate file, and then repeat it
if so wished. Now, this is actually possible with what weve done, using our
custom file format. Since it allows for anything (well, atoms and links) to be
specified, one could include any kind of defect, within the limitations of what
the original script is able to draw, in a crystal or by itself, and then repeat it.
Wed say, though, that were pretty pleased with what weve accomplished
and what weve learnt working on this project. We hope this experience will
aid us in further studies - again encountering the field of crystallography is
most probable.
15
5 Sources
[1] Kittel, Charles. (1968) Introduction to Solid State Physics.
[2] http://periodictable.com/Properties/A/CrystalStructure.html
[3] http://mathworld.wolfram.com/HexagonalClosePacking.html
[4] http://bilbo.chm.uri.edu/CHM401/Image1350.gif
[5] http://cnx.org/resources/af7b2706ae0ae9289b91e5e4d255909e/graphics6.jpg
[6] http://people.clarkson.edu/isuni/Chap-3.pdf
16