****************************************************************************************************
* *
* aflow - STEFANO CURTAROLO Duke University 2003-2017 *
* High-Throughput ab-initio Computing Project *
* *
****************************************************************************************************
LATEST VERSION OF THE FILE: materials.duke.edu/AFLOW/aflow_apl.pdf
****************************************************************************************************
Phonon calculations with deformations written by Michal Jahnatek and Stefano Curtarolo.
The current version of APL can calculate the phonon dispersion curves (output file PDIS),
phonon density of state (file PDOS), and thermal properties (file THERMO). All are
calculated in harmonic approximation. Two methods of calculation can be selected:
direct (supercell) method (DM) or linear response method (LR). The resulted file can
be transformed by next tool apl2agr into agr, ps, eps, or png form (located in
SOURCES/APL2AGR).
APL expects the well relaxed structure on input. There is no additional relaxation
inside the APL. So, you have to prepare a such structure by separate aflow run with
relaxation mode for forces. For phonon calculation, generally, you have to setup
3 things: 1) Tell to aflow you want a phonon calculation. 2) Which method of calculation
to use. 3) What to calculate.
1) To perform a phonon calculation this line has to be present in aflow.in:
[AFLOW_PHONONS]CALC
The APL is checking its existence in aflow.in. If it does not exist, the job is not supposed
to be for phonon calculation and no other phonon settings are read.
2) The user has possibility to switch between two methods of calculation by keyword ENGINE.
For direct method (DM), also known as supercell method, one has to write:
[AFLOW_PHONONS]ENGINE=DM
This is also a default setting. For linear response method it is:
[AFLOW_PHONONS]ENGINE=LR
Since this parameter has its own default settings, you do not need to specify it if you are
fine with DM. Each method has its own, but also common parameters, which can be used to tune
the whole calculation.
2.1) Common parameters used by both methods
The most important setting is the supercell dimension (the supercell is required by both
methods). Supercell can be set in three ways:
[AFLOW_PHONONS]SUPERCELL=numberXnumberXnumber
[AFLOW_PHONONS]MINSHELL=number
[AFLOW_PHONONS]MINATOMS=number
EXAMPLES:
Direct specification, like
[AFLOW_PHONONS]SUPERCELL=4x4x4
Minimal nearest neighbor shell, specification like:
[AFLOW_PHONONS]MINSHELL=6
The default settings is MINSHELL=6 and APL will construct the appropriate supercell. HOWEVER,
THIS IS NOT THE RECOMMENDED WAY, BECAUSE INCLUSION OF 6 SHELL IS ENOUGH ONLY FOR VERY SIMPLE
MATERIALS. There is no way or rule how to find the number of enough shells included into
calculation. FOR BEST RESULTS YOU HAVE TO SPECIFY THE SUPERCELL DIMENSION DIRECTLY. We found
the 4x4x4 is usually enough for all fcc systems; 3x3x2 for hcp; bcc are complicated, but
generally it should be more that 3x3x3. Typically, the supercell with about 100 atoms should
be fine for 90% systems. You might find the MINATOMS option useful for large unit cells.
Minimal number of atoms, like:
[AFLOW_PHONONS]MINATOMS=number
The code will homogeneously increase the volume of the supercells, until it finds a SUPERCELL(i,j,k) containing
at least "number" atoms.
[AFLOW_PHONONS]KPPRA=number
By default, AFLOW takes the number of KPOINTS (KPPRA) from the "[VASP_KPOINTS_FILE]KPPRA=number" entry.
You can override the number with "[AFLOW_PHONONS]KPPRA=number". Look at README_AFLOW.TXT for KPPRA.
[AFLOW_PHONONS]KSCHEME=scheme
By default, AFLOW takes the KPOINTS scheme from the "[VASP_KPOINTS_FILE]KSCHEME=scheme" entry.
You can override the scheme with "[AFLOW_PHONONS]KSCHEME=scheme". Look at README_AFLOW.TXT for KSCHEME.
[AFLOW_PHONONS]KPOINTS=EVEN | ODD
By default, AFLOW takes the KPOINTS parity from the "[VASP_FORCE_OPTION]KPOINTS=EVEN | ODD" entries, if specified.
You can override the entries with "[AFLOW_PHONONS]KPOINTS=EVEN | ODD". Look at README_AFLOW.TXT for KPOINTS.
This is useful for a small number of KPOINTS.
2.2) Direct method parameters
The supercell (direct) method can be modified by this parameters:
[AFLOW_PHONONS]DXYZONLY=n
[AFLOW_PHONONS]DMAG=0.015
[AFLOW_PHONONS]DPM=y
[AFLOW_PHONONS]ZEROSTATE=n
The DPM, DXYZONLY, and DMAG parameters control how the distortion vectors will be generated.
Generally, APL will try an atom distortions along the [100],[010],[001],[110], [101],[011],
[111] direction. It will apply all site symmetry operations, and that direction which produces
the highest number of new independent vectors will by used in next calculation. For each unique
atom of the primitive cell we need to know the forces acting along three independent directions.
Hence, if one distortion direction can produce by the symmetry three linear independent vectors,
this atom needs to be distorted in only one direction and the rest two are calculated by the
symmetry. This is the case of fcc lattice.
if you specify DXYZONLY=y, only the three trial directions ([100],[010],[001]) will be tried.
This is important for cases when one primitive cell vector is much longer then others. All
founded directions of distortion are of unit length. The real distortion is applied by some
specified magnitude. This magnitude should be small enough. It can be set by keyword DMAG.
The default value is 0.015 Angs., what is generally accepted value also by other software
packages and works well for all systems.
Usually, in effort to filter out the anharmonic effects from the forces, it is important
to calculate forces in both directions of distortion, i.e., DMAG is applied by positive and
also negative sign. This is controlled by keyword DPM. If you specify DPM=y (default), twice
more distortion vectors will be generated, and the final force acting on each atom is calculated
as 0.5 * ( f(+) - f(-) ).
Sometimes, it can happen the calculating structure is not well relaxed or can not be in a given
precision. In this case, even the unstrained state has some non-zero forces. In this case is
good to subtract these forces from all states. This can be done by ZEROSTATE=y, what means the
APL will generate the calculation of this unstrained state and the obtained forces for this state
will be subtracted from all other strained calculations. (!not well tested part)
2.3) Linear response parameters
The use of the linear response method as is implemented in VASP is more complicated. Every time
you specify this method (ENGINE=LR), APL will check you binary file of VASP for version.
If it is not 5.2 or higher it will refuse to continue. Moreover, vasp52 binary has to
be run with special settings in you .bashrc, otherwise the calculation will crash after the
first completely converged electronic loop. Hence, check you have these lines in you .bashrc:
ulimit -s unlimited
In case of LR method, APL is not responsible for finding the appropriate set of distortion vectors
and all stuff for generation and creation of supercells. All is done by VASP. Hence, expect
quite long run. Please note, the VASP is using the mode XYZONLY, hence finally more distortions
are generated as are needed. As result, the VASP will generate file DYNMAT, where all forces acting
on atoms after each distortion are located. This is the main input file for APL for the next calculation.
2.4) Polar Systems
If you know the studied system is polar, the phonon properties have to be calculated specially,
where the dipole-dipole interaction is taking into account. This can be specified by keyword POLAR.
[AFLOW_PHONONS]POLAR=y
In this case, APL will prepare also next run by VASP52, where Born effective charges and dielectric
constant matrix will be calculated with Linear Response (DFTP).
These both quantities will be used later in correction of dynamic matrices for correct TO-LO splittings.
The default setting is POLAR=n.
Note that TO-LO splitting is alcualted only with >VASP52.
Epsilon and te Born charges are calculated in two ways: with LEPSILON or LCALCEPS. Default is the latter
You can switch the code by changing the lines of apl.h
#undef APL_VASP_USE_LEPSILON
#define APL_VASP_USE_LCALCEPS
3) Generally, you can specify what to calculate by these keyword:
[AFLOW_PHONONS]DC=y
[AFLOW_PHONONS]DOS=y
[AFLOW_PHONONS]TP=y
The default setup is no for all. Each calculation mode has its own set of parameters.
3.1) Phonon dispersion curves calculation (DC=y)
The most important setting for this module is the path in the reciprocal space for which the
frequencies should be calculated. The APL can do it automatically, if platon program is
available. The procedure is: the platon is called to obtain the spacegroup number of primitive
cell. Then, this number is used to get the path from the settings used for the calculation of
the electronic structure in aflow. If platon is not possible to call, this group has to be
specified in aflow.in, like:
[AFLOW_PHONONS]DCINITPATH = RHL
where you can specify the lattice variation as introduced in [doi=10.1016/j.commatsci.2010.05.010]
or
[AFLOW_PHONONS]DCINITSG = 166
If everything is OK, the APL will calculate the dispersion curves along the same path as is
used for electronic structure. If you need to calculate it by an another path, you can
specified it as:
[AFLOW_PHONONS]DCUSERPATH = G-X|X-U|K-G|G-L
where G,X,U,L points are the same points as are defined inside the aflow (for electronic structure).
The number of points in which each sub-path (G-X,X-U,...) will be calculated can be set as:
[AFLOW_PHONONS]DCPOINTS=100
what is also a default setting. The calculated dispersion curves are saved in file PDIS, where
the 1st column is ID of points in sub-path, the 2nd is the position in the whole path, ... the next
column correspond to one phonon branch. There is 3 * natoms_in_primitive_cell branches. The
frequencies are in units specified by (default)
[AFLOW_PHONONS]FREQFORMAT = "THZ | ALLOW_NEGATIVE"
which means the frequency is returned in THz and also negative values are allowed to return. The OR
operator is important for use. If ALLOW_NEGATIVE is not added, only the positive values are
returned (negative values are returned as zero).
Other options are
[AFLOW_PHONONS]FREQFORMAT = "RECIPROCAL_CM" or "CM-1"
[AFLOW_PHONONS]FREQFORMAT = "MEV"
[AFLOW_PHONONS]FREQFORMAT = "OMEGA"
[AFLOW_PHONONS]FREQFORMAT = "HERTZ"
3.2) Phonon density of states calculation (DOS=y)
There are implemented two method for integration in Brillouin zone - Linear Tetrahedron method (LT)
and root sampling method (RS). As default is selected LT. User can switch between them by as:
[AFLOW_PHONONS]DOSMETHOD=LT
or
[AFLOW_PHONONS]DOSMETHOD=RS
The mesh of qpoints used for numerical integration should be set as:
[AFLOW_PHONONS]DOSMESH=21x21x21
The setting 21x21x21 is also the default setting. The APL will automatically find the irreducible part
of BZ (the list of irreducible qpoints with appropriate summation weights). Only for these qpoints a
dynamic matrix is constructed and diagonalized. In case of linear tetrahedron method, the list of
irreducible tetrahedrons with their weights is constructed and used in summation. The function of
density of states will be evaluated in finite number of points, which can be set as:
[AFLOW_PHONONS]DOSPOINTS=2000
The density of 2000 points is the default setting. The resulted DOS function can be smeared by gaussians
of specific width. This is quite important for RS method to have a nice looking pictures. The default
setting of smearing for RS method is 0.05, but can be changed as:
[AFLOW_PHONONS]DOSSMEAR=0.05
For LT method the default setting is 0.0, so no smearing.
3.3) Thermal properties calculation (TP=y)
Generally, APL is calculating the zero point vibrational energy (U0), the internal energy (U), the
vibrational free energy (Fv), the vibrational entropy (Sv), and isochoric specific heat (cv) for
a given range of temperature. This range can be set as
[AFLOW_PHONONS]TPT=0:2000:10
what means it will calculate all upper mentioned properties from 0 to 2000 K by step of 10 K. This
is also a default setting.
4) The APL has integrated hibernate system, which is switched on by default. To turn it down:
[AFLOW_PHONONS]HIBERNATE=n
This system means the calculated force constant matrices are stored in external file called
apl.xml.bz2. Once this file exists and you will run aflow for phonon calculation again, it
will automatically used this data (awake from it) and speed up calculation.
5) Inputs and inheritance.
The minimal input is:
[AFLOW_PHONONS]CALC
[AFLOW_PHONONS]SUPERCELL=4x4x4
[AFLOW_PHONONS]DC=y
[AFLOW_PHONONS]DOS=y
[AFLOW_PHONONS]TP=y
5.1) Inheritance
The generated ARUN.APL***/aflow.in input files inherit some options from the master aflow.in
If present, the following options are passed to the local aflow.in
[VASP_FORCE_OPTION]AUTO_PSEUDOPOTENTIALS=...
[VASP_FORCE_OPTION]SPIN=...
[VASP_FORCE_OPTION]TYPE=...
[VASP_FORCE_OPTION]AUTO_MAGMOM=...
[VASP_FORCE_OPTION]BADER=...
[VASP_FORCE_OPTION]ELF=...
[VASP_FORCE_OPTION]ABMIX=...
[VASP_FORCE_OPTION]KPOINTS=...
[VASP_FORCE_OPTION]IGNORE_AFIX=...
Other options are added by default, they are:
[VASP_FORCE_OPTION]WAVECAR=OFF
[VASP_FORCE_OPTION]CHGCAR=OFF
[VASP_FORCE_OPTION]PREC=ACCURATE
[VASP_FORCE_OPTION]ALGO=NORMAL
To avoid intercepting NPAR warnings intruduced in vasp52+, the extra option is added
[VASP_FORCE_OPTION]IGNORE_AFIX=NPARC
6) EXAMPLE: PbS with Linear Response use the following:
For Deformation engine, put [AFLOW_PHONONS]ENGINE=DM and uncomment #[AFLOW_PHONONS]DISMAG=0.015
[AFLOW] **********************************************************************************
[AFLOW]SYSTEM=PbS
[AFLOW] **********************************************************************************
[AFLOW_MODE=VASP]
[AFLOW_MODE_ZIP=bzip2]
[AFLOW_MODE_BINARY=vasp53s]
[AFLOW] **********************************************************************************
#[AFLOW_MODE_MPI]
[AFLOW_MODE_MPI_MODE]NCPUS=MAX
[AFLOW_MODE_MPI_MODE]COMMAND ="mpirun -np"
[AFLOW_MODE_MPI_MODE]AUTOTUNE
[AFLOW_MODE_MPI_MODE]BINARY="mpivasp53s"
[AFLOW] **********************************************************************************
[AFLOW_PHONONS]CALC
[AFLOW_PHONONS]ENGINE=LR
#[AFLOW_PHONONS]DISMAG=0.015
[AFLOW_PHONONS]POLAR=Y
[AFLOW_PHONONS]SUPERCELL=4x4x4
[AFLOW_PHONONS]DC=Y
#[AFLOW_PHONONS]DCINITSG=227
#[AFLOW_PHONONS]DCUSERPATH=Gamma-X|X-U|K-Gamma|Gamma-L
[AFLOW_PHONONS]DCINITPATH=FCC
[AFLOW_PHONONS]DOS=Y
[AFLOW_PHONONS]TP=Y
[AFLOW_PHONONS]TPT=0:2000:10
[AFLOW_PHONONS]KPPRA=1024
[AFLOW_PHONONS]KSCHEME=G
[AFLOW_PHONONS]KPOINTS=EVEN
[AFLOW_PHONONS]DOSMESH=30x30x30
[AFLOW] **********************************************************************************
[VASP_RUN]RELAX=2
#[VASP_FORCE_OPTION]KPOINTS=KEEPK,EVEN,KSHIFT_GAMMA_EVEN,KSCHEME_GAMMA,GAMMA,IBZKPT
[VASP_FORCE_OPTION]SYM=ON
[VASP_FORCE_OPTION]AUTO_PSEUDOPOTENTIALS=potpaw_PBE
[VASP_FORCE_OPTION]NBANDS
[VASP_FORCE_OPTION]SPIN=OFF
[VASP_FORCE_OPTION]RELAX_MODE=FORCES
[VASP_FORCE_OPTION]PREC=ACCURATE
[VASP_FORCE_OPTION]ALGO=FAST
[VASP_FORCE_OPTION]RELAX
[VASP_FORCE_OPTION]TYPE=DEFAULT
[VASP_FORCE_OPTION]CONVERT_UNIT_CELL=SPRIM,MINK
[AFLOW] **********************************************************************************
[VASP_INCAR_MODE_EXPLICIT]START
SYSTEM=PbS
[VASP_INCAR_MODE_EXPLICIT]STOP
[AFLOW] **********************************************************************************
[VASP_KPOINTS_MODE_IMPLICIT]
[VASP_KPOINTS_FILE]KSCHEME=G
[VASP_KPOINTS_FILE]KPPRA=400
[AFLOW] **********************************************************************************
[VASP_POTCAR_MODE_IMPLICIT]
[VASP_POTCAR_FILE]Pb
[VASP_POTCAR_FILE]S
[AFLOW] **********************************************************************************
[VASP_POSCAR_MODE_EXPLICIT]START
PbS [FCC,FCC,cF8]
1.224745
0.00000000000000 2.45291416610433 2.45291416610433
2.45291416610433 0.00000000000000 2.45291416610433
2.45291416610433 2.45291416610433 0.00000000000000
1 1
Direct(2) [A1B1]
0.00000000000000 0.00000000000000 0.00000000000000 Pb
0.50000000000000 0.50000000000000 0.50000000000000 S
[VASP_POSCAR_MODE_EXPLICIT]STOP
[AFLOW] **********************************************************************************
****************************************************************************************************
* *
* aflow - STEFANO CURTAROLO Duke University 2003-2017 *
* High-Throughput ab-initio Computing Project *
* *
****************************************************************************************************