Tuesday, June 22, 2010

Using Phonopy with Wien2k

In this post I will describe how to calculate various phonon properties from Wien2k calculations, using Atsushi Togo's Phonopy program. As an example, I will use lithium hydride (LiH) which has a simple NaCl structure with a lattice constant of 4.01A (optimized in GGA approximation).

1. LiH has an fcc structure, but phonopy requires the P1 symmetry for Wien2k. So we convert LiH.struct to P1 by running x supercell and creating 1x1x1 cell with a type P. This cell should have 8 atoms - 4 Li and 4 H.

2. Create INPHON file with the following content:
ATOM_NAME = Li H
NDIM = 1 1 1
LSUPER = .TRUE.

The number of dimensions should be larger (e.g. NDIM 2 2 2), but for the testing purposes I've set it to 1 1 1. Then run:
phonopy --wien2k=LiH.struct

This creates the DISP file and several struct files with the supercells (in this particular case - LiH.structS, LiH.structS-001, LiH.structS-002. Having a look at the DISP file:
1 1 0 0
5 1 0 0

And having a look at LiH.structS-* files, one can see, that in these files atom 1 (Li) and atom 5 (H) are displaced by 0.01A in x direction. You can change the displacement manually, if you want.

3. Next step is to run two Wien2k calculations for LiH.structS-001 and LiH.structS-002 structure files, respectively, and save the resulting *scf files.

Important! The init for this calculations should begin from symmetry, e.g.:
init_lapw -b -s symmetry -vxc 13 -numk 100 -sp

This is important to start from symmetry because sgroup could reduce the symmetry, which will make phonopy unable to create a proper FORCES file. Also, the RMT spheres can overlap (check it with x nn!) and should be reduced if needed.

4. Once you have LiH001.scf and LiH002.scf from the above calculations, copy them in the directory with INPHON and DISP files, and run the following to generate FORCES:
phonopy --wien2k=LiH.struct -f LiH001.scf LiH002.scf

The order of scf files in this command should match the order of the atoms in DISP! If everything is ok, than the FORCES file will be saved and you can calculate various properties.

5. Backup INPHON to INPHON.1 and modify it for your needs as described in the phonopy manual. It is important that you comment or remove LSUPER=TRUE line. To calculate phonon DOS the new INPHON may look as follows:
ATOM_NAME = Li H
NDIM = 1 1 1
MP = 21 21 21

The phonon DOS can be calculated by invoking the command:
phonopy --wien2k=LiH.struct -p

References
1. Phonopy web page, where you may find the documentation.
2. Using phonopy with VASP (in Chinese, but readable with Google translate for non-speakers).

8 comments:

  1. I'm trying phonopy with wien2k but it doesnt works at all!
    see: "...
    Creating displacements
    Traceback (most recent call last):
    File "/usr/bin/phonopy", line 399, in
    unitcell = ase.read_vasp( unitcell_filename,
    NameError: name 'unitcell_filename' is not defined..."

    what is going wrong? Thanks for any help!!

    ReplyDelete
  2. Could you post the contents of the struct file you are using?

    ReplyDelete
  3. ok. After "x supercell", the B2 struct converted to P is:

    znal
    P LATTICE,NONEQUIV. ATOMS 2
    MODE OF CALC=RELA unit=ang
    5.150120 5.150120 5.150120 90.000000 90.000000 90.000000
    ATOM 1: X=0.00000000 Y=0.00000000 Z=0.00000000
    MULT= 1 ISPLIT= 2
    Zn NPT= 781 R0=0.00010000 RMT= 2.2000 Z: 30.0
    LOCAL ROT MATRIX: 1.0000000 0.0000000 0.0000000
    0.0000000 1.0000000 0.0000000
    0.0000000 0.0000000 1.0000000
    ATOM 2: X=0.50000000 Y=0.50000000 Z=0.50000000
    MULT= 1 ISPLIT= 2
    Al NPT= 781 R0=0.00010000 RMT= 1.6000 Z: 13.0
    LOCAL ROT MATRIX: 1.0000000 0.0000000 0.0000000
    0.0000000 1.0000000 0.0000000
    0.0000000 0.0000000 1.0000000
    0 NUMBER OF SYMMETRY OPERATIONS

    ReplyDelete
  4. INPHON:

    znal
    ATOM_NAME = Zn Al
    NDIM = 1 1 1
    LSUPER = .TRUE.

    ReplyDelete
  5. I had the same problem. Try erasing the first two lines. That is, try this INPHON file

    INPHON:

    NDIM = 1 1 1
    LSUPER = .TRUE.

    The program is looking for a POSCAR file, which you don't have (if you are trying to do calculations with WIEN2k).

    Good luck!

    Urko

    ReplyDelete
  6. can SIESTA run phonon spectrum?
    if it can, How to calculate and construct the input file(*.fdf)?

    ReplyDelete
  7. >can SIESTA run phonon spectrum?

    Yes. You should use VIBRA package for this purpose, which is the part of SIESTA distribution. Please address the documentation for this package:
    www.mail-archive.com/siesta-l@listserv.uam.es/msg02665/vibra.pdf

    ReplyDelete
  8. Thanks for this information!

    Please, do not stop blogging!

    ReplyDelete

Note: Only a member of this blog may post a comment.