11: Crystal Structure

Example number 1, Page number 299

In [2]:
#importing modules
import math
from __future__ import division

#Variable declaration    
n=4;        #number of molecules per unit cell
M=60.2;     #molecular weight
N=6.02*10**26;     #avagadro number(kg mol-1)
rho=6250;          #density(kg/m**3)

#Calculations
a=(n*M/(rho*N))**(1/3);     #lattice constant(m)

#Result
print "lattice constant is",int(a*10**10),"angstrom"
lattice constant is 4 angstrom

Example number 2, Page number 299

In [4]:
#importing modules
import math
from __future__ import division

#Variable declaration    
n=2;        #number of molecules per unit cell
M=55.8;     #molecular weight
N=6.02*10**26;     #avagadro number(kg mol-1)
rho=7870;          #density(kg/m**3)

#Calculations
a=(n*M/(rho*N))**(1/3);     #lattice constant(m)

#Result
print "lattice constant is",round(a*10**10,3),"angstrom"
lattice constant is 2.867 angstrom

Example number 3, Page number 299

In [6]:
#importing modules
import math
from __future__ import division

#Variable declaration    
n=4;        #number of molecules per unit cell
M=63.5;     #molecular weight
N=6.02*10**23;     #avagadro number(kg mol-1)
rho=8.96;          #density(gm/cm**3)

#Calculations
a=(n*M/(rho*N))**(1/3);     #lattice constant(m)
d=a/math.sqrt(2);           #distance between two nearest copper atoms(cm)

#Result
print "distance between two nearest copper atoms is",round(d*10**8,2),"angstrom"
distance between two nearest copper atoms is 2.55 angstrom

Example number 4, Page number 303

In [10]:
#importing modules
import math
from __future__ import division

#Variable declaration  
a=1/2;
b=1/3;
c=1/6;     #intercepts along the three axes

#Calculations
def lcm(x, y):
    if x > y:
        greater = x
    else:
        greater = y
    while(True):
        if((greater % x == 0) and (greater % y == 0)):
            lcm = greater
            break
        greater += 1
        
    return lcm

z=lcm(1/a,1/b);
lcm=lcm(z,1/c);
h=a*lcm;
k=b*lcm;
l=c*lcm;      #miller indices of plane

#Result
print "miller indices of plane are (",int(h),int(k),int(l),")"
miller indices of plane are ( 3 2 1 )

Example number 5, Page number 303

In [18]:
#importing modules
import math
from __future__ import division

#Variable declaration  
a=1/4;
b=1/3;
x=float("inf");
c=1/x;     #intercepts along the three axes

#Calculations
def lcm(x, y):
    if x > y:
        greater = x
    else:
        greater = y
    while(True):
        if((greater % x == 0) and (greater % y == 0)):
            lcm = greater
            break
        greater += 1
        
    return lcm

lcm=lcm(1/a,1/b);
h=a*lcm;
k=b*lcm;
l=c*lcm;      #miller indices of plane

#Result
print "miller indices of plane are (",int(h),int(k),int(l),")"
miller indices of plane are ( 3 4 0 )

Example number 6, Page number 303

In [19]:
#importing modules
import math
from __future__ import division

#Variable declaration  
a=1/1;
b=-1/3;
c=1/2;     #intercepts along the three axes

#Calculations
def lcm(x, y):
    if x > y:
        greater = x
    else:
        greater = y
    while(True):
        if((greater % x == 0) and (greater % y == 0)):
            lcm = greater
            break
        greater += 1
        
    return lcm

z=lcm(1/a,1/b);
lcm=lcm(z,1/c);
h=a*lcm;
k=b*lcm;
l=c*lcm;      #miller indices of plane

#Result
print "miller indices of plane are (",int(h),int(k),int(l),")"
miller indices of plane are ( 6 -2 3 )

Example number 7, Page number 304

In [9]:
#importing modules
import math
from __future__ import division

#Variable declaration    
p1=1.2;       #x-primitive(angstrom)
p2=1.8;       #y-primitive(angstrom)
p3=2.0;       #z-primitive(angstrom)
x=2;          #x-intercept
y=3;          #y-intercept
z=1;          #z-intercept
h=1.2;        #intercept on x-axis(angstrom)

#Calculations
h1=p1/x;      
k1=p2/y;
l1=p3/z;
k=h*k1/h1;    #intercept on y-axis(angstrom)
l=h*p3/h1;    #intercept on z-axis(angstrom)

#Result
print "intercept on y-axis is",k,"angstrom"
print "intercept on z-axis is",l,"angstrom"
intercept on y-axis is 1.2 angstrom
intercept on z-axis is 4.0 angstrom