Plotting results from aiida-vibroscopy

Thanks a lot for the interest in the topic and the manuscript.

I guess it would be better to keep the topics separated, so that people can find easily the different questions.

As this is not strictly speaking an AiiDA related question, you can also contact me personally via the reported email address on the paper if you want more details. Just for your information, computational details are reported in the METHOD section of the manuscript, now published on npj Comp. Mat. just some days ago: Automated all-functionals infrared and Raman spectra | npj Computational Materials.

The short answer to your question: we did not relaxed the cell geometry, but only the atomic positions. The reason is explained in the paper.

Hi Lorenzo,

Following up on this,
In one of the case I ran into this error:

  File "/lustre/scratch5/.mdt0/rkarkee/plot_results.py", line 41, in <module>
    ytot=multilorentz(x, frequencies_pbesol, unpolarized_intensities, gammas=6.0)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/users/rkarkee/conda/envs/aiidaENV/lib/python3.11/site-packages/aiida_vibroscopy/utils/broadenings.py", line 55, in multilorentz
    raise ValueError("length of `intensities` and `peaks` doesn't match")
ValueError: length of `intensities` and `peaks` doesn't match

This is what I am doing:

from aiida_vibroscopy.utils.broadenings import multilorentz
import matplotlib.pyplot as plt1

load_profile()

vibro = load_node(3933).outputs.vibrational_data.numerical_accuracy_2
polarized_intensities, unpolarized_intensities, frequencies_pbesol, labels = vibro.run_powder_raman_intensities(frequency_laser=532, temperature=300)

#polarized_intensities1, unpolarized_intensities1, frequencies_pbesol1, labels1 = vibro.run_powder_raman_intensities(frequency_laser=244, temperature=300)

#total_intensities_pbesol =  polarized_intensities + unpolarized_intensities
plt = get_spectra_plot(frequencies_pbesol, unpolarized_intensities, broadening=6,normalize=True)
#plt = get_spectra_plot(frequencies_pbesol1, unpolarized_intensities1, broadening=6,normalize=True)

### For polarized Raman
#vibro=load_node(2418).outputs.vibrational_data.numerical_accuracy_2
incoming = [1,0,0] # light polatization of the incident laser beam
outgoing = [0,1,0] # light polatization of the emitted laser beam

intensities_p, frequencies_p, labels = vibro.run_single_crystal_raman_intensities(
    pol_incoming=incoming,
    pol_outgoing=outgoing,
    frequency_laser=532,
    temperature=300,
    )
#plt = get_spectra_plot(frequencies_p, intensities_p)

frequencies_pbesol, _, labels=vibro.run_active_modes(selection_rules='raman')
print(frequencies_pbesol)
print(labels)
#plt = get_spectra_plot(frequencies_p, intensities_p, broadening=6,normalize=True)



x = np.arange(0,300,0.25) # range [0,1200) with steps of size 1
y = multilorentz(x, frequencies_p, intensities_p, gammas=6.0) #
ytot=multilorentz(x, frequencies_pbesol, unpolarized_intensities, gammas=6.0)



#data=np.column_stack((x, y))
#np.savetxt('./CrSBr/XY.txt', data,  header='frequency  polarized_intensity',comments='', delimiter='\t')


data1=np.column_stack((x,ytot))
np.savetxt('./PBE_raman_hfte5/unpolarized.txt', data1,  header='frequency  unpolarized_intensity',comments='', delimiter='\t')
plt.show()

Hi @bastonero

I know we can do polarized Raman but can we also treat incoming light as circularly polarized light?

I believe the incident polarization should be something like [1,i,0] for left handed circular polarization and [1,-i,0] for right. (I am be mistaken) But I am not sure that your code reads complex while doing that calculation as it stands now.

Hi,
Honestly I have never tried it, but you may try giving a complex value and see if it works out. Internally the code uses numpy.dot mainly, so it might work. If not, I can try to do a simple fix for that. Let me know if it works as it is now