PAOFLOW.elphon.dvscf_fd#
Finite-difference dV = dH/du in the supercell PAO basis (P1).
For every reference-cell displacement the PAO real-space Hamiltonian HRs of
the +delta and -delta supercells is rebuilt (from the displaced DFT
.save via the standard projection / pao_hamiltonian pipeline) and
central-differenced,
dV_{kappa,alpha}(R) = (HRs[+delta] - HRs[-delta]) / (2 delta),
giving the derivative of the Hamiltonian with respect to displacing atom
kappa along Cartesian direction alpha, in the supercell PAO basis. The
fold to the primitive cell and the assembly of g_mn^v(k, q) follow in P2.
Functions#
|
Central finite difference of the supercell PAO Hamiltonian. |
|
Rebuild the PAO real-space Hamiltonian |
|
Crystal-symmetry operators of a (reference) supercell |
|
Build the good-projectability subspace projectors |
|
Project a real-space supercell |
|
Rebuild |
Module Contents#
- PAOFLOW.elphon.dvscf_fd.finite_difference_dV(hrs_plus, hrs_minus, distance)[source]#
Central finite difference of the supercell PAO Hamiltonian.
- Parameters:
hrs_plus (ndarray) –
HRsof the+delta/-deltasupercells, identical shape(nawf, nawf, nk1, nk2, nk3, nspin)(eV).hrs_minus (ndarray) –
HRsof the+delta/-deltasupercells, identical shape(nawf, nawf, nk1, nk2, nk3, nspin)(eV).distance (float) – Displacement amplitude
deltain Bohr.
- Returns:
dV = (HRs[+] - HRs[-]) / (2 delta)(eV/Bohr), same shape.- Return type:
ndarray
- PAOFLOW.elphon.dvscf_fd.build_supercell_HRs(savedir, workpath='.', configuration='standard', basispath=None, pthr=0.95, shift_type=1, return_shift=False, return_symmetry_inputs=False)[source]#
Rebuild the PAO real-space Hamiltonian
HRsfor one supercell.save.Runs the standard PAOFLOW pipeline (projections -> projectability ->
pao_hamiltonian) on the displaced supercell and returns itsHRsarray(nawf, nawf, nk1, nk2, nk3, nspin). Ifreturn_shiftisTruealso returns the completion energyeta(attr['shift']), needed to build the good-projectability subspace projector. Ifreturn_symmetry_inputsisTruealso returns the arrays needed to build the crystal-symmetry operators (so a single reference-supercell build can serve thedVfinite difference and the symmetry expansion).Extra return values follow
HRsin the ordershift,symmetry_inputs.
- PAOFLOW.elphon.dvscf_fd.supercell_symmetry_operators(savedir, workpath='.', configuration='standard', basispath=None, pthr=0.95, shift_type=1)[source]#
Crystal-symmetry operators of a (reference) supercell
.save.Runs the PAO pipeline on the undisplaced supercell to obtain its space-group operations, atomic positions and orbital layout, and packages them (via
PAOFLOW.elphon.symmetry.build_dv_symmetry_operators()) into the operator set used to symmetry-rotate the supercelldVtensor.- Returns:
The operator set from
build_dv_symmetry_operators().- Return type:
- PAOFLOW.elphon.dvscf_fd.good_subspace_projectors(HRs_ref, eta, tol=0.05)[source]#
Build the good-projectability subspace projectors
P_good(K).The PAO Hamiltonian completes the unrepresented subspace with
+eta(1 - P), so the complement eigenstates ofH^PAO(K)sit exactly atetawhile the physical (projectable) bands lie strictly below it. Diagonalising the referenceH^PAO(K)(fromHRs_ref) and keeping the eigenvectors with eigenvalue< eta - toltherefore isolates the good subspace, andP_good = sum_good |v><v|.- Parameters:
- Returns:
The projector
P_good(K)on the supercell k-grid (folded-fftfreq).- Return type:
ndarray,
(nawf, nawf, n1, n2, n3, nspin)complex
- PAOFLOW.elphon.dvscf_fd.project_dV_good(dV_R, Pg)[source]#
Project a real-space supercell
dVonto the good subspaceP_good.Transforms
dV(R) -> dV(K), appliesP_good(K) dV(K) P_good(K)at every supercell k-point, and transforms back. This removes the coupling to (and through) theeta-completion complement – the unphysical off-diagonal channel – while preserving the physical good-good deformation potential.
- PAOFLOW.elphon.dvscf_fd.compute_dV(data_controller, elphon_dir='elphon', configuration=None, basispath=None, pthr=0.95, shift_type=1, verify_saves=True, project_good_subspace=True)[source]#
Rebuild
HRsper displaced supercell and finite-difference todV.Reads the
displacements.jsonmanifest written by the generate phase. For each symmetry-reduced displacement it computes the directional derivative of the PAO Hamiltonian per unit displacement along the (Cartesian) displacement direction: a central difference when the explicit-partner is present, otherwise a forward difference against the reference supercell.The reduced directional derivatives are the response dataset; the full
dH/du_{kappa,alpha}tensor for every atom and Cartesian direction is reconstructed from them by crystal symmetry in the next stage (analogous to phonopy’s force-constant symmetrization).- Returns:
{'distance', 'reference_prefix', 'directional': [ {sc_atom, displacement, dV}, ... ]}wheredVis the supercell-basis derivative (eV/Bohr). Also stored asarry['elphon_dV'].- Return type: