Fireball computation outputs#
- class fireballpy.outputs.OrbitalVector(*, vector, orbitals)[source]#
Object to manipulate the Eigenvectors in a computation.
This object adds the ability to select atoms and their orbitals with 2 index expressions. When accessing elements of the matrix one may use a
[iatom, iorb]
syntax.iatom
: Refers to the index/indices of the atom.iorb
: Refers to the orbital index/indices of the atom.
Following
np.ndarray
indexing, it is also valid to use expressions as[iatom]
,[iatom, iorb]
, where the absence of an index is assumed as a full selection. Slicing is supported in both the orbitals and atoms (when orbitals are not specified).- Parameters:
- vectorNDArray
Matrix where each row/column represents an orbital.
- orbitalsNDArray[int]
Array with the number of orbitals each atom has.
- Attributes:
- vectorNDArray
Matrix where each row/column represents an orbital.
- orbitalsNDArray[int]
Array with the number of orbitals each atom has.
- class fireballpy.outputs.OrbitalMatrix(*, matrix, orbitals)[source]#
Object to manipulate the Hamiltonian and Overlap matrix in a computation.
This object adds the ability to select atoms and their orbitals with 4 index expressions. When accessing elements of the matrix one may use a
[iatom, jatom, iorb, jorb]
syntax.iatom
: Refers to the index/indices of the first atom (row).jatom
: Refers to the index/indices of the second atom (column).iorb
: Refers to the orbital index/indices of the first atom.jorb
: Refers to the orbital index/indices of the second atom.
Following
np.ndarray
indexing, it is also valid to use expressions as[iatom]
,[iatom, jatom]
,[iatom, jatom, iorb]
, where the absence of an index is assumed as a full selection. Slicing is supported in both the orbitals and atoms (when orbitals are not specified).- Parameters:
- matrixNDArray
Matrix where each row/column represents an orbital.
- orbitalsNDArray[int]
Array with the number of orbitals each atom has.
- Attributes:
- matrixNDArray
Matrix where each row/column represents an orbital.
- orbitalsNDArray[int]
Array with the number of orbitals each atom has.
- fireballpy.outputs.get_eigenvectors(*, kpt=0, atoms=None, fbobj=None)[source]#
Function to extract the eigenvectors from Fireball.
This function accepts any fireballpy-like object and returns a numpy array with the eigenvectors for each eigenvalue as
OrbitalVector
instances. If they are desired as a matrix, it is better to obtain them directly from the computation API.- Parameters:
- kptint
Index of the k-point to obtain the eigenvectors. By default takes the first (
kpt = 0
).- atomsase.Atoms | None
An
ase.Atoms
object with aFireball
attached as calculator. The SCF loop must be computed before. This parameter is not compatible withfbobj
.- fbobjBaseFireball | None
Directly a low-level
BaseFireball
object. In general this is reserved only for advanced users. The SCF loop must be computed before. This parameter is not compatible withatoms
.
- Returns:
- Eigenvectors
Numpy array with the eigenvectors as
OrbitalVector
.
- Raises:
- ValueError
If more than one fireballpy object is passed.
- RuntimeError
If the SCF loop was not computed.
- fireballpy.outputs.get_hamiltonian(*, atoms=None, fbobj=None)[source]#
Function to extract the hamiltonian and overlap matrices from Fireball.
This function accepts any fireballpy-like object and returns a named tuple with the hamiltonian and the overlap matrices as
OrbitalMatrix
instances.- Parameters:
- atomsase.Atoms | None
An
ase.Atoms
object with aFireball
attached as calculator. The SCF loop must be computed before. This parameter is not compatible withfbobj
.- fbobjBaseFireball | None
Directly a low-level
BaseFireball
object. In general this is reserved only for advanced users. The SCF loop must be computed before. This parameter is not compatible withatoms
.
- Returns:
- Hamiltonian
Named tuple with the hamiltonian (
.hamiltonian
) and overlap (.overlap
) matrices.
- Raises:
- ValueError
If more than one fireballpy object is passed.
- RuntimeError
If the SCF loop was not computed.