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[, log_name])

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])

Fetches Delta files from Deltas or archive with specified tensor index.

getLEEDdict(sl, rp)

Return a LEED dict containing information needed by guilib functions.

getMaxTensorIndex([home, zip_only])

Checks the Tensors folder for the highest Tensor index there, returns that value, or zero if there is no Tensors folder or no valid Tensors zip file.

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.

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.