Exercises#
Exercise CONV.1#
We start with the simple example of an isolated atom. Place a single carbon atom in a cubic box with dimension L in SPARC. Compute the energy of the system for values of L in the interval 2—14 Å with a 1 Å increment.
Determine the minimal dimension of the box you recommend for the study by plotting system energy against L in Python using the code below.
Explain why the energy converges to the energy that you determine.
from ase.build import bulk, molecule, surface, add_adsorbate
from ase.constraints import FixAtoms
from ase.io import read
from ase.units import Bohr,Hartree,mol,kcal,kJ,eV
from sparc import SPARC
import numpy as np
import json, os, re
import matplotlib.pyplot as plt
%matplolib inline
#Code here
Exercise CONV.2#
For a conventional unit cell of FCC copper, compute per-atom energies and report CPU times required using SPARC
at different mesh spacings (h) from 0.1 to 0.2 with an increment of 0.01.
at different Energy-cutoff (ECUT) from 500 to 1000 with an increment of 100.
Determine the optimal parameters in terms of accuracy versus computational cost.
Convergence test with respect to the mesh spacing (h)
#Code here
Convergence test with respect to the energy-cutoff (ECUT)
#Code here
Repeat the exercise for ECUT (planewave cutoff) in QE. Comment on the convergence behavior in QE versus SPARC.
#Code here
Exercise CONV.3#
For a diamond unit cell, test the convergence of total energy with respect to the k-point mesh and lattice constants. Note that the structures with smaller lattice constants require more dense k-point mesh.
Convergence test with respect to the k-point mesh
#Code here
Convergence test with respect to the lattice constants
#Code here