In [1]:

```
from __future__ import division
import math
# Python Code Ex4.1 Bohr's orbit for the hydrogen atom: Page-126 (2010)
#Variable declaration
n = 1; # The ground state orbit of hydrogen atom
Z = 1; # The atomic number of hydrogen
h = 6.626*10**-34; # Plank's constant, Js
# Absolute electrical permittivity of free space,
# coulomb square per newton per metre square
eps_0 = 8.85*10**-12;
e = 1.602*10**-19; # Electronic charge, C
m = 9.1*10**-31; # Electronic mass, kg
#Calculation
# Radius of first Bohr's orbit (Bohr radius), m
r_B = (n**2*h**2*eps_0)/(math.pi*m*Z*e**2);
#Result
print "The radius of first Bohr orbit, in angstrom, is : "
print round(r_B/(1*10**-10),2)
```

In [2]:

```
from __future__ import division
import math
# Python Code Ex4.2 Ionization potentials of hydrogen atom: Page-126 (2010)
#Variable declaration
Z = 1; # The atomic number of hydrogen
h = 6.626*10**-34; # Plank's constant, Js
# Absolute electrical permittivity of free space,
#coulomb square per newton per metre square
eps_0 = 8.85*10**-12;
e = 1.602*10**-19; # Electronic charge, C
m = 9.1*10**-31;
E=[0] # Electronic mass, kg
#Calculations
# Initialize three potentials to 0 value in a vector
for n in range(1,4):
if n==1:
state = "First"
if n==2:
state = "Second"
if n==3:
state = "Third"
# Energy of nth bohr orbit, eV
E.append(-(m*Z**2*e**4)/(8*eps_0**2*n**2*h**2*e));
#Results
print "\nThe",state,"Ionization Potential is :", round(E[n],2),"eV"
```

In [3]:

```
from __future__ import division
import math
# Python Code Ex4.3 Univalent radii of ions: Page-130 (2010)
#Variable declaration
S = 4.52; # Screening constant for neon like configurations
# A constant determined by the quantum number, m;
#for simplicity it can be assumed as unity
Cn = 1;
Z_Na = 11; # Atomic number of sodium
Z_F = 9; # Atomic number of fluorine
Z_O = 8; # Atomic number of oxygen
# Calculations
r_Na = Cn/(Z_Na - S); # Radius of sodium ion, m
r_F = Cn/(Z_F - S); # Radius of fluorine ion, m
r_ratio = r_Na/r_F; # Radius ratio
r_Na = r_F*r_ratio; # Calculating radius of sodium ion from r_ratio, m
# Given that r_Na + r_F = 2.31D-10,
# or r_Na + r_Na/0.69 = 2.31D-10,
# or r_Na(1 + 1/0.69) = 2.31D-10, solving for r_Na
r_Na = 2.31*10**-10/(1+1/0.69); # Calculating radius of sodium, m
r_F = 2.31*10**-10 - r_Na; # Calculating radius of fluorine from r_Na, m
Cn = r_Na*(Z_Na - S); # Calculating Cn, m
r_O = Cn/(Z_O - S); # Radius of oxygen, m
#Results
print "Radius of sodium ion, in angstrom, is :",round(r_Na/(1*10**-10),2)
print "Radius of fluorine ion, in angstrom, is :",round(r_F/(1*10**-10),2)
print "Constant determined by quantum number is : ",round(Cn/(1*10**-10),2)
print "Radius of oxygen, in angstrom, is : ",round(r_O/(1*10**-10),2)
```

In [4]:

```
from __future__ import division
import math
# Python Code Ex4.4 Ionic Radius of Si ions in silicon dioxide: Page-131(2010)
#Variable declaration
a = 7.12*10**-10; # Lattice parameter of the crystal. m
d = (3*a**2/16)**0.5; # Si-Si distance from (0,0,0) to (1/4,1/4,1/4)
RO = 1.40*10**-10; # Radius of oxygen, m
#Calculations
#Distance of oxygen ions between the two Si ions is 2*RSi+2*RO = d,
RSi = (d - 2*RO)/2; # Radius of silicon ion, m
#Results
print "The radius of Si4+ ion, in angstrom, is : ",round(RSi/(1*10**-10),2)
```

