PAOFLOW.hamiltonian.do_doubling#
Functions#
|
Double the simulation cell along one or more lattice directions. |
|
Update all scalar and array metadata after a cell-doubling step. |
Module Contents#
- PAOFLOW.hamiltonian.do_doubling.doubling_HRs(data_controller)[source]#
Double the simulation cell along one or more lattice directions.
- Parameters:
data_controller (DataController) – Object providing
data_arraysanddata_attributes. Required arrays:HRs(shape(nawf, nawf, nk1, nk2, nk3, nspin)),tau(shape(natoms, 3)),a_vectors(shape(3, 3)). Required attributes:nx,ny,nz(number of doublings along each axis),nk1,nk2,nk3,nspin,nawf,alat.- Returns:
Modifies
data_controller.data_arraysanddata_controller.data_attributesin place. After each doubling step along a given axis,doubling_attr_arry()is called to update all derived quantities. Final modified entries include:HRs: np.ndarray, shape(nawf*2^(nx+ny+nz), nawf*2^(nx+ny+nz), nk1, nk2, nk3, nspin)— the real-space Hamiltonian of the enlarged cell.tau: np.ndarray — atomic positions extended with the new replica.a_vectors: np.ndarray — lattice vectors scaled by the doubling factor along each axis.
- Return type:
None
Notes
The doubling is performed axis by axis (x, then y, then z), repeating
nx,ny, andnztimes respectively. At each step the real-space Hamiltonian is assembled in a block-matrix form:\[\begin{split}H^{\rm doubled}(\mathbf{R}) = \begin{pmatrix} H(2\mathbf{R}) & H(2\mathbf{R}+\mathbf{a}_i) \\ H(2\mathbf{R}-\mathbf{a}_i) & H(2\mathbf{R}) \end{pmatrix}\end{split}\]where \(\mathbf{a}_i\) is the lattice vector being doubled.
- PAOFLOW.hamiltonian.do_doubling.doubling_attr_arry(data_controller)[source]#
Update all scalar and array metadata after a cell-doubling step.
- Parameters:
data_controller (DataController) – Object providing
data_arraysanddata_attributes. Attributes updated:omega,nawf,natoms(if present),nelec(if present),nbnds(if present),bnd(if present). Arrays updated:naw,sh,nl,atoms(if present),Sj(if present),Dnm(if present).- Returns:
All modifications are made in place.
- Return type:
None
Notes
Called automatically by
doubling_HRs()after each doubling step. The cell volumeomegais recomputed from the updateda_vectorsandalat. The spin operatorSjand the interatomic distance matrixDnmare extended block-diagonally if already present.