Internal classes#
- class fireballpy.AtomSystem(*, species, numbers, positions, a1=None, a2=None, a3=None)[source]#
Class to contain all the information about the atomic system.
- Parameters:
- speciesset[str]
Set with the element names entering the computation.
- numbersArrayLike[int]
Array with the atomic numbers of each atom.
- positionsArrayLike[float]
A natoms x 3 array with the positions of each atom in angstroms.
- a1ArrayLike[float] | None, optional
First cell vector coordinates in angstroms.
- a2ArrayLike[float] | None, optional
Second cell vector coordinates in angstroms.
- a3ArrayLike[float] | None, optional
Third cell vector coordinates in angstroms.
- Attributes:
- nint
Number of atoms.
- speciesset[str]
Set with the element names entering the computation.
- numbersNDArray[np.int64]
Array with the atomic numbers of each atom.
- positionsNDArray[np.float64]
A natoms x 3 array with the positions of each atom in angstroms.
- pbcNDArray[bool]
Array telling whether there are periodic boundary conditions in the x, y or z directions.
- cellNDArray[np.float64]
Matrix where each row corresponds to each of the lattice vectors.
- icellNDArray[np.float64]
Matrix where each row corresponds to each of the reciprocal lattice vectors.
Methods
set_coords()
Set the coordinate info in the Fortran module.
set_cell()
Set the cell info in the Fortran module.
update_coords(positions)
Update the coordinate info in the Fortran module. This is faster than setting but requires them to be setted before.
- class fireballpy.FDataFiles(*, fdata, atomsystem=None, fdata_path=None)[source]#
Class to contain needed information about FData files in disk
- Parameters:
- fdatastr
Name of the FData to be used. See
available_fdatas()
for a table of available FData. If set to'custom'
then anfdata_path
pointing to a local FData folder must be provided. Please note that the first time an FData is used it needs to download all the necessary files.- atomsystemAtomSystem | None, optional
AtomSystem object with the information of the species which intervine in the computation. If
None
(default) then the whole FData will be loaded. This will add a significant overhead at the exchange of not having to load new species if they are added later.- fdata_pathstr | None, optional
Path to a custom FData. Ignored unless
fdata = 'custom'
.
- Attributes:
- namestr
Name of the provided FData.
- pathstr
Path to the FData.
Methods
load_fdata()
Set Fortran module variables and load the FData into memory.
get_charges_method()
Return the string with the corresponding optimal charge method. It will raise
RuntimeError
if the FData is not provided by us.get_correction()
Returns DFT-D3 correction to be used with Fireball. It will return
None
if either the FData is not provided by us or no optimal parameters are recorded.- get_charges_method()[source]#
Get the optimal charge method for autoconsistency.
- Returns:
- str
String with the optimal charge method.
- Raises:
- RuntimeError
If the FData is not provided by us.
- get_correction(charges_method)[source]#
Gives the options needed to apply DFT-D3 correction.
- Parameters:
- atomsystemAtomSystem
An AtomSystem class with the information of the atomic numbers, positions and the unit cell.
- Returns:
- dict
Dictionary with the parameters to create the correction. Empty if no correction is applicable.
- fireballpy.load_fdata(fdata, fdata_path=None)[source]#
Set Fortran module variables and load the whole FData into memory.
- class fireballpy.KPoints(*, kpts, atomsystem, gamma=None)[source]#
Class to hold the coordinates of the k-points and their weights.
- Parameters:
- kptsArrayLike[int] | ArrayLike[float] | float
Specify the k-points for a periodic computation. It can be either a set of three Monkhorst-Pack indices, a nkpts x 3 array with the coordinates of the k-points in reciprocal cell units, or a density of k-points in inverse angstroms.
- atomsystemAtomSystem
An AtomSystem class with the information of the atomic numbers, positions and the unit cell.
- gammabool | None, optional
Should the Gamma (
[0, 0, 0]
) point be forcefully included (True
), forcefully excluded (False
) or don’t care whether it is included or not (None
, default)
- Attributes:
- nint
Number of k-points.
- kptsNDArray[np.float64]
A nkpts x 3 array with the coordinates of the k-points in reciprocal cell units.
- coordsNDArray[np.float64]
A nkpts x 3 array with the coordinates of the k-points in inverse angstroms.
- weightsNDArray[np.float64]
Non-normalized weights associated to each k-point.
- maplist[int]
Map from each k-point to its representative (when symmetry reduction has been performed).
Methods
set_kpoints()
Set the k-points in the fortran module.