1. OpenMx相关教程

alamode+openmx计算声子谱

有时我们在使用vasp计算声子谱时会出现虚频,这时可以换一种方法,用openmx结合alamode来计算

我们以Zn4C2这个结构为例,vasp优化好的POSCAR如下:

POSCAR\(1)                              
   1.00000000000000     
     5.3030503048140787    0.0043751097418917    0.0000000000000000
    -0.0044081956718473    5.3033109599103794    0.0000000000000000
     0.0000000000000000    0.0000000000000000   33.4249000549000002
   Zn   C 
     4     2
Direct
  0.4020481294372711  0.7814913255080578  0.5000117824032253
  0.4020682568981326  0.2814685937223771  0.5000154217712736
  0.9020980994915183  0.2815474588742708  0.5000123477693514
 -0.0979667997484869  0.7815097457354251  0.5000092522639722
  0.6520447475573569  0.5314929986752165  0.5000106003109016
  0.1520475813642065  0.0314898574846514  0.5000106024812589
输入命令:phonopy -d --dim="3 3 1" -c POSCAR-unitcell 进行3*3的扩胞

准备文件alamode.sug.in,设置如下:

&general
  PREFIX = Zn4C2
  MODE = suggest
  NAT = 54; NKD = 2
  KD = Zn C
/

#&optimize
# DFSET = DFSET_harmonic
#/

&interaction
  NORDER = 1  # 1: harmonic, 2: cubic, ..
/

&cell
  1 # factor in Bohr unit 1 Bohr=0.529 Ang
    8.4159408337399428969    0.0069432991603821279    0.0000000000000000
    -0.0069958065312216651   8.4163544933777715788    0.0000000000000000
     0.0000000000000000    0.0000000000000000   17.6817721290421001058
/

&cutoff 
  Zn-Zn None
  Zn-C None
  C-C None
/

&position
1  0.1340160431457570  0.2604971085026859  0.5000117824032253
1  0.4673493764790904  0.2604971085026859  0.5000117824032253
1  0.8006827098124237  0.2604971085026859  0.5000117824032253
1  0.1340160431457570  0.5938304418360192  0.5000117824032253
1  0.4673493764790904  0.5938304418360192  0.5000117824032253
1  0.8006827098124237  0.5938304418360192  0.5000117824032253
1  0.1340160431457570  0.9271637751693526  0.5000117824032253
1  0.4673493764790904  0.9271637751693526  0.5000117824032253
1  0.8006827098124237  0.9271637751693526  0.5000117824032253
1  0.1340227522993775  0.0938228645741257  0.5000154217712736
1  0.4673560856327109  0.0938228645741257  0.5000154217712736
1  0.8006894189660441  0.0938228645741257  0.5000154217712736
1  0.1340227522993775  0.4271561979074590  0.5000154217712736
1  0.4673560856327109  0.4271561979074590  0.5000154217712736
1  0.8006894189660441  0.4271561979074590  0.5000154217712736
1  0.1340227522993775  0.7604895312407924  0.5000154217712736
1  0.4673560856327109  0.7604895312407924  0.5000154217712736
1  0.8006894189660441  0.7604895312407924  0.5000154217712736
1  0.3006993664971728  0.0938491529580903  0.5000123477693514
1  0.6340326998305060  0.0938491529580903  0.5000123477693514
1  0.9673660331638394  0.0938491529580903  0.5000123477693514
1  0.3006993664971728  0.4271824862914236  0.5000123477693514
1  0.6340326998305060  0.4271824862914236  0.5000123477693514
1  0.9673660331638394  0.4271824862914236  0.5000123477693514
1  0.3006993664971728  0.7605158196247569  0.5000123477693514
1  0.6340326998305060  0.7605158196247569  0.5000123477693514
1  0.9673660331638394  0.7605158196247569  0.5000123477693514
1  0.9673444000838377  0.2605032485784750  0.5000092522639722
1  0.3006777334171710  0.2605032485784750  0.5000092522639722
1  0.6340110667505043  0.2605032485784750  0.5000092522639722
1  0.9673444000838377  0.5938365819118083  0.5000092522639722
1  0.3006777334171710  0.5938365819118083  0.5000092522639722
1  0.6340110667505043  0.5938365819118083  0.5000092522639722
1  0.9673444000838377  0.9271699152451417  0.5000092522639722
1  0.3006777334171710  0.9271699152451417  0.5000092522639722
1  0.6340110667505043  0.9271699152451417  0.5000092522639722
2  0.2173482491857856  0.1771643328917388  0.5000106003109016
2  0.5506815825191189  0.1771643328917388  0.5000106003109016
2  0.8840149158524523  0.1771643328917388  0.5000106003109016
2  0.2173482491857856  0.5104976662250721  0.5000106003109016
2  0.5506815825191189  0.5104976662250721  0.5000106003109016
2  0.8840149158524523  0.5104976662250721  0.5000106003109016
2  0.2173482491857856  0.8438309995584055  0.5000106003109016
2  0.5506815825191189  0.8438309995584055  0.5000106003109016
2  0.8840149158524523  0.8438309995584055  0.5000106003109016
2  0.0506825271214022  0.0104966191615505  0.5000106024812589
2  0.3840158604547355  0.0104966191615505  0.5000106024812589
2  0.7173491937880688  0.0104966191615505  0.5000106024812589
2  0.0506825271214022  0.3438299524948838  0.5000106024812589
2  0.3840158604547355  0.3438299524948838  0.5000106024812589
2  0.7173491937880688  0.3438299524948838  0.5000106024812589
2  0.0506825271214022  0.6771632858282171  0.5000106024812589
2  0.3840158604547355  0.6771632858282171  0.5000106024812589
2  0.7173491937880688  0.6771632858282171  0.5000106024812589
/

