aiida_quantumespresso.utils.hubbard
#
Utility class for handling the aiida_quantumespresso.data.hubbard_structure.HubbardStructureData
.
Module Contents#
Classes#
Utility class for handling HubbardStructureData for QuantumESPRESSO. |
Functions#
|
Return the atomic index in 3x3x3 supercell. |
|
Return the atomic index in unitcell and the associated translation from a 3x3x3 QuantumESPRESSO supercell index. |
|
Return the set list of Hubbard indices. |
|
Return whether Hubbard contains intersite interactions (+V). |
- class aiida_quantumespresso.utils.hubbard.HubbardUtils(hubbard_structure: aiida_quantumespresso.data.hubbard_structure.HubbardStructureData)[source]#
Utility class for handling HubbardStructureData for QuantumESPRESSO.
- property hubbard_structure: aiida_quantumespresso.data.hubbard_structure.HubbardStructureData[source]#
Return the HubbardStructureData.
- parse_hubbard_dat(filepath: str | os.PathLike)[source]#
Parse the HUBBARD.dat of QuantumESPRESSO file associated to the current structure.
This function is needed for parsing the HUBBARD.dat file generated in a hp.x calculation.
Note
overrides current Hubbard information.
- Parameters:
filepath – the filepath of the HUBBARD.dat to parse
- reorder_atoms()[source]#
Reorder the atoms with with the kinds in the right order necessary for an
hp.x
calculation.An
HpCalculation
which restarts from a completedPwCalculation
, requires that the all Hubbard atoms appear first in the atomic positions card of thePwCalculation
input file. This order is based on the order of the kinds in the structure. So a suitable structure has all Hubbard kinds in the begining of kinds list.Note
overrides current
HubbardStructureData
- is_to_reorder() bool [source]#
Return whether the atoms should be reordered for an
hp.x
calculation.
- get_hubbard_for_supercell(supercell: aiida.orm.StructureData, thr: float = 0.001) aiida_quantumespresso.data.hubbard_structure.HubbardStructureData [source]#
Return the
HubbbardStructureData
for a supercell.Note
the two structure need to be commensurate (no rigid rotations)
Warning
always check that the energy calculation of a pristine supercell structure obtained through this method is the same as the unitcell (within numerical noise)
- Returns:
a new
HubbbardStructureData
with all the mapped Hubbard parameters
- aiida_quantumespresso.utils.hubbard.get_supercell_atomic_index(index: int, num_sites: int, translation: List[Tuple[int, int, int]]) int [source]#
Return the atomic index in 3x3x3 supercell.
- Parameters:
index – atomic index in unit cell
num_sites – number of sites in structure
translation – (3,) shape list of int referring to the translated atom in the 3x3x3 supercell
- Returns:
atomic index in supercell standardized with the QuantumESPRESSO loop
- aiida_quantumespresso.utils.hubbard.get_index_and_translation(index: int, num_sites: int) Tuple[int, List[Tuple[int, int, int]]] [source]#
Return the atomic index in unitcell and the associated translation from a 3x3x3 QuantumESPRESSO supercell index.
- Parameters:
index – atomic index
num_sites – number of sites in structure
- Returns:
tuple (index, (3,) shape list of ints)
- aiida_quantumespresso.utils.hubbard.get_hubbard_indices(hubbard: aiida_quantumespresso.common.hubbard.Hubbard) List[int] [source]#
Return the set list of Hubbard indices.
- aiida_quantumespresso.utils.hubbard.is_intersite_hubbard(hubbard: aiida_quantumespresso.common.hubbard.Hubbard) bool [source]#
Return whether Hubbard contains intersite interactions (+V).