1ph IP (and excph eventually) resonant raman scattering #104
Open
Petru-Milev wants to merge 8 commits into
Open
1ph IP (and excph eventually) resonant raman scattering #104Petru-Milev wants to merge 8 commits into
Petru-Milev wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an independent-particle (IP) level 1-phonon resonant Raman implementation to the exciton-phonon toolkit, plus a tutorial driver script demonstrating how to assemble/slice Yambo/LetzElPhC inputs and run the calculation.
Changes:
- Introduces
ip_resonant_raman_onephto compute the IP one-phonon resonant Raman tensor from pre-aligned energies, dipoles, and el-ph matrix elements. - Adds a tutorial script (
tutorial/exciton-phonon/ip_raman.py) that loads Yambo/LetzElPhC databases, aligns k-point ordering, slices a band window, runs the Raman calculation, and writes outputs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
yambopy/exciton_phonon/excph_resonant_raman.py |
New core routine to compute IP one-phonon resonant Raman tensors from caller-prepared arrays. |
tutorial/exciton-phonon/ip_raman.py |
New end-to-end example/driver showing how to prepare inputs from databases and run/save the Raman result. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+71
to
+74
| broad_Ha = (broad / ha2ev) / 2.0 | ||
| ph_thresh_Ha = ph_freq_threshold * cm1_to_Ha | ||
|
|
||
| # Vertical c-v gaps minus i*Gamma |
Comment on lines
+107
to
+110
| Ram[w_idx, m] = (np.einsum('akcv,bkcv->ab', dipS_res, tmp_res) | ||
| + np.einsum('akcv,bkcv->ab', dipS_ares, tmp_ares)) | ||
| Ram[w_idx, m] *= np.sqrt(abs(wL - wph) / wL) * ram_fac | ||
|
|
Comment on lines
+8
to
+10
|
|
||
|
|
||
| #@citation("PHYSICAL REVIEW B 113, 085201 (2026)") |
| dipole_path = folder + '/dipoles/ndb.dipoles' | ||
|
|
||
| omega_range = (1.0, 6.0, 501) # laser energies (eV): min, max, npts | ||
| broading = 0.10 # Lorentzian broadening (eV) |
Comment on lines
+58
to
+73
| n_val = int(electrons.nbandsv) - (b_in_F - 1) | ||
| nc = nb - n_val | ||
| cell_vol = float(lattice.lat_vol) | ||
|
|
||
|
|
||
| # ---- eph_g(q=0) sliced to the raman window -------------------------------- | ||
| elph_b_in_F = int(min(elph.bands)) | ||
| off = b_in_F - elph_b_in_F | ||
|
|
||
| iq0 = 0 | ||
| g_q0 = elph.gkkp[iq0, :, :, 0, :, :] # (nk, nmodes, nb_i, nb_f) | ||
| g_q0 = np.swapaxes(g_q0, -1, -2) | ||
| eph_g = np.transpose(g_q0, (1, 0, 2, 3)) / 2.0 # (nmodes, nk, nb_eph, nb_eph), Ha | ||
| eph_g = eph_g[:, :, off : off + nb, off : off + nb] # (nmodes, nk, nb, nb) | ||
|
|
||
| ph_eV = elph.ph_energies[iq0] # (nmodes,), eV |
Comment on lines
+50
to
+54
| diff = elph.kpoints[:, None, :] - lattice.red_kpoints[None, :, :] | ||
| diff = diff - np.round(diff) | ||
| perm = np.argmin(np.linalg.norm(diff, axis=-1), axis=1) | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Created 1ph IP resonant scattering calculation, and a corresponding input file available in the references.
Copy of compute_Raman_oneph_ip available in https://github.com/muralidhar-nalabothula/PhdScripts/blob/main/exph/raman.py
Testing was done against Murali s implementation on a Bulk MoS2 system, and some Si system available from yambo tutorials.
Reference: DOI: 10.1103/ty8m-mgml (Eq: D2)