输入命令:alm alamode.sug.in > alm.log1,产生以下文件:

准备openmx的输入文件,格式如下,注意原子位置用的是分数坐标:

#
#  This was generated by OpenMX Viewer

System.CurrrentDirectory         ./
System.Name                     abc
level.of.stdout                   1
level.of.fileout                  1
DATA.PATH /public/sourcecode/openmx_DATA19
Species.Number                     2
<Definition.of.Atomic.Species
  C     C6.0-s2p2d1      C_PBE19
  Zn    Zn6.0H-s3p2d1    Zn_PBE19H
Definition.of.Atomic.Species>

Atoms.Number                       54
Atoms.SpeciesAndCoordinates.Unit   FRAC
<Atoms.SpeciesAndCoordinates
  1     Zn    0.1340160   0.2604970   0.5000120    10.0  10.0
  2     Zn    0.4673490   0.2604970   0.5000120    10.0  10.0
  3     Zn    0.8006830   0.2604970   0.5000120    10.0  10.0
  4     Zn    0.1340160   0.5938300   0.5000120    10.0  10.0
  5     Zn    0.4673490   0.5938300   0.5000120    10.0  10.0
  6     Zn    0.8006830   0.5938300   0.5000120    10.0  10.0
  7     Zn    0.1340160   0.9271640   0.5000120    10.0  10.0
  8     Zn    0.4673490   0.9271640   0.5000120    10.0  10.0
  9     Zn    0.8006830   0.9271640   0.5000120    10.0  10.0
  10    Zn    0.1340230   0.0938230   0.5000150    10.0  10.0
  11    Zn    0.4673560   0.0938230   0.5000150    10.0  10.0
  12    Zn    0.8006890   0.0938230   0.5000150    10.0  10.0
  13    Zn    0.1340230   0.4271560   0.5000150    10.0  10.0
  14    Zn    0.4673560   0.4271560   0.5000150    10.0  10.0
  15    Zn    0.8006890   0.4271560   0.5000150    10.0  10.0
  16    Zn    0.1340230   0.7604900   0.5000150    10.0  10.0
  17    Zn    0.4673560   0.7604900   0.5000150    10.0  10.0
  18    Zn    0.8006890   0.7604900   0.5000150    10.0  10.0
  19    Zn    0.3006990   0.0938490   0.5000120    10.0  10.0
  20    Zn    0.6340330   0.0938490   0.5000120    10.0  10.0
  21    Zn    0.9673660   0.0938490   0.5000120    10.0  10.0
  22    Zn    0.3006990   0.4271820   0.5000120    10.0  10.0
  23    Zn    0.6340330   0.4271820   0.5000120    10.0  10.0
  24    Zn    0.9673660   0.4271820   0.5000120    10.0  10.0
  25    Zn    0.3006990   0.7605160   0.5000120    10.0  10.0
  26    Zn    0.6340330   0.7605160   0.5000120    10.0  10.0
  27    Zn    0.9673660   0.7605160   0.5000120    10.0  10.0
  28    Zn    0.9673440   0.2605030   0.5000090    10.0  10.0
  29    Zn    0.3006780   0.2605030   0.5000090    10.0  10.0
  30    Zn    0.6340110   0.2605030   0.5000090    10.0  10.0
  31    Zn    0.9673440   0.5938370   0.5000090    10.0  10.0
  32    Zn    0.3006780   0.5938370   0.5000090    10.0  10.0
  33    Zn    0.6340110   0.5938370   0.5000090    10.0  10.0
  34    Zn    0.9673440   0.9271700   0.5000090    10.0  10.0
  35    Zn    0.3006780   0.9271700   0.5000090    10.0  10.0
  36    Zn    0.6340110   0.9271700   0.5000090    10.0  10.0
  37    C     0.2173480   0.1771640   0.5000110    2.0  2.0
  38    C     0.5506820   0.1771640   0.5000110    2.0  2.0
  39    C     0.8840150   0.1771640   0.5000110    2.0  2.0
  40    C     0.2173480   0.5104980   0.5000110    2.0  2.0
  41    C     0.5506820   0.5104980   0.5000110    2.0  2.0
  42    C     0.8840150   0.5104980   0.5000110    2.0  2.0
  43    C     0.2173480   0.8438310   0.5000110    2.0  2.0
  44    C     0.5506820   0.8438310   0.5000110    2.0  2.0
  45    C     0.8840150   0.8438310   0.5000110    2.0  2.0
  46    C     0.0506830   0.0104970   0.5000110    2.0  2.0
  47    C     0.3840160   0.0104970   0.5000110    2.0  2.0
  48    C     0.7173490   0.0104970   0.5000110    2.0  2.0
  49    C     0.0506830   0.3438300   0.5000110    2.0  2.0
  50    C     0.3840160   0.3438300   0.5000110    2.0  2.0
  51    C     0.7173490   0.3438300   0.5000110    2.0  2.0
  52    C     0.0506830   0.6771630   0.5000110    2.0  2.0
  53    C     0.3840160   0.6771630   0.5000110    2.0  2.0
  54    C     0.7173490   0.6771630   0.5000110    2.0  2.0
