aiida_atomistic.data.structure.hubbard_qe_utils#
Utility class for handling the aiida_quantumespresso.data.hubbard_structure.HubbardStructureData.
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). |
Module Contents#
- class aiida_atomistic.data.structure.hubbard_qe_utils.HubbardUtils(hubbard_structure: aiida_atomistic.data.structure.structure.StructureData | aiida_atomistic.data.structure.structure.StructureDataMutable)[source]#
Utility class for handling HubbardStructureData for QuantumESPRESSO.
- property hubbard_structure: aiida_atomistic.data.structure.structure.StructureData | aiida_atomistic.data.structure.structure.StructureDataMutable[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.xcalculation.An
HpCalculationwhich restarts from a completedPwCalculation, requires that the all Hubbard atoms appear first in the atomic positions card of thePwCalculationinput 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
- get_hubbard_for_supercell(supercell: aiida_atomistic.data.structure.structure.StructureDataMutable, thr: float = 0.001, mutable=True) aiida_atomistic.data.structure.structure.StructureData | aiida_atomistic.data.structure.structure.StructureDataMutable[source]#
Return the
HubbbardLegacyStructureDatafor 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
HubbbardLegacyStructureDatawith all the mapped Hubbard parameters
- aiida_atomistic.data.structure.hubbard_qe_utils.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_atomistic.data.structure.hubbard_qe_utils.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_atomistic.data.structure.hubbard_qe_utils.get_hubbard_indices(hubbard: aiida_quantumespresso.common.hubbard.Hubbard) List[int][source]#
Return the set list of Hubbard indices.
- aiida_atomistic.data.structure.hubbard_qe_utils.is_intersite_hubbard(hubbard: aiida_quantumespresso.common.hubbard.Hubbard) bool[source]#
Return whether Hubbard contains intersite interactions (+V).