2.5. Exercises#

These exercises cover ASE calculators.

2.5.1. Exercise 1#

Follow the steps from the previous set of exercises to import Ca-LTA as an Atoms object with periodic boundary conditions, but this time, use ACAJIZ instead.

from ase import Atoms, io
from ase.io import read, write

# Code here

Use an EMT calculator in ASE to optimize the structure, so that the maximum force becomes lower than 0.3 eV/Ang. Use the BFGSLineSearch algorithm and print the trajectory and log files to “opt.traj” and “opt.log”, repsectivley.

from ase.calculators.emt import EMT
from ase.units import Bohr,Hartree,mol,kcal,kJ,eV
from ase.optimize import BFGSLineSearch

# Code here

print(f"Energy before relaxation: ")
print(f"Energy after relaxation: ")

2.5.2. Exercise 2#

Attached is a ZIP file containg 5 metal-organic framework (MOF) structures. Some of these structures were dervied from experimentation and contain overlapping atoms in their input files due to inaccurate X-ray powder diffraction results. You may define overlapping atoms as any pair of atoms with a distance between them of less than half the sum of their respective atomic radii. Atomic radii for all potentially relevant atoms are provided as a Python dictionary below.

Use ASE to identify which structures contain overlapping atoms. Print the 6-letter CSD codes of the defective MOFs to the console. Do not perform this task with visualization!

radii = {'H':0.38, 'Li':0.86, 'Be':0.53, 'B':1.01, 'C':0.88, 'N':0.86, 'O':0.89, 'F':0.82, 'Na':1.15, 'Mg':1.28, 'Al':1.53, 'Si':1.38, 'P':1.28, 'S':1.20,
    'Cl':1.17, 'K':1.44, 'Ca':1.17, 'Sc':1.62, 'Ti':1.65, 'V':1.51, 'Cr':1.53, 'Mn':1.53, 'Fe':1.43, 'Co':1.31, 'Ni':1.33, 'Cu':1.31, 'Zn':1.41, 'Ga':1.40,
    'Ge':1.35, 'As':1.39, 'Se':1.40, 'Br':1.39, 'Rb':1.65, 'Sr':1.30, 'Y':1.84, 'Zr':1.73, 'Nb':1.66, 'Mo':1.57, 'Ru':1.58, 'Rh':1.63, 'Pd':1.68,
    'Ag':1.56, 'Cd':1.56, 'In':1.53, 'Sn':1.64, 'Sb':1.64, 'Te':1.65, 'I':1.58, 'Cs':1.85, 'Ba':1.52, 'La':1.91, 'Ce':1.98, 'Pr':1.75, 'Nd':1.92,
    'Sm':1.89, 'Eu':1.83, 'Gd':1.79, 'Tb':1.82, 'Dy':1.79, 'Ho':1.63, 'Er':1.80, 'Tm':1.84, 'Yb':1.80, 'Lu':1.86, 'Hf':1.73, 'W':1.33, 'Re':1.29,
    'Ir':1.50, 'Pt':1.66, 'Au':1.68, 'Hg':1.88, 'Pb':1.72, 'Bi':1.72, 'Th':1.97, 'U':1.76, 'Np':1.73, 'Pu':1.71}
import os

# Code here