1. Phonopy-Spectroscopy : It is a project to add the capability to simulate vibrational spectra to the Phonopy code. Features: Calculate infrared (IR) intensities from Phonopy or VASP calculations; Calculate Raman-activity tensors and scalar-averaged intensities within the far-from-resonance approximation; Prepare peak tables including assigning modes to irreducible representations (Phonopy interface); Output customisable simulated spectra with support for multiple unit systems and simulated instrumental broadening; Include first-principles mode linewidths from Phono3py calculations (Phonopy interface). https://github.com/JMSkelton/Phonopy-Spectroscopy When using this code, please cite the following article: Phy. Chem. Chem. Phy. 19, 12452 (2017). 2. IR : Python Package to Calculate IR Intensities from the Dipole Approximation with Phonopy and VASP. This python package can calculate infrared intensities based on the dipole approximation. To do so, you need VASP and Phonopy . https://github.com/JaGeo/IR When using this code, please cite the following article: J. Chem. Phys. , 1994 , 100 , 8537; J. Phys.:Condens. Matter. , 2010 , 22 , 265006. 3. INTENS : The BASH script for evaluation of IR intensities within DFPT by VASP. As of VASP 5.* version, the DFPT linear response calculations are available. Among others, the user can obtain the matrix of Born effective charges ( BEC ), which refers to change of atoms'polarizabilities at an external electric field. The BEC tensor is a key to calculate the vibrational intensities using the most modern method available , using the formula by Gianozzi Baroni. http://homepage.univie.ac.at/david.karhanek/downloads.html 4. raman-sc : Python program to evaluate off-resonance Raman activity using VASP code as the backend. In order to calculate off-resonance Raman activity of a mode, one needs to compute the derivative of the polarizability (or macroscopic dielectric tensor) with respect to that normal mode coordinate: dP/dQ (or de/dQ). Thus, two ingredients are required: Phonons at Γ-point; Macroscopic dielectric tensor. https://github.com/raman-sc/VASP 5. VASP2NMR : Convert VASP files to NMR spectra. https://github.com/smeerten/VASP2NMR 6. opticsVASP : Program to plot optical properties from VASP results Program to plotoptical properties from VASP results. compile the program with :$g++ -oopticsVASP opticsVASP.2.0.c. run the executable file on the folder where theVASP output files are located. https://github.com/gmsn-ita/opticsVASP
转自: http://i.eol.cn/blog_read.php?topicid=693401 有三个方法: Linear Response Theory Frozen Phonon method Finite Displacement method Linear response 方法(或者称为 density perturbation functional theory , DFPT ),直接计算出原子的移动而导致的势场变化,再进一步构造出动力学矩阵。这种方法在计算谱时, Born effective charge (对极性的材料)和声子谱都能计算出。现在很流行, CASTEP , Quantum-Expresso , Abinit 等等都在用,后面两个原理差不多; Linear Response 优点: 晶体晶胞没有大小限制,即使用包含一个原子的 Primitive cell ,计算得到的 Dynamical Matrix 也是很准确的,主要原理: Hellmann-Feymann theorem and Perturbation theory , 原子施加很小的位移,计算波函数,电子密度对位移的响应函数,主要方法见 Gonze1997 年的两个 PRB 文章。计算速度一般,特别是采用 Normal Conserving PPs 的时候,单原子晶胞 RAM 占用量在 3-4G 之间, CASTEP 里面只支持 NCPP 的 Linear response 计算, USPPs 不支持。 另外一个是 Finite displacement ( 直接的方法 ) : 构造超原胞,把原子移动一下,计算原胞中所有原子所受的力(这个根据体系的周期性,要多移动几个原子),然后根据这个力构造力常数矩阵。 而且一般情况下对 LO-TO 的 split 不能计算出(只有在计算了 Born effective charge 之后, 进一步考虑了 non-analyticity term ,才能计算出)。 phonon, phonony 等就是结合 vasp 或者其他计算软件如 wien2k 等计算声子谱的。 Finite displacement 优点: RAM 占用量和计算量在 Cell 一样的情况下,可节约 2 倍的 RAM 和 CPU 时间,但这个方法最大的缺点是需要生成一个 Supercell 来获得比较可靠的力常数,虽然鉴于力常数是短程作用,在最邻近原子以外衰减很快,但所需要的 Supercell 大小也很大,一般截止半径大小是 4A 以上,对于金属这个半径可能会小一下,因为金属的电子 Coulomb 屏蔽很显著,但对于其他的晶体结构,以及晶体结构较复杂的体系,这种方法自动生成的 Cell 一般都包含 100 原子以上,基本上没有人能采用单机计算 Phonon , 如 BCC , Ba 元素, Primitive cell 只包含一个原子, %BLOCK LATTICE_CART -2.445170154155672 2.445170154155674 2.445170154155673 2.445170154155672 -2.445170154155673 2.445170154155673 2.445170154155672 2.445170154155672 -2.445170154155672 %ENDBLOCK LATTICE_CART %BLOCK POSITIONS_FRAC Ba 0.0000000000000000 0.0000000000000000 0.0000000000000000 在采用有限位移方法计算声子时晶胞是: %BLOCK PHONON_SUPERCELL_MATRIX 2 0 0 0 2 0 0 0 2 即 2*2*2 的 supercell ,里面包含 8 个 Ba 原子,采用 AMD Dual Core , 2G RAM ,计算需要 2h 左右即可完成。 另外一个最大的优点是可以用 Ultra soft Pseudo potentials , 这个可以极大的节约时间,减小 kinetic energy curoff 数值。 Finite Displacement 方法只计算 Brillouin Zone G 点的 Normal Modes ,其他 k 点的 Dynamical Matrix 利用 Fourier Transofrmation 得到, C ( k ) =Sum C ( R ) *Exp ( -ikR ),只要 Cell 足够大,可以获得和 Linear Response 一样可靠的 Dynamical Matrix 。 Linear Response 计算有带隙的晶体最好,也是最省事的方法,但计算金属,采用 Finite element 方法最好, Linear response 对金属体系基本上失效的。 可能原因: Perturbation theory 本身对于金属不成立 ( 金属能隙太小); Fermi 面 Smearing 方法本身对计算力常数不利;(目前有几个常用的 Smeaing 方法, Gaussan 函数,或者有限温度下的 Fermi Dirac 函数) 后者基本上可以排除,采用 Linear response ,同事采用 NCPP+fix occupation 的方法计算得到的 Phonon 和 NCPP+ Smearing 方法是一样子的,因此可以推断是 Linear Response theory 对 metal 不适用, CASTEP 小组在其网页上也指出 Lnear Response theory 对 Magnetic 和 Metal 不适用。因此 CASTEP 不支持金属体系 NCPP+Linear Response 计算,也是有原因的。 采用 Quantum-Expresso 计算 PHONON ,可以完全得到与 CASTEP 一致的结论,即 Linear Response 不适用于金属体系。 下面给出 Na 的例子,有实验数据,势函数计算结果, NCPP+ Linear response , USPP+Finite element 结果,可以看到 Linear response 精度连势函数都不如,数值完全是错误的 声子计算的几种方法: 转自: http://emuch.net/html/200802/723527.html Practical schemes for phonon calculations (见 castep 说明) A good review of the existing schemes can be found in Baroni et al. (2001). The theoretical study of phonon properties has to rely on one of the three available methods for determining the force constants matrix: analytical calculations, supercell calculations or linear response calculations. The analytical approach is only viable when the energy model is sufficiently simple to allow a direct evaluation of the second derivatives of the energy with respect to atomic displacements (e.g., empirical pair potential models). Therefore, it is unsuitable for first principles calculations. Further alternatives such as extracting vibrational properties from molecular dynamics runs (Arias et al. 1992) are less transparent and noticeably more expensive. The supercell method involves perturbing the positions of the atoms slightly and calculating the reaction forces (Ackland et al. 1997). It is necessary to use supercells of the original cell when interatomic interaction in the system is long ranged. The main advantage of this method (and of the closely related frozen phonon technique) is that there is no need for a new formalism; any total energy scheme like CASTEP can be used to evaluate the forces at a number of carefully selected distorted configurations. The original frozen phonon scheme requires a displacement with the given wave vector and has been successfully used since the early 1980s (Yin and Cohen 1982, Ho et al. 1984). The force constants matrix evaluation in this formalism has been used to calculate interplanar force constants (Wei and Chou 1994) and thus phonon dispersion along high symmetry directions. More recent applications are based on the full reconstruction of the force constants matrix (Ackland et al. 1997, Parlinski et al. 1997, and references in Baroni et al. 2001). Linear response calculations seek to evaluate the dynamical matrix directly for a set of q vectors. The starting point of the linear response approach is evaluation of the second-order change in the total energy induced by atomic displacements. The main advantage of the scheme is that there is no need to artificially increase the cell size in order to accommodate small values of the q vectors, as in the frozen phonon method, or to overcome the long range interaction problem (force constants matrix from supercell calculations). A more detailed description of the linear response method can be found in Baroni et al. 2001. The CASTEP implementation is described in the Linear Response topic. 第一性原理计算声子方法及常见程序: 一,直接法: 直接法,或称 frozen-phonon 方法,是通过在优化后的平衡结构中引入原子位移,计算作用在原子上的 Hellmann-Feynman 力,进而由动力学矩阵算出声子色散曲线。用该方法计算声子色散曲线最早开始于 80 年代初。由于计算简便,不需要特别编写的计算程序,很多小组都采用直接法计算材料性质。直接法的缺陷在于它要求声子波矢与原胞边界 (super size) 正交,或者原胞足够大使得 Hellmann-Feynman 力在原胞外可以忽略不计。这使得对于复杂系统,如对称性高的晶体、合金、超晶格等材料需要采用超原胞。超原胞的采用使计算量急剧增加,极大的限制了该方法的使用。这种方法不能很好的预言 LO-TO splitting, 只有在计算了 Born effective charge 和 dielectric constant 之后,进一步考虑了 non-analyticity term ,才能计算出 ; 但 Direct Method 本身并不能给出 Born effective charge 和 dielectric constant. 所以这也是它的一个缺陷 . 目前 ,vasp+phonon 用的就是这种方法 . vasp+phonon (或者 PHON 或者 fropho ) VASP 能计算声子谱的都是采用一种直接的方法:构造超原胞,把原子移动一下,计算原胞中所有原子所受的力(这个根据体系的周期性,要多移动几个原子),然后根据这个力构造力常数矩阵。 1 , PHONON Software by Krzysztof PARLINSKI Phonon is a software (see list of Publications) for calculating phonon dispersion curves, and phonon density spectra of crystals, crystals with defects, surfaces, adsorbed atoms on surfaces, etc. from either a set of force constants, or from a set of Hellmann-Feynman forces calculated within an ab initio program (not included). One can use VASP, Wien2k, MedeA of Materials Design , Siesta, or other ab initio code which is able to optimize a supercell and calculate the Hellmann-Feynman forces. Phonon builds a crystal structure, using one of the 230 crystallographic space groups, finds the force constant from the Hellmann-Feynman forces, builds the dynamical matrix, diagonalizes it, and calculates the phonon dispersion relations, and their intensities. Phonon finds the polarization vectors, and the irreducible representations (Gamma point) of phonon modes, and calculates the total and partial phonon density of states. It plots the internal energy, free energy, entropy, heat capacity and tensor of mean square displacements (Debey-Waller factor). Phonon finds the dynamical structure factor for the coherent inelastic neutron scattering and the incoherent doubly differential scattering cross section for a single crystal and polycrystal. For polar cystals the LO/TO mode splitting can be included. Homepage : http://wolf.ifj.edu.pl/phonon/index.html 2 , PHON A program to calculate phonons using the small displacement method This program calculates force constant matrices and phonon frequencies in crystals. From the frequencies it also calculates various thermodynamic quantities, like Helmholtz free energy, entropy, specific heat and internal energy of the harmonic crystal. The procedure similar to the one described in Ref. , i.e. is based on the small displacement method. It needs a code capable to calculate forces on the atoms of the crystal. Homepage : http://chianti.geol.ucl.ac.uk/~dario/ E-mail: d.alfe@ucl.ac.uk Telephone: +44 (0)20 7679 2361 Fax: +44 (0)20 7679 5166 3 , fropho is the open source implementation of the frozen phonon method. Function: Phonon band structure Phonon DOS (Vibrational spectra) Thermal properties Mulliken notation assignment of vibration mode fropho is the frozen phonon analyzer mainly for first principles (ab initio) calculation. Periodic boundary condition is assumed. fropho gives good combinations with VASP code or another codes which can derive Hellmann-Feynman forces. Homepage : http://fropho.sourceforge.net/ Download: http://sourceforge.net ... oup_id=161614 Contact: atz.togo@gmail.com Authour: Atsushi Togo 二, DFPT 方法: 1987 年, Baroni 、 Giannozzi 和 Testa 提出了一种新的晶格动力学性质计算方法 -- 微扰密度泛函方法 (Density Function Perturbation Theory) 。 DFPT 通过计算系统能量对外场微扰的响应来求出晶格动力学性质。该方法最大的优势在于它不限定微扰的波矢与原胞边界 (super size) 正交,不需要超原胞也可以对任意波矢求解。因此可以应用到复杂材料性质的计算上。此外,能量对外场微扰的响应不仅可以推导出声子的晶体性质,还能求出弹性系数、声子展宽、拉曼散射截面等性质 , 这种方法本身就能算出 Born effective charge dielectric constant, 可以很好的预言 LO-TO splitting 甚至 Kohn anomalies 。这些优势使得 DFPT 一经提出就被广泛应用到了半导体、金属和合金、超导体等材料的计算上。比较常用的程序是 pwscf 和 abinit , castep 等采用的是一种 linear response theory 的方法(或者称为 density perturbation functional theory , DFPT ),直接计算出原子的移动而导致 的势场变化,再进一步构造出动力学矩阵。 VASP-INCAR文件-用于计算声子谱前的优化 System = Li-diamondoid_from_LiNH2_SG19_ 3 0GPa PREC = Accurate ENCUT = 650.0 LREAL = .False ISMEAR = 1 SIGMA = 0.05 EDIFF = 1E-7 EDIFFG = -1E-3 NSW = 50 ISIF = 3 IBRION = 2 PSTRESS = 300 VASP INCAR文件: DFPT in VASP- used to calculated phonon spectrum System = exp-LiN3_SG12 PREC = Accurate ENCUT = 400.0 LREAL = .False ISMEAR = 1 EDIFF = 1E-7 IBRION = 8 LWAVE = .FALSE LCHARG = .FALSE ADDGRID = .TRUE
关于用超胞方法计算声子的一些经验 转自: http://blog.sina.com.cn/s/blog_7c63531f0101dbgq.html 【转自叶落鹰飞】_zlz4506_新浪博客 目前来说计算声子谱的计算主要还是基于supercell的方法【准确地说是不是应该理解为 有限位移法,如MS-CASTEP中所述】,主要是发展的时间比较长,发展的相对成熟一些。 另一种方法是基于线性响应的方法,该方法主要的好处(我个人经验):计算的结果相对可靠,收敛参数容易控制。只要能量截断和K点收敛了,计算的结果就比较可靠。 而且它可以计算任意q点的声子。 但缺点是有时低对称性的结构的低对称性q点不容易收敛【是啊,经常出现不容易收敛的情况,即使在gama点也出现很大的负频】。 而且对于大体系,计算速度也不是很快。代表软件:abinit, quantum espresso (pwscf)。 超胞法目前的主流软件是 phonon, phon, fropho, phonopy。 phonon计算的比较准确可靠, 但是要收费。 所以一般人都是选择后几种软件,因为都是免费的。 phon当时是 Dario Alfe 为了计算自由能而写的计算声子谱的软件。但是phon用起来还是比较麻烦的,需要自己写一些脚本。 Atsushi Togo 可 能是发现phon太麻烦,而写了fropho, 其实fropho就是相当于把phon重新包装一下。用起来简单多了。 里面用了大量的python和 ruby脚本。 估计够后来Atsushi Togo 把python用爽了, 又重写了该软件,完全python化了,这就是phonopy。 【phonopy的产生历史,写得很好。不了解历史,昨天Atsushi Togo给我回邮件,我还误以为是我的同学,居然问 他:Do you plan to go to class tonight?............晕死】 但天下没有免费的午餐,用免费的软件就是需要一定的经验积累。phon,fropho和 phonopy的使用的最大问题就是对于很多体系,会出现离奇的虚频,尤其是gamma点附近,很难算准 。 为了克服这个问题,我的建议是:在对原子进行distortion的时候【distortion是不是就是位移DISP 或新版的disp.yaml?】,一定要对原子加上负方向的移动, 这样虽然计算量增加了一倍,但计算会更准确和可靠。 对于phon: For central differences (LCENTRAL = .T.) the format of the file is the same, but there are twice as many displacements (for each displacement u there is also -u). 在INPHON里要加上 LCENTRAL = .T. , 这样就可以产生负方向的移动了。 对于fropho: More displacements to obtain precise frequencies You can specify displacements more than independent freedom to obtain precise eigenvalues (frequencies). This treatment works especially near -point. An effective example is displacements. If your DISP file is, 1 1.00 0.00 0.00 1 0.00 1.00 0.00 1 0.00 0.00 1.00 You can create displacements by hand (or use sed), e.g., 1 1.00 0.00 0.00 1 -1.00 0.00 0.00 1 0.00 1.00 0.00 1 0.00 -1.00 0.00 1 0.00 0.00 1.00 1 0.00 0.00 -1.00 This setting may be called 'plus-minus'. The plus-minus setting works to increase stability of phonon band structure even when the initial atomic geometry is not enough converged to the equilibrium position. Especially frequency equivalent to approximately zero is sensitive to this treatment. Sometimes fails when forces are converged too much. fropho就需要手动的在DISP文件里加上负方向就可以。 对于phonopy,目前Atsushi Togo 维护的比较好。 出这种问题较少。 其次, 我觉得实际扩胞的时候不用扩的非常大。 一般a,b,c扩的10埃左右就可以。 主 要还是原子受力要计算准确【怎样将受力计算准确?】。 所以当发现小的虚频的时候,还是在受力的计算的时候可以尝试增大K点。有的时候对于100个原子的 超胞, 我都用到了10*10*10 (但这还是少数情况). 【如果含有过渡金属原子的体系,是不是会将内存挤爆?】 但如果想要计算准确的自由能,还需要测试超胞大小,受力计算的k点,移动原子幅度的大小。比较麻烦,但又必须。 最后要想得到准确的结果,还需要多用几种软件,互相佐证。 当然如果不差钱的话,可以买phonon,确实很好用。 但是如果想提高自己的话,可以用其它免费的软件。