xiaoqiugood的个人博客分享 http://blog.sciencenet.cn/u/xiaoqiugood

博文

Phonopy 热力学性质及ZPE的计算

已有 30530 次阅读 2013-9-22 13:38 |个人分类:热力学性质|系统分类:科研笔记| 热力学

关注:

  1) 热力学性质计算的原理;

  2) 简谐计算与准简谐计算的差别;即Phonopy 与Phonopy-qha得到的热力学性质的差别在哪

  3) Phonnopy 计算热力学性质的具体步骤。   把关键参数写入mesh.conf 文件,执行phonopy -t mesh.conf即可

  4)  Phonopy 扩胞时,没找到正确的对称性应如何处理,如不处理对计算结果有什么影响?


phonopy -d --dim="3 3 1" --tolerance=0.001

check了一下,发现 Phonopy 扩胞时,没找到正确的对称性得到的SPOSCAR与找到正确对称性时扩胞后的SPOSCAR完全一样,请问,是否可据此为没找到正确对称性对计算结果应该没有什么影响?



题记:A friend in need is a friend indeed.  Thanks must be given to Prasad and Huayung

    Prasad, my real friend, he is so glad to share his knowledge and experience with others. He should become a good teacher. However, not everyone like him, one guy in my group is so caring her knowledge and experience in case that will be learned by others. Which kind of person will we like? Which kind of person should we be? It is underthinking.  And I have my answer as you guys see this blog.

    So, though Prasad left here and was far away from us.   I still looked for help from him and  got this hints how to calculate thermodynamic propeties.


Phonnopy 计算热力学性质的具体步骤:



   About phonopy: In order to get ZPE we have to run thermal properties. The command to run thermal properties in phonopy is:

phonopy -t mesh.conf

this command exactly similar to the command to obtain the phonon DOS [ phonopy -p mesh.conf], the only difference is the -t option.

All the four files ( that we use  to obtain the phonon DOS ) are necessary to obtain thermal properties.

1. mesh.conf,

2. vasprun.xml,

3. POSCAR,

4. FORCE_CONSTANT


once we run the command: phonopy -t mesh.conf

it generates a file called thermal_properties.yaml, this is a simple txt file.

Please open this file, almost at the top of the file you see zero_point_energy:
the units are kJ/mol/unit cell [ the unit cell is POSCAR, not the SUPERCELL called SPOSCAR]

When we ran the command: phonopy -t mesh.conf

along with thermal_properties.yaml the program also writes the text file on the screen. This text is same as the text written in thermal_properties.yaml. So don't worry about this. Use the thermal_properties.yaml file to obtain the ZPE.

   The ZPE values are in kJ/mol/unit cell. Prof. Neil may ask to convert into eV. So please convert to eV.


This mesh.conf from Huayun


ATOM_NAME = H Sc


DIM = 3 3 1


FORCE_CONSTANTS = READ


MP = 8 8 8


GAMMA_CENTER = .TRUE.


TPROP = .TRUE.





英文手册解读:




Thermal displacements

Experimental

TDISP, TMAX, TMIN, TSTEP

Mean square displacements projected to Cartesian axes as a function of temperature are calculated from the number of phonon excitations. The usages of TMAX, TMIN, TSTEP tags are same as those in thermal properties tags. The result is writen into thermal_displacements.yaml. See the detail of the method,Thermal displacement.

PROJECTION_DIRECTION

Eigenvectors are projected along the direction specified by this tag. Projection direction is specified in reduced coordinates, i.e., with respect to a, b, c axes.

TDISP = .TRUE.PROJECTION_DIRECTION = 1 1 0

Thermodynamic properties

Phonon number

n = .frac{1}{.exp(.hbar.omega(.mathbf{q}.nu)/k_.mathrm{B} T)-1}

Harmonic phonon energy

E = .sum_{.mathbf{q}.nu}.hbar.omega(.mathbf{q}.nu).left[.frac{1}{2} +
 .frac{1}{.exp(.hbar.omega(.mathbf{q}.nu)/k_.mathrm{B} T)-1}.right]

Constant volume heat capacity

C_V &= .left(.frac{.partial E}{.partial T} .right)_V ..
    &= .sum_{.mathbf{q}.nu} k_.mathrm{B}
 .left(.frac{.hbar.omega(.mathbf{q}.nu)}{k_.mathrm{B} T} .right)^2
 .frac{.exp(.hbar.omega(.mathbf{q}.nu)/k_.mathrm{B}
 T)}{[.exp(.hbar.omega(.mathbf{q}.nu)/k_.mathrm{B} T)-1]^2}

Partition function

Z = .exp(-.varphi/k_.mathrm{B} T) .prod_{.mathbf{q}.nu}
 .frac{.exp(-.hbar.omega(.mathbf{q}.nu)/2k_.mathrm{B}
 T)}{1-.exp(-.hbar.omega(.mathbf{q}.nu)/k_.mathrm{B} T)}

Helmholtz free energy

F &= -k_.mathrm{B} T .ln Z ..
  &= .varphi + .frac{1}{2} .sum_{.mathbf{q}.nu}
.hbar.omega(.mathbf{q}.nu) + k_.mathrm{B} T .sum_{.mathbf{q}.nu} .ln
.bigl[1 -.exp(-.hbar.omega(.mathbf{q}.nu)/k_.mathrm{B} T) .bigr]

Entropy

S &= -.frac{.partial F}{.partial T} ..
  &= .frac{1}{2T}.sum_{.mathbf{q}.nu}.hbar.omega(.mathbf{q}.nu).coth(.hbar.omega(.mathbf{q}.nu)/2k_.mathrm{B}T)-k_.mathrm{B} .sum_{.mathbf{q}.nu}.ln.left[2.sinh(.hbar.omega(.mathbf{q}.nu)/2k_.mathrm{B}T).right]

sflogo



资料搜索:



1. phonopy-qha.使用说明


This example is to explain how to use phonopy-qha.


    Following the instruction, thermal properties at constant pressure (P=0) for silicon may be calculated.

    The shell script can be used only for the crystal structure whose atoms are pinned at the reduced positions by the crystal symmetry.

    For general crystals, the unit cells have to be relaxed before starting phonon calculations.

     Create VASP input files. POTCAR is not included in this example.

% phonopy-qha --cu POSCAR
% ./script-qha.sh -m
Submit VASP jobs to GridEngine queueing system. 'calc.sh' should be modified.
% ./script-qha.sh -r
Correct VASP results.
% ./script-qha.sh -c
Calculate thermal properties at constant pressure.

% phonopy-qha e-v.dat QHA-*/thermal_properties.yaml -p --sparse=50


calc.sh内容


#$ -S /bin/zsh
#$ -cwd
#$ -N Sivol-num
#$ -pe mpi* 4
#$ -e err.log
#$ -o std.log
cp $TMPDIR/machines machines
mpirun  vasp5212mpi >& ../progress-num

scripqha.sh内容(不用修改)

#!/bin/bash
dim="2 2 2"
pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0"
mp="41 41 41"
nunit=32
while getopts':mrc' opt; do
 case$opt in
   m)
for i in `/bin/ls QHAPOSCAR*`;do
qhaname=`echo$i|sed s/POSCAR//`
mkdir $qhaname
mv $i$qhaname/POSCAR
cd$qhaname
pwd
phonopy -d --dim="$dim"
for j in `/bin/ls POSCAR-*`;do
dispname=`echo$j|sed s/POSCAR/disp/`
 mkdir $dispname
 mv $j$dispname/POSCAR
 cp ../{INCAR,KPOINTS,POTCAR}$dispname
done
mkdir perfect
cp ../{INCAR,KPOINTS,POTCAR} perfect
cp SPOSCAR perfect/POSCAR
cd ..
done
     ;;
   r)
for i in `/bin/ls -d QHA-*`;do
cd$i
pwd
vol=`echo$i|sed s/QHA-//`
# For displacements
for j in `/bin/ls -d disp-*`;do
cd$j
pwd
num=`echo$j|sed s/disp-//`
   sed s/num/$num/ ../../calc.sh|sed s/vol/$vol/|qsub
cd ..
done
# For perfect
cd perfect
 sed s/num/per/ ../../calc.sh|sed s/vol/$vol/|qsub
cd ..
cd ..
done
     ;;
   c)
echo"#   cell volume        energy of cell other than phonon" > e-v.dat
for i in `/bin/ls -d QHA-*`;do
cd$i
 phonopy -f disp-*/vasprun.xml
 phonopy --mp="$mp" -t --dim="$dim" --pa="$pa" --tmax=2004 --tstep=2
volume=`grep volume perfect/vasprun.xml|tail -n 1|awk -F'<|>''{printf("%20.13f", $3)}'`
energy=`grep e_wo_entrp perfect/vasprun.xml|tail -n 1|awk -F'<|>''{printf("%20.13f", $3)}'`
cd ..
echo`echo"$volume/$nunit"|bc -ls``echo"$energy/$nunit"|bc -ls` >> e-v.dat
done
     ;;
esac
done



phonopy-qha e-v.dat thermal_properties.yaml-{-{5..1},{0..5}} --sparse=50

# Vinet EOS

# T E_0 B_0 B’_0 V_0

0.000000 -14.796263 75.231724 4.758283 66.697923

2.000000 -14.796263 75.231723 4.758283 66.697923

4.000000 -14.796263 75.231718 4.758284 66.697923

6.000000 -14.796263 75.231695 4.758286 66.697924

8.000000 -14.796263 75.231634 4.758294 66.697928

10.000000 -14.796264 75.231510 4.758308 66.697934



9.8.1 -t, --tmax, --tmin, --tstep

These correspond to TPROP, TMAX, TMIN, and TSTEP tags, respectively (Thermal properties related tags).



LLL:

thermal_properties.yaml;一般都在force文件夹里。

A::::
   好的,我找找看....


LLL:::

原子数目;单位是KJ/mol

乘以0.010364 ;是电子伏特


natom:     8

zero_point_energy:     217.3900395

high_T_entropy:        374.5454014




Using phonopy results of thermal properties, thermal expansion and heat capacity at constant pressure can be calculated under the quasi-harmonic approximation.

   phonopy-qha is the script to calculate them. An example of the usage is as follows:

  phonopy-qha e-v.dat thermal_properties-{1..10}.yaml

  1st argument is the filename of volume-energy data (in the above expample, e-v.dat).

   The volume and energy of the cell (default units are in 3 and eV, respectively). An example of the volume-energy file is:

# cell volume energy of cell other than phonon

156.7387309525 -104.5290025375

154.4138492700 -104.6868148175

.....

Lines starting with # are ignored.

  The other arguments are the filenames of thermal_properties.yaml calculated

at the respective volumes given in the 1st argument.

   The thermal_properties.yaml at volume points have to be calculated with the same temperature ranges and same temperature steps.

  thermal_properties.yaml can be calculated by following Thermal properties related tags, where the physical unit of the Helmholtz free energy is kJ/mol as the default, i.e., no need to convert the physical unit in usual cases.

 The example for Aluminum is found in the example directory.

If the condition under puressure is expected, PV terms may be included in the energies.






https://blog.sciencenet.cn/blog-567091-726895.html

上一篇:PWSCF计算小技巧
下一篇:PWSCF计算声子谱-gamma点的测试很重要
收藏 IP: 128.84.125.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (6 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-9-27 07:53

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部