Dear Dr. Lorenzo
The file size is big (134MB) and it is failing to download because of my
poor internet connection. I need to find a good network.

If you do not mind, I would like to ask you to have a look at my small
shell script that can calculate the vibrational entropy using dynmat.out
file.

NOTE: It requires only a dynmat.out file and degree of freedom for the
molecule.

I used the Eqn of "S" provided HERE
<https://github.com/DavidCdeB/QHA/blob/master/Images_for_README_md/entropy.png>
to write this script.

#!/bin/bash
#========Constants=================
DOF=5 #Trans. + Rot. DOF for the molecule, Here I use 5 (3+2) for H2, for
3D Molec. I would take it 6
THz2Hz='1e+12' #Freq in s^(-1)
KJPerMol=96 #KJ/mol
KCalPerMol=23 #Kcal/mol
Kb='8.6173303E-5' #boltzmann's constant in eV/K
T=450 #Temperature in K
Pconst='4.135667696e-15' #planck's constant in eV.S
K_to_eV='0.00008617328149741'
#=== How many Frequencies
Total_freq=$(grep freq dynmat.out | cut -f 2 -d = | cut -f 1 -d [ | wc -l)
#==== How many vibrational Frequencies
Vibrational_Freq=$(echo "$Total_freq" "$DOF" | awk '{print $1-$2}')

#==== Summing all vib. Freq., converting into Hz  and storing as a variable
FreqHz=$(grep freq dynmat.out | cut -f 2 -d = | cut -f 1 -d [ | tail -n
$Vibrational_Freq | awk '{print $1}' | awk -F',' '{sum+=$1;}END{print
sum;}' | awk '{print $1*(1e+12)}')

#===Calculation of vibrational entropy using formula of entropy from [1] in
eV/K  and storing as a variable
Freq_in_eV_per_K=$(echo "$Kb" "$T" "$Pconst" "$FreqHz" | awk '{print
-$1*(log(1-exp(-(($3*$4)/($1*$2))))) + ($3/$2)*($4/(exp(($3*$4)/($1*$2))-1)
)}')

#=== Converting eV/K to eV and storing as a variable
eV_per_K_to_eV=$(echo "$Freq_in_eV_per_K" "$K_to_eV" | awk '{print $1*$2}')
#converting eV to KCal/mol
echo "$eV_per_K_to_eV" "$KCalPerMol" | awk '{print $1*$2}'

#converting eV to KJ/mol
echo "$eV_per_K_to_eV" "$KJPerMol" | awk '{print $1*$2}'
#END
I look forward to hearing from you or anyone from the  QE  list whether it
is correct or not.
Regards
Bhamu

On Wed, Mar 24, 2021 at 2:46 PM Lorenzo Paulatto <paul...@gmail.com> wrote:

>
> Let me try D3Q code.
>
>
> If you can compile your own version of QE, you may want to use a recent
> snapshot of espresso+d3q, as I have added a few features recently.
> https://mycore.core-cloud.net/index.php/s/1RxbPmcxvHunFVF
> <https://link.getmailspring.com/link/d84d3ddc-75e3-404b-a829-e30c74fb1...@getmailspring.com/0?redirect=https%3A%2F%2Fmycore.core-cloud.net%2Findex.php%2Fs%2F1RxbPmcxvHunFVF&recipient=dXNlcnNAbGlzdHMucXVhbnR1bS1lc3ByZXNzby5vcmc%3D>
> cheer
>
> --
> Lorenzo Paulatto - Paris
>
_______________________________________________
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

Reply via email to