Re: [QE-users] IR calculation for oriented single crystal

2022-03-18 Thread John Kendrick

Hi Zac,

You might look at a Python package called PDielec on GitHub ( 
https://github.com/JohnKendrick/PDielec ).  It has the capability of 
calculating the IR spectrum (reflectance, absorption and transmission) 
for single crystals either as thick slabs or thin films.  For powders it 
uses an effective medium theory approach to calculating the frequency 
dependent permittivity, from which the spectrum can be determined.  It 
can also be used to view the phonon mode molecular and atomistic motion 
and provides some basic break-down of the energy in each mode in terms 
of internal and external modes.


It has an interface to several packages, including Quantum Espresso, 
VASP, CRYSTAL, AbInit and CASTEP.


John


Subject:
[QE-users] IR calculation for oriented single crystal
From:
Zack Gainsforth 
Date:
18/03/2022, 05:23

To:
Quantum ESPRESSO users Forum 


Hi All,

I have set up a calculation using pw.x -> ph.x -> dynmat.x successfully and 
plotted myself an IR spectrum.  The match to the experimental spectrum is good.  
However, this is an IR spectrum assuming a powder where the photons are exciting all 
the modes.  I’d now like to calculate the spectrum for a single crystal and specify 
the electric vector of the photon relative to the crystal.  It should preferentially 
excite certain modes.

Is there a straightforward way to do this using ph.x + dynmat.x?  Or perhaps a 
way to read/print the dipole vectors for each mode so I can dot it with my 
photon’s e-field?  Or another way of thinking about this which is more 
efficient?  (Maybe I missed something in the documentation!)

Thanks,

Zack

___
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
___
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing list users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users

Re: [QE-users] IR calculation for oriented single crystal

2022-03-18 Thread Lorenzo Paulatto
Hello Zack,
the code that computes the IR cross sections is in subroutine RamanIR at line 
150 of file LR_Modules/dynmatsub.f90. If you ignore the Raman parts, it is 
literally 10 lines:

do nu = 1,3*nat
do ipol=1,3
polar(ipol)=0.0d0
end do
do na=1,nat
do ipol=1,3
do jpol=1,3
polar(ipol) = polar(ipol) + &
zstar(ipol,jpol,na)*z((na-1)*3+jpol,nu)
end do
end do
end do

infrared(nu) = 2.d0*(polar(1)**2+polar(2)**2+polar(3)**2)*irfac
... some raman stuff ...
endo do

It should be straightforward to adapt it to whatever you need. Keeping in mind 
that "zstar" is the effective charge matrix of atom "na" and z(3nat, 3nat) is 
the matrix of phonon polarizations.
Otherwise, you can have z printed by dynmat by setting the variable
fileig = 'file_name.txt'
and then do the calculation in some other way.

hth
Dr. Lorenzo Paulatto
IdR @ IMPMC - CNRS UMR 7590 & Sorbonne Université
phone: +33 (0)1 442 79822 / skype: paulatz
http://www.impmc.upmc.fr/~paulatto/ - https://anharmonic.github.io/
23-24/423 B115, 4 place Jussieu 75252 Paris CX 05
On Mar 18 2022, at 6:23 am, Zack Gainsforth  wrote:
> Hi All,
>
> I have set up a calculation using pw.x -> ph.x -> dynmat.x successfully and 
> plotted myself an IR spectrum. The match to the experimental spectrum is 
> good. However, this is an IR spectrum assuming a powder where the photons are 
> exciting all the modes. I’d now like to calculate the spectrum for a single 
> crystal and specify the electric vector of the photon relative to the 
> crystal. It should preferentially excite certain modes.
> Is there a straightforward way to do this using ph.x + dynmat.x? Or perhaps a 
> way to read/print the dipole vectors for each mode so I can dot it with my 
> photon’s e-field? Or another way of thinking about this which is more 
> efficient? (Maybe I missed something in the documentation!)
> Thanks,
> Zack
> ___
> The Quantum ESPRESSO community stands by the Ukrainian
> people and expresses its concerns about the devastating
> effects that the Russian military offensive has on their
> country and on the free and peaceful scientific, cultural,
> and economic cooperation amongst peoples
> ___
> Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
> users mailing list users@lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/users
>

___
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
___
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing list users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users

[QE-users] IR calculation for oriented single crystal

2022-03-17 Thread Zack Gainsforth
Hi All,

I have set up a calculation using pw.x -> ph.x -> dynmat.x successfully and 
plotted myself an IR spectrum.  The match to the experimental spectrum is good. 
 However, this is an IR spectrum assuming a powder where the photons are 
exciting all the modes.  I’d now like to calculate the spectrum for a single 
crystal and specify the electric vector of the photon relative to the crystal.  
It should preferentially excite certain modes.

Is there a straightforward way to do this using ph.x + dynmat.x?  Or perhaps a 
way to read/print the dipole vectors for each mode so I can dot it with my 
photon’s e-field?  Or another way of thinking about this which is more 
efficient?  (Maybe I missed something in the documentation!)

Thanks,

Zack

___
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
___
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing list users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users