Skip to content

1ph IP (and excph eventually) resonant raman scattering #104

Open
Petru-Milev wants to merge 8 commits into
yambo-code:masterfrom
Petru-Milev:raman
Open

1ph IP (and excph eventually) resonant raman scattering #104
Petru-Milev wants to merge 8 commits into
yambo-code:masterfrom
Petru-Milev:raman

Conversation

@Petru-Milev
Copy link
Copy Markdown

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)

Copilot AI review requested due to automatic review settings May 18, 2026 14:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_oneph to 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)


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants