Core

This subpackage contains the core functionalities including mathematical function, and important class methods from all over the main package.

Constants

Here are the physical constants and default values for the input.

Cpu solvers

Functions used in the solution method of the Builder class. Parallelization is done using MPI if it is available.

default_solver(builder[, print_memory])

It calculates the energies by the Greens function method without MPI parallelization.

solve_parallel_over_k(builder[, print_memory])

It calculates the energies by the Greens function method.

Gpu solvers

Functions used in the solution method of the Builder class. Because GPUs run asyncronusly, we can unlock the GIL in python and run in a parallel manner over multiple GPUs. The only constrain is the input/output writing between hardwares.

solve_parallel_over_k(builder[, print_memory])

It calculates the energies by the Greens function method.

gpu_solver(max_g_per_loop, mode, gpu_number, ...)

Parallelizes the Green's function solution on GPU.

Utilities

Miscellaneous suport functions used around the code. There are mathematical functions, Contour, Kspace and Hamiltonian methods, magnetic entity and pair generation.

commutator(a, b)

Shorthand for commutator.

tau_u(u)

Pauli matrix in direction u.

crossM(u)

Definition for the cross-product matrix.

RotM(theta, u[, eps])

Definition of rotation matrix with angle theta around direction u.

RotMa2b(a, b[, eps])

Definition of rotation matrix rotating unit vector a to unit vector b.

setup_from_range(dh, R[, subset])

Generates all the pairs and magnetic entities from atoms in a given radius.

arrays_lists_equal(array1, array2)

Compares two objects with specific rules.

arrays_None_equal(array1, array2)

Compares two objects with specific rules.

onsite_projection(matrix, idx1, idx2)

It produces the slices of a matrix for the on site projection.

calc_Vu(H, Tu)

Calculates the local perturbation in case of a spin rotation.

build_hh_ss(dh)

It builds the Hamiltonian and Overlap matrix from the sisl.dh class.

make_contour([emin, emax, enum, p])

A more sophisticated contour generator.

make_kset([kset])

Simple k-grid generator to sample the Brillouin zone.

hsk(H, S, sc_off[, k])

Speed up Hk and Sk generation.

process_ref_directions(ref_xcf_orientations)

Preprocess the reference directions input for the Builder object.

IO utility functions

Utility functions for the io subpackage.

decipher(tag)

Gets the atom, l and orb from the tag of the magnetic entity.

decipher_all_by_pos(dh, magnetic_entities, pairs)

This function deciphers the magnetic entities and pairs based on coordinates

decipher_all_by_tag(magnetic_entities, pairs)

Creates the magnetic entities and pairs from the tag.

strip_dict_structure(dictionary[, pops, setto])

Sets the values in the pops keys from the whole dictionary structure to the given value.

standardize_input(input, defaults)

Standardizes the input from .py and .fdf using the default values

Physics utilities

Utility functions for the physics subpackage.

get_number_of_electrons(dm)

Determines the number of electrons in the system from the density matrix.

automatic_emin(infile)

It reads the lowest energy level from siesta.

blow_up_orbindx(orb_indices)

Expand orbital indices to make SPIN BOX indices.

spin_tracer(M)

Extracts orbital dependent Pauli traces.

parse_magnetic_entity(dh[, atom, l, orb])

Function to get the orbital indices of a given magnetic entity.

interaction_energy(Vu1_1, Vu1_2, Gij, Gji, ...)

The interaction energy variation upon rotations.

second_order_energy(Vu1, Vu2, Gii, weights)

The second order energy variation upon rotations.

calculate_anisotropy_tensor(energies)

Calculates the renormalized anisotropy tensor from the energies.

fit_anisotropy_tensor(energies, ref_xcf)

Fits the anisotropy tensor to the energies.

calculate_exchange_tensor(energies)

Calculates the exchange tensor from the energies.

fit_exchange_tensor(energies, ref_xcf)

Fits the exchange tensor to the energies.

calculate_isotropic_only(energies)

Calculates the isotropic exchange only.