viperleed.calc.lib.leedbase

LEED-specific functions used throughout the viperleed calc package.

Functions

bulk_3d_string(screws, glides)

Return info about bulk screw axes and glide planes as a string.

checkLattice(ab[, eps])

Takes unit vectors a,b as a 2x2 matrix, returns (lat,t), where lat is a string "square", "rectangular", "hexagonal", "rhombic" or "oblique", and t is a 2x2 transformation matrix which will transform the cell to obtuse if it is rhombic or hexagonal.

copy_compile_log(rp, logfile[, save_as])

Copy compilation log file to compile_logs (will be moved to SUPP later).

fortran_compile([pre, filename, post, logname])

Assembles pre+filename+post to a filename, tries to execute via subprocess.run, raises an exception if it fails.

fortran_compile_batch(tasks[, retry, logname])

Performs a list of fortran compilations.

getBeamCorrespondence(sl, rp)

Compares theoretical and experimental beams, returns a list containing a number for each theoretical beam, indicating which experimental beam it corresponds to.

getDeltas(index[, basedir, targetdir, required])

Fetch delta files with a given index from a folder or an archive.

getLEEDdict(sl, rp)

Return a LEED dict containing information needed by gui functions.

getMaxTensorIndex([home, zip_only])

Return the highest index of tensor files/folders in home/Tensors.

getSymEqBeams(sl, rp)

Returns a list of tuples ((hf,kf), index), where (hf,kf) are beams and index is the group of other beams they are equivalent to

getYfunc(ivfunc, v0i)

Returns the Y function for a given function.

get_superlattice_repetitions(matrix)

Return the number of repeats in 2D to cover a superlattice.

get_tensor_indices([home, zip_only])

Yield the indices of all the Tensor files/folders in home/Tensors.

reduceUnitCell(ab[, eps])

Takes an obtuse unit cell as a (2x2) matrix and reduces it to minimum circumference, keeping the area constant.

reduce_c_vector(c_vec, ab_cell)

Compute a Minkowski-reduced version of the third unit-cell vector.