2021-09-24 16:13:14 +02:00
|
|
|
# coding: utf8
|
2019-11-22 11:39:39 +01:00
|
|
|
|
|
|
|
from msspec.calculator import MSSPEC
|
2021-09-24 16:13:14 +02:00
|
|
|
from msspec.utils import hemispherical_cluster, get_atom_index
|
2019-11-22 11:39:39 +01:00
|
|
|
|
|
|
|
from ase.build import bulk
|
|
|
|
from ase.visualize import view
|
|
|
|
|
|
|
|
a0 = 3.6 # The lattice parameter in angstroms
|
|
|
|
|
|
|
|
# Create the copper cubic cell
|
2021-09-24 16:13:14 +02:00
|
|
|
copper = bulk('Cu', a=a0, cubic=True)
|
|
|
|
cluster = hemispherical_cluster(copper, planes=3, emitter_plane=2)
|
2019-11-22 11:39:39 +01:00
|
|
|
|
|
|
|
# Set the absorber (the deepest atom centered in the xy-plane)
|
2021-09-24 16:13:14 +02:00
|
|
|
cluster.absorber = get_atom_index(cluster, 0, 0, 0)
|
|
|
|
|
2019-11-22 11:39:39 +01:00
|
|
|
# Create a calculator for the PhotoElectron Diffration
|
|
|
|
calc = MSSPEC(spectroscopy='PED')
|
2021-09-24 16:13:14 +02:00
|
|
|
|
2019-11-22 11:39:39 +01:00
|
|
|
# Set the cluster to use for the calculation
|
|
|
|
calc.set_atoms(cluster)
|
|
|
|
|
|
|
|
# Run the calculation
|
|
|
|
data = calc.get_theta_scan(level='2p3/2')
|
|
|
|
|
|
|
|
# Show the results
|
|
|
|
data.view()
|
2021-09-24 16:13:14 +02:00
|
|
|
|
|
|
|
# Clean temporary files
|
|
|
|
calc.shutdown()
|