graph2mat.core.data.basis
Utilities to describe a basis set for a point type.
Functions
|
For a given atom, returns the representation of its basis. |
|
Change of basis matrix for the given convention. |
Classes
|
Placeholder for atoms without orbitals. |
|
Stores the basis set for a point type. |
- class graph2mat.core.data.basis.NoBasisAtom(*args, **kwargs)[source]
Bases:
Atom
Placeholder for atoms without orbitals.
This should no longer be needed once sisl allows atoms with 0 orbitals.
Atoms with no basis are for example needed for the fitting of QM/MM simulations.
- property no
The number of orbitals belonging to this atom.
- property q0
The initial charge of the orbitals of this atom.
- class graph2mat.core.data.basis.PointBasis(type: str | int, R: float | ndarray, basis: str | Sequence[int | Tuple[int, int, int]] = (), basis_convention: Literal['cartesian', 'spherical', 'siesta_spherical'] = 'spherical')[source]
Bases:
object
Stores the basis set for a point type.
- Parameters:
type (Union[str, int]) – The type ID, e.g. some meaningful name or a number.
basis_convention (BasisConvention) – The spherical harmonics convention used for the basis.
basis (str | Sequence[int | Tuple[int, int, int]]) –
Specification of the basis set that the point type has. It can be a list of specifications, then each item in the list can be the number of sets of functions for a given l (determined by the position of the item in the list), or a tuple specifying (n_sets, l, parity).
It can also be a string representing the irreps of the basis in the
e3nn
format. E.g. “3x0e+2x1o” would mean 3 l=0 and 2 l=1 sets.R (Union[float, np.ndarray]) –
The reach of the basis. If a float, the same reach is used for all functions.
If an array, the reach is different for each SET of functions. E.g. for a basis with 3 l=0 functions and 2 sets of l=1 functions, you must provide an array of length 5.
The reach of the functions will determine if the point interacts with other points.
Examples
- __init__(type: str | int, R: float | ndarray, basis: str | Sequence[int | Tuple[int, int, int]] = (), basis_convention: Literal['cartesian', 'spherical', 'siesta_spherical'] = 'spherical') None
- property e3nn_irreps
Returns the irreps in the e3nn format.
- classmethod from_sisl_atom(atom: Atom, basis_convention: Literal['cartesian', 'spherical', 'siesta_spherical'] = 'siesta_spherical')[source]
Creates a point basis from a sisl atom.
- Parameters:
atom – The atom from which to create the basis.
basis_convention – The spherical harmonics convention used for the basis.
- property num_sets: int
Returns the number of sets of functions.
E.g. for a basis with 3 l=0 functions and 2 sets of l=1 functions, this returns 5.
- graph2mat.core.data.basis.get_atom_basis(atom: Atom)[source]
For a given atom, returns the representation of its basis.
- graph2mat.core.data.basis.get_change_of_basis(original: Literal['cartesian', 'spherical', 'siesta_spherical'], target: Literal['cartesian', 'spherical', 'siesta_spherical']) Tuple[ndarray, ndarray] [source]
Change of basis matrix for the given convention.
- Parameters:
convention – The convention for spherical harmonics.
- Returns:
change_of_basis_matrix
inverse_change_of_basis