In [5]:

```
from __future__ import division
import math
#Python Code Ex4.5 Ionic Radius occupying an octahedral position:Page-138(2010)
#Variable declaration
R_ratio = 0.414;#Radius ratio for an octahedral void in am M+X- ionic lattice
R_x = 2.5*10**-10; # Critical radius of X- anion, m
#Calculation
R_m = R_x*0.414; # Radius of M+ cation, m
#Result
print "The radius of cation occupying octahedral position "
print"in an M+X- ionic solid, in angstrom, is : ",round(R_m/(1*10**-10),2)
```

In [6]:

```
from __future__ import division
import math
#Python CodeEx4.7Percentage ionic character of covalent molecule:Page-142(2010)
#Variable declaration
x_A = 4.0; # Electronegativity of fluorine
x_B = 2.1; # Electronegativity of hydrogen
#Calculation
#Percentage ionic character of the covalent bond in HF molecule
P = 16*(x_A - x_B) + 3.5*(x_A - x_B)**2;
# Result
print"\nThe percentage ionic character in HF molecule is",round(P,2),"percent"
```

In [7]:

```
from __future__ import division
import math
#Python Code Ex4.8 Calculating metallic radius
#from unit cell dimension:Page-146 (2010)
#Variable declaration
a = 2.81*10**-10;# Unit cell dimension of bcc structure of iron, m
# Calculations
# For bcc structure we have
# sqrt(3)*a = 4*R, solving for R
R = (3)**0.5/4*a; # Metallic radius of iron atom, m
# Results
print"\nThe metallic radius of iron atom is:"
print round(R/(1*10**-10),2),"angstrom"
```

In [8]:

```
from __future__ import division
import math
# Python Code Ex4.9
#Calculating metallic radii from unit cell dimensions: Page-146 (2010)
#Variable declaration
a_Au = 4.08e-10; # Unit cell dimension of fcc structure of gold, m
a_Pt = 3.91e-10; # Unit cell dimension of fcc structure of platinum, m
# Calculations
# For fcc structure we have
# sqrt(2)*a = 4*R, solving for R
R_Au = (2)**0.5/4*a_Au; # Metallic radius of gold atom, m
R_Pt = (2)**0.5/4*a_Pt; # Metallic radius of gold atom, m
#Results
print"\nThe metallic radius of gold atom, in angstrom, is :"
print round(R_Au/(1*10**-10),2);
print"\nThe metallic radius of platinum atom, in angstrom, is :"
print round(R_Pt/(1*10**-10),2);
```

In [9]:

```
from __future__ import division
import math
# Python Code Ex4.10 Calculating metallic diameter and
# unit cell dimension of aluminium: Page-146 (2010)
#Variable declaration
Z_Al = 13; # Atomic number of aluminium
A_Al = 26.98; # Atomic mass of aluminium, g
d_Al = 2700*10**3; # Density of aluminium, g per metre cube
n = 4; # number of atoms in the fcc structure of aluminium
N = 6.023*10**+23; # Avogadro's number
# Calculations
# We have number of atoms per fcc unit cell given as
# n = (V*d_Al*N)/A_Al, solving for V
# V = (n*A_Al)/(d_Al*N), V is the volume of the unit cell
# or a**3 = (n*A_Al)/(d_Al*N), solving for a
a = ((n*A_Al)/(d_Al*N))**(1/3); # unit cell parameter of aluminium
# For an fcc structure we have
# sqrt(2)*a = 4*R = 2*D, solving for D
D = a/(2)**0.5; # metallic diameter of aluminium having fcc structure
#Result
print"\nThe unit cell dimension of aluminium, is:"
print round(a/(1*10**-10),2),"angstrom"
print"\nThe metallic diametre of aluminium, is:"
print round(D/(1*10**-10),2),"angstrom"
```