Atoms.SpeciesAndCoordinates>

Atoms.UnitVectors.Unit             Ang
<Atoms.UnitVectors
  15.9091570   0.0000000   0.0000000
  -0.0000997   15.9099390   0.0000000
  0.0000000   0.0000000   33.4249000
Atoms.UnitVectors>

scf.XcType                    GGA-PBE
scf.SpinPolarization          off
scf.ElectronicTemperature     300.0
scf.energycutoff              220.0
scf.maxIter                   100
scf.EigenvalueSolver          band
scf.Kgrid                     8 8 1
scf.Mixing.Type               rmm-diisk
scf.Init.Mixing.Weight        0.05
scf.Min.Mixing.Weight         0.01
scf.Max.Mixing.Weight         0.30
scf.Mixing.History            25
scf.Mixing.StartPulay         15
scf.criterion                 1.0e-7

MD.Type                       nomd
MD.maxIter                    1
MD.TimeStep                   1.0
MD.Opt.criterion              0.0003
输入命令:python /public/sourcecode/alamode/displace.py --OpenMX=open.in --mag=0.01 -pf Zn4C2.pattern_HARMONIC,这时会自动产生移动过原子位置的openmx的输入文件,如下图所示:

在不同的文件夹里分别计算openmx,提交任务:

提取力常数,使用命令python /public/sourcecode/alamode/extract.py --OpenMX=open.in 1/*.out 2/*.out 3/*.out 4/*.out > DFSET_harmonic

修改alamode.in,修改MODE = optimize,添加&fitting
DFSET = DFSET_harmonic
/

如下所示:

&general
  PREFIX = Zn4C2
  MODE = optimize
  NAT = 54; NKD = 2
  KD = Zn C
/

&optimize
 DFSET = DFSET_harmonic
/

&interaction
  NORDER = 1  # 1: harmonic, 2: cubic, ..
/

&cell
  1 # factor in Bohr unit 1 Bohr=0.529 Ang
    8.4159408337399428969    0.0069432991603821279    0.0000000000000000
    -0.0069958065312216651   8.4163544933777715788    0.0000000000000000
     0.0000000000000000    0.0000000000000000   17.6817721290421001058
/

&cutoff 
  Zn-Zn None
  Zn-C None
  C-C None
/

&position
1  0.1340160431457570  0.2604971085026859  0.5000117824032253
1  0.4673493764790904  0.2604971085026859  0.5000117824032253
1  0.8006827098124237  0.2604971085026859  0.5000117824032253
1  0.1340160431457570  0.5938304418360192  0.5000117824032253
1  0.4673493764790904  0.5938304418360192  0.5000117824032253
1  0.8006827098124237  0.5938304418360192  0.5000117824032253
1  0.1340160431457570  0.9271637751693526  0.5000117824032253
1  0.4673493764790904  0.9271637751693526  0.5000117824032253
1  0.8006827098124237  0.9271637751693526  0.5000117824032253
1  0.1340227522993775  0.0938228645741257  0.5000154217712736
1  0.4673560856327109  0.0938228645741257  0.5000154217712736
1  0.8006894189660441  0.0938228645741257  0.5000154217712736
1  0.1340227522993775  0.4271561979074590  0.5000154217712736
1  0.4673560856327109  0.4271561979074590  0.5000154217712736
1  0.8006894189660441  0.4271561979074590  0.5000154217712736
1  0.1340227522993775  0.7604895312407924  0.5000154217712736
1  0.4673560856327109  0.7604895312407924  0.5000154217712736
1  0.8006894189660441  0.7604895312407924  0.5000154217712736
1  0.3006993664971728  0.0938491529580903  0.5000123477693514
1  0.6340326998305060  0.0938491529580903  0.5000123477693514
1  0.9673660331638394  0.0938491529580903  0.5000123477693514
1  0.3006993664971728  0.4271824862914236  0.5000123477693514
1  0.6340326998305060  0.4271824862914236  0.5000123477693514
1  0.9673660331638394  0.4271824862914236  0.5000123477693514
1  0.3006993664971728  0.7605158196247569  0.5000123477693514
1  0.6340326998305060  0.7605158196247569  0.5000123477693514
1  0.9673660331638394  0.7605158196247569  0.5000123477693514
1  0.9673444000838377  0.2605032485784750  0.5000092522639722
1  0.3006777334171710  0.2605032485784750  0.5000092522639722
1  0.6340110667505043  0.2605032485784750  0.5000092522639722
1  0.9673444000838377  0.5938365819118083  0.5000092522639722
1  0.3006777334171710  0.5938365819118083  0.5000092522639722
1  0.6340110667505043  0.5938365819118083  0.5000092522639722
1  0.9673444000838377  0.9271699152451417  0.5000092522639722
1  0.3006777334171710  0.9271699152451417  0.5000092522639722
1  0.6340110667505043  0.9271699152451417  0.5000092522639722
2  0.2173482491857856  0.1771643328917388  0.5000106003109016
2  0.5506815825191189  0.1771643328917388  0.5000106003109016
2  0.8840149158524523  0.1771643328917388  0.5000106003109016
2  0.2173482491857856  0.5104976662250721  0.5000106003109016
2  0.5506815825191189  0.5104976662250721  0.5000106003109016
2  0.8840149158524523  0.5104976662250721  0.5000106003109016
2  0.2173482491857856  0.8438309995584055  0.5000106003109016
2  0.5506815825191189  0.8438309995584055  0.5000106003109016
2  0.8840149158524523  0.8438309995584055  0.5000106003109016
2  0.0506825271214022  0.0104966191615505  0.5000106024812589
2  0.3840158604547355  0.0104966191615505  0.5000106024812589
2  0.7173491937880688  0.0104966191615505  0.5000106024812589
2  0.0506825271214022  0.3438299524948838  0.5000106024812589
2  0.3840158604547355  0.3438299524948838  0.5000106024812589
2  0.7173491937880688  0.3438299524948838  0.5000106024812589
2  0.0506825271214022  0.6771632858282171  0.5000106024812589
2  0.3840158604547355  0.6771632858282171  0.5000106024812589
2  0.7173491937880688  0.6771632858282171  0.5000106024812589
/

输入命令:alm alamode.in > alm.log2,产生.xml文件

准备官网第四步文件phband.in,主要是晶格常数,这里是没有扩胞的,添加k点路径,如下,之后执行命令anphon phband.in > phband.log,

&general
PREFIX = omx
MODE = phonons
FCSXML = Zn4C2.xml
NKD = 2
KD = Zn C
/

&cell # in Bohr, 1 Bohr=0.529 Ang
1.0
     2.8053136112466476323    0.0023144330534607093    0.0000000000000000
    -0.0023319355104072217    2.8054514977925907026    0.0000000000000000
     0.0000000000000000    0.0000000000000000   17.6817721290421001058
/

&kpoint
1 # KPMODE = 1: line mode
G 0.00000 0.00000 0.00000 R 0.50000 0.50000 0.00000 101
R 0.50000 0.50000 0.00000 Y 0.00000 0.50000 0.00000 101
Y 0.00000 0.50000 0.00000 G 0.00000 0.00000 0.00000 101
G 0.00000 0.00000 0.00000 X 0.50000 0.00000 0.00000 101
/

产生了omx.band文件,即为声子谱

详细可见alamode官网:

7. Tutorial — ALAMODE 1.4.0 documentation

Comments to: alamode+openmx计算声子谱

您的邮箱地址不会被公开。 必填项已用 * 标注