35 lines
962 B
Python
35 lines
962 B
Python
|
# coding: utf-8
|
||
|
|
||
|
from msspec.calculator import MSSPEC
|
||
|
from msspec.utils import *
|
||
|
|
||
|
from ase.build import bulk
|
||
|
from ase.visualize import view
|
||
|
|
||
|
a0 = 3.6 # The lattice parameter in angstroms
|
||
|
|
||
|
# Create the copper cubic cell
|
||
|
cluster = bulk('Cu', a=a0, cubic=True)
|
||
|
# Repeat the cell many times along x, y and z
|
||
|
cluster = cluster.repeat((4, 4, 4))
|
||
|
# Put the center of the structure at the origin
|
||
|
center_cluster(cluster)
|
||
|
# Keep atoms inside a given radius
|
||
|
cluster = cut_sphere(cluster, radius=a0 + .01)
|
||
|
# Keep only atoms below the plane z <= 0
|
||
|
cluster = cut_plane(cluster, z=0.1)
|
||
|
|
||
|
# Set the absorber (the deepest atom centered in the xy-plane)
|
||
|
cluster.absorber = get_atom_index(cluster, 0, 0, -a0)
|
||
|
# Create a calculator for the PhotoElectron Diffration
|
||
|
calc = MSSPEC(spectroscopy='PED')
|
||
|
# 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()
|
||
|
#calc.shutdown()
|