5.23. utilsΒΆ

Linear algebra calculation utilities.

Classes

BaseObject

Base eminus class that implements some shared functionalities.

Functions

Ylm_real

Calculate real spherical harmonics from cartesian coordinates.

add_maybe_none

Add a and b together, when one or both can potentially be None.

atom2charge

Get the valence charges for a list of chemical symbols from GTH files.

dotprod

Efficiently calculate the expression a * b.

get_lattice

Generate a cell for given lattice vectors.

handle_k

Handle k-points calculating the function for each channel with different modes.

handle_spin

Handle spin calculating the function for each channel separately.

handle_torch

Use a function optimized with Torch if available.

molecule2list

Expand a chemical formula to a list of chemical symbols.

pseudo_uniform

Lehmer random number generator, following MINSTD.

vector_angle

Calculate the angle between two vectors.