24小时热门版块排行榜    

CyRhmU.jpeg
查看: 6178  |  回复: 20

刘仕晨

木虫 (正式写手)

引用回帖:
7楼: Originally posted by gemucai at 2013-03-14 14:40:14
如何测赝势,可以参见castep的帖子,过程是一样的:
http://muchong.com/bbs/viewthread.php?tid=5153783

LDA还是GGA,参见此帖:
http://muchong.com/bbs/viewthread.php?tid=5464861&fpage=1...

您好,谢谢,也即是说测试赝势主要是看跑出来的结果和文献进行比对,相差不大即可;我昨天也找了下资料,总结了下,也就是说一般LDA包括PAW ,PZ ;GGA包括PBE、PW91、B88-P86、BLYP,然后不能混用,所有的元素要么都用PBE的,要么都用PW91的,对吧,是这样的吧?
11楼2013-03-15 14:56:10
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

goldenfisher

金虫 (著名写手)

★ ★
WDD880227: 金币+2, 多谢指教 2013-03-27 10:22:06
OK.
既然你是金属,在计算nscf的时候就必须设置nbnd,而且必须设置为电子占据能带数目的1.2倍以上(程序的说明文件里面有详细说明)。
为什么在scf的时候不需要呢?因为在scf计算的时候,你设置了smearing,程序自动为你多设置了部分能带。而如果不设置nbnd又没有设置smearing,程序默认的是电子占据的满能带数,也就是电子数目的一半,这对金属而言是不对的。至于为什么不对,我以前的帖子讲过很多了,固体物理里面也应该学过。
12楼2013-03-15 21:12:32
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

刘仕晨

木虫 (正式写手)

楼主我跑了你的结果,不过很可惜,我所有都没有问题,当然部分参数和你设置的不一样,但是我在最后用xcrysden打开的时候却出现了问题,打不开,erro?
13楼2013-03-15 21:38:38
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

xiaoqiu007

新虫 (小有名气)

引用回帖:
13楼: Originally posted by 刘仕晨 at 2013-03-15 21:38:38
楼主我跑了你的结果,不过很可惜,我所有都没有问题,当然部分参数和你设置的不一样,但是我在最后用xcrysden打开的时候却出现了问题,打不开,erro?

贴出来看看,哪里不一样,我学习下。
14楼2013-03-16 00:10:54
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

xiaoqiu007

新虫 (小有名气)

“学习任何软件,最好的办法是阅读其manual和解读其例子文件”,作为对这一至理名言的响应,下面贴出我对espresso-5.0.2\PP\examples\example02中计算费米面例子文件的粗浅理解,尽管很不成熟,但是是用我自己的话写出来的,而不是笼统地说去看量子力学或固体物理书籍。
      诚然,万变不离其宗,任何第一性原理软件都与下列参数有关:波函数、哈密尔顿量、能量特征值,薛定谔方程。 但遇到具体问题的时候,薛定谔并不能给我们答案。因此,欢迎大家对下面的example02 进行进一步解读或拍砖。
      在写这篇帖子的时候,程序已经运行完毕,利用XCrySDen成功画出费米面,如下图所示。在此,要感谢manul、感谢example02、感谢侯博、感谢百度、感谢google、感谢小木虫上众网友参与的讨论....

                 
                        图1 PWscf计算结果                                           图2 CASTEP计算结果
      
     

2. \espresso-5.0.2\PP\examples\example02

2.1 Read me

This example shows how to use pw.x to calculate the DOS of Ni     and how to plot the Fermi Surface using XCrysDen【可见,费米面不是算的,是从其他步骤的计算结果中提取数据画的】

The calculation proceeds as follows (for the meaning of the cited input variables see the appropriate INPUT_* file)

1) make a self-consistent calculation for Ni (like in example 1).    (input=ni.scf.in, output=ni.scf.out)

2) make a band structure calculation for Ni (input=ni.dos.in,   output=ni.dos.out) on a uniform k-point grid (automatically
   generated).【可以在均匀的网格上进行带结构计算,而不用取高对称性点?】
         In this example the Fermi level is calculated with the    tetrahedra method (not in the actual band structure calculation but in
   the subsequent DOS calculation). 【VASP中计算态密度时也推荐用tetrahedra method方法】If preferred, a gaussian broadening  may be specified in this or in the subsequent step.

3) the program dos.x reads file filpun (ni.pun) and calculates the DOS on a  uniform grid of energies from Emin to Emax, with grid step Delta E.
   The output DOS is in file ni.dos, ready for plotting. 【如何设定uniform grid?为什么要求uniform grid】

4) the program projfwc.x projects the crystal wavefunctions on an    orthogonalized basis set of atomic orbitals, calculates the Loewdin
   charges, spilling parameter, and the projected DOS (total DOS in file    'ni.pdos_tot', s and d componentin files 'ni.pdos_atm#1(Ni)_wfc#1(s)'
   and 'ni.pdos_atm#1(Ni)_wfc#2(d)' respectively).  (input=ni.pdos.in,   output=ni.pdos.in)

5) Fermi Surface plot, courtesy of    Eyvaz Isaev
      Theoretical Physics Department;   Moscow State Institute of Steel and Alloys;   (eyvaz_isaev@yahoo.com, e.isaev@misis.ru)
          【斯人已于2011年离世】
a.  First, one generates a  grid of k-points (all of them, not only those  in the Irreducible Brilloin Zone) using auxiliary code kvecs_FS.x
      【kvecs_FS.x   产生的k点网格不仅仅在不可约布里渊区怎么理解?】
   
b. Then, the non-scf calculation is performed【非自洽计算到底有什么用】
c.   Then, auxiliary code bands_FS.x collects the data and produces a   file ni.fs.bxsf that can be read by XCrySDen (www.xcrysden.org) as:
      xcrysden --bxsf ni.fs.bxsf


   Additional info for customization of the script: 【脚本中的用户定义部分】
#
# A user has to edit so-called "user part" in order to define some required parameters.
#
#(1)  Sysname   - a nickname for your system
#(2)  Calc_Type - The Fermi Surface calculations (FS) or band-structure   calculations (Band) which will be included later.
#             Presently band-structure calculations could be carried out    by means ofplotband.xfrom PP (postprocessing) directory     or a little package #             distributed by E.Isaev (posted to pw_forum).
#(3)  nabc      - a number for dividing of each edge of a parallelepiped【平行六面体】.      Be careful, the total number of generated k-points is
#                     (na+1)*(nb+1)*(nc+1), i.e. including \Gamma-point. 及如果定义为16*16*8=2048个,则实际为 (16+1)*(16+1)*(8+1)=2601个
# (4) n_start   - starting band's number for the Fermi Surface calculations.    It is obvious, we have to deal with the bands crossing the  Fermi level.
#                      【怎样确定该值】
# (5) n_last    - last band's number for FS calculations  【怎样确定该值;应小于nbnd数值?!】
#
# That's all!!! Present values in the script(may be edited):
Sysname='ni'
Calc_Type='FS'
nabc=' 16 16 16 '
n_start=2
n_last=5
#
#
# Nota Bene : You cantake morebands andthen choosefrom a XCrySDen menu   only those bands which cross the Fermi level   
# Nota Bene : If you have mistaken choosing bands to be considered for the FS construction, you do not need to restart all calculations.
#            Just edit "bands_FS" file and restart "bands_FS.x" manually. 【设置错了也没有关系,只需修改bands_FS 文件(是源文件bands_#     FS.f90?)即可】    It will read     Bands.out and result Bands.bxsf which you can rename as you like.
#  



2.2 run_example
#!/bin/sh

# run from directory where this script is
cd `echo $0 | sed 's/\(.*\)\/.*/\1/'` # extract pathname
EXAMPLE_DIR=`pwd`

# check whether echo has the -e option
if test "`echo -e`" = "-e" ; then ECHO=echo ; else ECHO="echo -e" ; fi

$ECHO
$ECHO "$EXAMPLE_DIR : starting"
$ECHO
$ECHO "This example shows how to use PostProc codes to calculate the DOS of Ni."

# set the needed environment variables
. ../../../environment_variables

# required executables and pseudopotentials
BIN_LIST="pw.x dos.x projwfc.x kvecs_FS.x bands_FS.x"
PSEUDO_LIST="Ni.pz-nd-rrkjus.UPF"

$ECHO
$ECHO "  executables directory: $BIN_DIR"
$ECHO "  pseudo directory:      $PSEUDO_DIR"
$ECHO "  temporary directory:   $TMP_DIR"
$ECHO "  checking that needed directories and files exist...\c"

# check for directories
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
    if test ! -d $DIR ; then
        $ECHO
        $ECHO "ERROR: $DIR not existent or not a directory"
        $ECHO "Aborting"
        exit 1
    fi
done
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
    if test ! -d $DIR ; then
        mkdir $DIR
    fi
done
cd $EXAMPLE_DIR/results

# check for executables
for FILE in $BIN_LIST ; do
    if test ! -x $BIN_DIR/$FILE ; then
        $ECHO
        $ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
        $ECHO "Aborting"
        exit 1
    fi
done

# check for gnuplot
GP_COMMAND=`which gnuplot 2>/dev/null`
if [ "$GP_COMMAND" = "" ]; then
        $ECHO
        $ECHO "gnuplot not in PATH"
        $ECHO "Results will not be plotted"
fi

# check for pseudopotentials
for FILE in $PSEUDO_LIST ; do
    if test ! -r $PSEUDO_DIR/$FILE ; then
       $ECHO
       $ECHO "Downloading $FILE to $PSEUDO_DIR...\c"
            $WGET $PSEUDO_DIR/$FILE $NETWORK_PSEUDO/$FILE 2> /dev/null
    fi
    if test $? != 0; then
        $ECHO
        $ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
        $ECHO "Aborting"
        exit 1
    fi
done
$ECHO " done"

# how to run executables
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
DOS_COMMAND="$PARA_PREFIX $BIN_DIR/dos.x $PARA_POSTFIX"
PROJWFC_COMMAND="$PARA_PREFIX $BIN_DIR/projwfc.x $PARA_POSTFIX"
KVECS_COMMAND="$BIN_DIR/kvecs_FS.x "
BANDS_COMMAND="$BIN_DIR/bands_FS.x "
$ECHO
$ECHO "  running pw.x as:      $PW_COMMAND"
$ECHO "  running dos.x as:     $DOS_COMMAND"
$ECHO "  running projwfc.x as: $PROJWFC_COMMAND"
$ECHO "  running gnuplot as:   $GP_COMMAND"
$ECHO "  running kvecs_FS.x as:  $KVECS_COMMAND"
$ECHO "  running bands_FS.x as:  $BANDS_COMMAND"
$ECHO

# clean TMP_DIR
$ECHO "  cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
$ECHO " done"
【以上均为环境变量定义部分,下面的内容才是核心】


# self-consistent calculation
cat > ni.scf.in << EOF
&control
    calculation='scf'
    restart_mode='from_scratch',
    prefix='ni',
    pseudo_dir = '$PSEUDO_DIR/',
    outdir='$TMP_DIR/'
/
&system
    ibrav=2, celldm(1) =6.48, nat=1, ntyp=1,
    nspin = 2,  starting_magnetization(1)=0.7,
    ecutwfc = 24.0, ecutrho = 288.0,
    occupations='smearing', smearing='methfessel-paxton', degauss=0.02  
/
&electrons
    conv_thr = 1.0e-10
    mixing_beta = 0.7
/
ATOMIC_SPECIES
Ni 58.69 Ni.pz-nd-rrkjus.UPF
ATOMIC_POSITIONS
Ni 0.0 0.0 0.0
K_POINTS
  60
   0.0625000  0.0625000  0.0625000   1.00
   0.0625000  0.0625000  0.1875000   3.00
   0.0625000  0.0625000  0.3125000   3.00
   0.0625000  0.0625000  0.4375000   3.00
   0.0625000  0.0625000  0.5625000   3.00
   0.0625000  0.0625000  0.6875000   3.00
   0.0625000  0.0625000  0.8125000   3.00
   0.0625000  0.0625000  0.9375000   3.00
   0.0625000  0.1875000  0.1875000   3.00
   0.0625000  0.1875000  0.3125000   6.00
   0.0625000  0.1875000  0.4375000   6.00
   0.0625000  0.1875000  0.5625000   6.00
   0.0625000  0.1875000  0.6875000   6.00
   0.0625000  0.1875000  0.8125000   6.00
   0.0625000  0.1875000  0.9375000   6.00
   0.0625000  0.3125000  0.3125000   3.00
   0.0625000  0.3125000  0.4375000   6.00
   0.0625000  0.3125000  0.5625000   6.00
   0.0625000  0.3125000  0.6875000   6.00
   0.0625000  0.3125000  0.8125000   6.00
   0.0625000  0.3125000  0.9375000   6.00
   0.0625000  0.4375000  0.4375000   3.00
   0.0625000  0.4375000  0.5625000   6.00
   0.0625000  0.4375000  0.6875000   6.00
   0.0625000  0.4375000  0.8125000   6.00
   0.0625000  0.4375000  0.9375000   6.00
   0.0625000  0.5625000  0.5625000   3.00
   0.0625000  0.5625000  0.6875000   6.00
   0.0625000  0.5625000  0.8125000   6.00
   0.0625000  0.6875000  0.6875000   3.00
   0.0625000  0.6875000  0.8125000   6.00
   0.0625000  0.8125000  0.8125000   3.00
   0.1875000  0.1875000  0.1875000   1.00
   0.1875000  0.1875000  0.3125000   3.00
   0.1875000  0.1875000  0.4375000   3.00
   0.1875000  0.1875000  0.5625000   3.00
   0.1875000  0.1875000  0.6875000   3.00
   0.1875000  0.1875000  0.8125000   3.00
   0.1875000  0.3125000  0.3125000   3.00
   0.1875000  0.3125000  0.4375000   6.00
   0.1875000  0.3125000  0.5625000   6.00
   0.1875000  0.3125000  0.6875000   6.00
   0.1875000  0.3125000  0.8125000   6.00
   0.1875000  0.4375000  0.4375000   3.00
   0.1875000  0.4375000  0.5625000   6.00
   0.1875000  0.4375000  0.6875000   6.00
   0.1875000  0.4375000  0.8125000   6.00
   0.1875000  0.5625000  0.5625000   3.00
   0.1875000  0.5625000  0.6875000   6.00
   0.1875000  0.6875000  0.6875000   3.00
   0.3125000  0.3125000  0.3125000   1.00
   0.3125000  0.3125000  0.4375000   3.00
   0.3125000  0.3125000  0.5625000   3.00
   0.3125000  0.3125000  0.6875000   3.00
   0.3125000  0.4375000  0.4375000   3.00
   0.3125000  0.4375000  0.5625000   6.00
   0.3125000  0.4375000  0.6875000   6.00
   0.3125000  0.5625000  0.5625000   3.00
   0.4375000  0.4375000  0.4375000   1.00
   0.4375000  0.4375000  0.5625000   3.00
EOF
$ECHO "  running the scf calculation for Ni...\c"
$PW_COMMAND < ni.scf.in > ni.scf.out
check_failure $?
$ECHO " done"

#################################################################################
【自洽部分参数注释】:
# occupations用来设置确定电子占有数的方法,赋值为'smearing'表示采用smearing的方法来确定电子的占有数,随后须设置smearing和degauss关键词。smearing用来指明确定电子占有数的一种具体的smearing方法,赋值为'gaussian'表示采用Gaussian函数来确定电子占有数。degauss用来确定smearing方法中有关函数的展宽参数,赋值为0.02表示上面Gaussian函数中的展宽参数为0.02。 degauss 为0,相当于fixed-occupation的计算,即每个态的电子占有数是固定的。当体系为半导体或绝缘体时,可以设置degauss=0,其他情况下不能。
另:英文注释  
occupations      CHARACTER
'smearing':gaussian smearing formetalsrequires a value for degauss

'tetrahedra':  especially suited for calculation of DOS(see P.E. Bloechl, PRB49, 16223 (1994))  Requires uniform grid of k-points, automatically generated (see below) Not suitable (because not variational) for force/optimization/dynamics calculations

'fixed' :       forinsulators with a gap'from_input' :  The occupation are read from input file. Requires "nbnd" to be set in input


################################################################3333


# band structure calculation along Delta and Sigma lines
cat > ni.band.in << EOF
&control
   calculation='bands'   #【 与calculation='nscf' 有什么区别】
    restart_mode='from_scratch',
    prefix='ni',
    pseudo_dir = '$PSEUDO_DIR/',
    outdir='$TMP_DIR/'
/
&system
    ibrav=2, celldm(1) =6.48, nat=1, ntyp=1,
    nspin = 2,  starting_magnetization(1)=0.7,
    ecutwfc = 24.0, ecutrho = 288.0,
    occupations='smearing', smearing='methfessel-paxton', degauss=0.02   #【可形象地称为“金属开关”】
/
&electrons
    conv_thr = 1.0e-10
    mixing_beta = 0.7
/
ATOMIC_SPECIES
Ni 58.69 Ni.pz-nd-rrkjus.UPF
ATOMIC_POSITIONS
Ni 0.0 0.0 0.0
K_POINTS
97    #【这种k点怎么产生的,是pw-tools中的使用kpoint.x产生的吗】
1.000000000 0.000000000 0.000000000 1     #【这就是Delta点的crystal 坐标吗,怎么感觉与fcc通常高对称性点的取法不一致啊】
0.975000000 0.000000000 0.000000000 2
0.950000000 0.000000000 0.000000000 3
0.925000000 0.000000000 0.000000000 4
0.900000000 0.000000000 0.000000000 5
0.875000000 0.000000000 0.000000000 6
0.850000000 0.000000000 0.000000000 7
0.825000000 0.000000000 0.000000000 8
0.800000000 0.000000000 0.000000000 9
0.775000000 0.000000000 0.000000000 10
0.750000000 0.000000000 0.000000000 11
0.725000000 0.000000000 0.000000000 12
0.700000000 0.000000000 0.000000000 13
0.675000000 0.000000000 0.000000000 14
0.650000000 0.000000000 0.000000000 15
0.625000000 0.000000000 0.000000000 16
0.600000000 0.000000000 0.000000000 17
0.575000000 0.000000000 0.000000000 18
0.550000000 0.000000000 0.000000000 19
0.525000000 0.000000000 0.000000000 20
0.500000000 0.000000000 0.000000000 21
0.475000000 0.000000000 0.000000000 22
0.450000000 0.000000000 0.000000000 23
0.425000000 0.000000000 0.000000000 24
0.400000000 0.000000000 0.000000000 25
0.375000000 0.000000000 0.000000000 26
0.350000000 0.000000000 0.000000000 27
0.325000000 0.000000000 0.000000000 28
0.300000000 0.000000000 0.000000000 29
0.275000000 0.000000000 0.000000000 30
0.250000000 0.000000000 0.000000000 31
0.225000000 0.000000000 0.000000000 32
0.200000000 0.000000000 0.000000000 33
0.175000000 0.000000000 0.000000000 34
0.150000000 0.000000000 0.000000000 35
0.125000000 0.000000000 0.000000000 36
0.100000000 0.000000000 0.000000000 37
0.075000000 0.000000000 0.000000000 38
0.050000000 0.000000000 0.000000000 39
0.025000000 0.000000000 0.000000000 40
0.000000000 0.000000000 0.000000000 41
0.017857142 0.017857142 0.000000000 42
0.035714285 0.035714285 0.000000000 43
0.053571428 0.053571428 0.000000000 44
0.071428571 0.071428571 0.000000000 45
0.089285714 0.089285714 0.000000000 46
0.107142857 0.107142857 0.000000000 47
0.125000000 0.125000000 0.000000000 48
0.142857142 0.142857142 0.000000000 49
0.160714285 0.160714285 0.000000000 50
0.178571428 0.178571428 0.000000000 51
0.196428571 0.196428571 0.000000000 52
0.214285714 0.214285714 0.000000000 53
0.232142857 0.232142857 0.000000000 54
0.250000000 0.250000000 0.000000000 55
0.267857142 0.267857142 0.000000000 56
0.285714285 0.285714285 0.000000000 57
0.303571428 0.303571428 0.000000000 58
0.321428571 0.321428571 0.000000000 59
0.339285714 0.339285714 0.000000000 60
0.357142857 0.357142857 0.000000000 61
0.375000000 0.375000000 0.000000000 62
0.392857142 0.392857142 0.000000000 63
0.410714285 0.410714285 0.000000000 64
0.428571428 0.428571428 0.000000000 65
0.446428571 0.446428571 0.000000000 66
0.464285714 0.464285714 0.000000000 67
0.482142857 0.482142857 0.000000000 68
0.500000000 0.500000000 0.000000000 69
0.517857142 0.517857142 0.000000000 70
0.535714285 0.535714285 0.000000000 71
0.553571428 0.553571428 0.000000000 72
0.571428571 0.571428571 0.000000000 73
0.589285714 0.589285714 0.000000000 74
0.607142857 0.607142857 0.000000000 75
0.625000000 0.625000000 0.000000000 76
0.642857142 0.642857142 0.000000000 77
0.660714285 0.660714285 0.000000000 78
0.678571428 0.678571428 0.000000000 79
0.696428571 0.696428571 0.000000000 80
0.714285714 0.714285714 0.000000000 81
0.732142857 0.732142857 0.000000000 82
0.750000000 0.750000000 0.000000000 83
0.767857142 0.767857142 0.000000000 84
0.785714285 0.785714285 0.000000000 85
0.803571428 0.803571428 0.000000000 86
0.821428571 0.821428571 0.000000000 87
0.839285714 0.839285714 0.000000000 88
0.857142857 0.857142857 0.000000000 89
0.875000000 0.875000000 0.000000000 90
0.892857142 0.892857142 0.000000000 91
0.910714285 0.910714285 0.000000000 92
0.928571428 0.928571428 0.000000000 93
0.946428571 0.946428571 0.000000000 94
0.964285714 0.964285714 0.000000000 95
0.982142857 0.982142857 0.000000000 96
1.000000000 1.000000000 0.000000000 97   #【这应该是sigma点,在gama和sigma两点连线之间插入了95个点,用以积分或的精确的能量值】
EOF
$ECHO "  running the band-structure calculation for Ni...\c"
$PW_COMMAND < ni.band.in > ni.band.out
check_failure $?
$ECHO " done"

# K-resolved PDOS calculation along Delta and Sigma lines computed above
cat > ni.kpdos.in << EOF
&projwfc
    outdir='$TMP_DIR/'
    prefix='ni'
    ngauss=0, degauss=0.036748
    DeltaE=0.01
    kresolveddos=.true.
    filpdos='ni.k'
/
EOF
$ECHO "  running k-resolved PDOS calculation for Ni...\c"
$PROJWFC_COMMAND < ni.kpdos.in > ni.kpdos.out
check_failure $?
$ECHO " done"

#
#  if gnuplot was found, the results are plotted
#
if [ "$GP_COMMAND" = "" ]; then
    break
else
cat > gnuplot.tmp < #!$GP_COMMAND
#
set term png enh size 1000,500
set pm3d
set view 0,0
#
f(z)=z**(0.7)  # tune image contrast
ef=15.2874
#
unset xtics
set xtics out nomirror ("X" 1,"Gamma" 41,"K" 83, "X" 97)
set xra[1:97]
set label 1 "E-E_F(eV)" at 98,2.5
set ytics out nomirror
set yra [-10.9:20.9]
unset ztics
unset key
unset colorbox
#
set out 'kpdos_up.png'
set origin 0,0
set size 1,1
set multiplot
dx=.1 ; dy=.30   # reduce margins
set title offset 0,-7
set size 1./3+1.4*dx,1.+2*dy
set origin 0./3-dx,0-dy
set title "Total DOS"
splot 'ni.k.pdos_tot' u 1\$2-ef)f(\$3)) w pm3d
set origin 1./3-dx,0-dy
set title "s-DOS"
splot 'ni.k.pdos_atm#1(Ni)_wfc#1(s)' u 1\$2-ef)f(\$3)) w pm3d
set origin 2./3-dx,0-dy
set title "d-DOS"
splot 'ni.k.pdos_atm#1(Ni)_wfc#2(d)' u 1\$2-ef)f(\$3)) w pm3d
unset multiplot
#
set out 'kpdos_dw.png'
set origin 0,0
set size 1,1
set multiplot
dx=.1 ; dy=.30   # reduce margins
set title offset 0,-7
set size 1./3+1.4*dx,1.+2*dy
set origin 0./3-dx,0-dy
set title "Total DOS"
splot 'ni.k.pdos_tot' u 1\$2-ef)f(\$4)) w pm3d
set origin 1./3-dx,0-dy
set title "s-DOS"
splot 'ni.k.pdos_atm#1(Ni)_wfc#1(s)' u 1\$2-ef)f(\$4)) w pm3d
set origin 2./3-dx,0-dy
set title "d-DOS"
splot 'ni.k.pdos_atm#1(Ni)_wfc#2(d)' u 1\$2-ef)f(\$4)) w pm3d
unset multiplot
#
EOF
$ECHO
$ECHO "  plotting k-resolved DOS ...\c"
$GP_COMMAND < gnuplot.tmp
$ECHO " done"
rm gnuplot.tmp
fi



########################### DOS calculation for Ni##############################


# DOS calculation for Ni
cat > ni.dos.in << EOF
&control
    calculation='nscf'
    prefix='ni',
    pseudo_dir = '$PSEUDO_DIR/',
    outdir='$TMP_DIR/'
/
&system
    ibrav=2, celldm(1) =6.48, nat=1, ntyp=1,
    nspin = 2,  starting_magnetization(1)=0.7,
    ecutwfc = 24.0, ecutrho = 288.0, nbnd=8,
    occupations='tetrahedra'
/
&electrons
    conv_thr = 1.0e-10
    mixing_beta = 0.7
/
ATOMIC_SPECIES
Ni 58.69 Ni.pz-nd-rrkjus.UPF
ATOMIC_POSITIONS
Ni 0.0 0.0 0.0
K_POINTS {automatic}
12 12 12 0 0 0
EOF

cat > ni.dos2.in << EOF
&dos
    outdir='$TMP_DIR/'
    prefix='ni'
    fildos='ni.dos',
    Emin=5.0, Emax=25.0, DeltaE=0.1
/
EOF

$ECHO "  running DOS calculation for Ni...\c"
$PW_COMMAND < ni.dos.in > ni.dos.out
check_failure $?
$DOS_COMMAND < ni.dos2.in > ni.dos2.out
check_failure $?
$ECHO " done"

cat > ni.pdos.in << EOF
&projwfc
    outdir='$TMP_DIR/'
    prefix='ni'
    Emin=5.0, Emax=25.0, DeltaE=0.1
    ngauss=1, degauss=0.02
/
EOF
$ECHO "  running PDOS calculation for Ni...\c"
$PROJWFC_COMMAND < ni.pdos.in > ni.pdos.out
check_failure $?
$ECHO " done"

$ECHO

###############Fermi Surface plot Spin-Polarized case..."########################################


$ECHO "  Fermi Surface plot Spin-Polarized case..."

# self-consistent calculation - Spin-Polarized (SP) case

cat > ni.scf_SP.in << EOF
&control
    calculation='scf'
    restart_mode='from_scratch',
    prefix='ni',
    pseudo_dir = '$PSEUDO_DIR/',
    outdir='$TMP_DIR/'
/
&system
    ibrav=2, celldm(1) =6.48, nat=1, ntyp=1,
    ecutwfc = 24.0, ecutrho = 288.0,
    occupations='smearing',
    smearing='methfessel-paxton',
    degauss=0.02
    nspin=2,
    starting_magnetization(1)=0.8
/
&electrons
    conv_thr = 1.0e-10
    mixing_beta = 0.7
/
ATOMIC_SPECIES
Ni 58.69 Ni.pz-nd-rrkjus.UPF
ATOMIC_POSITIONS
Ni 0.0 0.0 0.0
K_POINTS {automatic}
8 8 8 0 0 0
EOF
$ECHO "  running the scf calculation  spin-polarization ... \c"
$PW_COMMAND < ni.scf_SP.in > ni.scf0.SP.out
check_failure $?
$ECHO " done"

#
# prepare input file ni.fs_SP.in
#
Sysname='ni'
nabc=' 16 16 16 '
n_start=3
n_last=6
#
E_Fermi=`grep Fermi ni.scf0.SP.out | cut -c 26-36`
a1=`grep 'b(1)' ni.scf0.SP.out | cut -c 24-54`
a2=`grep 'b(2)' ni.scf0.SP.out | cut -c 24-54`
a3=`grep 'b(3)' ni.scf0.SP.out | cut -c 24-54`

cat > kvecs_FS.in < $a1
$a2
$a3
$nabc
$Sysname
EOF

$KVECS_COMMAND < kvecs_FS.in > kvecs_FS.out
check_failure $?
###############################【以下为非自洽计算? calculation='bands'】
cat > ni.fs_SP.in << EOF
&control
    calculation='bands'
    prefix='ni',
    pseudo_dir = '$PSEUDO_DIR/',
    outdir='$TMP_DIR/'
    verbosity='high'
/
&system
    ibrav=2,
    celldm(1) =6.48,
    nat=1,
    ntyp=1,
    ecutwfc = 24.0,
    ecutrho = 288.0,
    nbnd=8
    nspin=2,
    starting_magnetization(1)=0.8
/
&electrons
    diagonalization='cg'
    conv_thr = 1.0e-10
    mixing_beta = 0.7
/
ATOMIC_SPECIES
Ni 58.69 Ni.pz-nd-rrkjus.UPF
ATOMIC_POSITIONS
Ni 0.0 0.0 0.0
K_POINTS            #【这是均匀的k网格点吗】
EOF

cat  kvecs_$Sysname >> ni.fs_SP.in

# input file ni.fs.in ready
$ECHO "  running the Fermi Surface calculation ... \c"
$PW_COMMAND   < ni.fs_SP.in > ni.fs.SP.out
check_failure $?
$ECHO " done"

# prepare input data (input_FS, Bands.out) for bands_FS

mv ni.fs.SP.out Bands_SP.out

cat > input_FS < $n_start  $n_last
$E_Fermi
$Sysname
$nabc
$a1
$a2
$a3
EOF

$BANDS_COMMAND bands_fs.out
check_failure $?
mv Bands_FS_up.bxsf    $Sysname.fs_up.bxsf
mv Bands_FS_down.bxsf  $Sysname.fs_down.bxsf



###########【以上自旋极化情形下的fermi 面计算完毕】########################################

##################

$ECHO
$ECHO "  Fermi Surface plot Non-Spin-Polarized (NSP) case..."

# self-consistent calculation - Non-Spin-Polarised case

cat > ni.scf_NSP.in << EOF
&control
    calculation='scf'
    restart_mode='from_scratch',
    prefix='ni',
    pseudo_dir = '$PSEUDO_DIR/',
    outdir='$TMP_DIR/'
/
&system
    ibrav=2, celldm(1) =6.48, nat=1, ntyp=1,
    ecutwfc = 24.0, ecutrho = 288.0,
   occupations='smearing',
    smearing='methfessel-paxton',
    degauss=0.02
/
&electrons
    conv_thr = 1.0e-10
    mixing_beta = 0.7
/
ATOMIC_SPECIES
Ni 58.69 Ni.pz-nd-rrkjus.UPF
ATOMIC_POSITIONS
Ni 0.0 0.0 0.0
K_POINTS {automatic}
8 8 8 0 0 0
EOF
$ECHO "  running the scf calculation  non spin-polarized case ... \c"
$PW_COMMAND < ni.scf_NSP.in > ni.scf0.NSP.out
check_failure $?
$ECHO " done"

#
# prepare input file ni.fs.in
#
Sysname='ni'
nabc=' 16 16 16 '
n_start=3
n_last=6
#
E_Fermi=`grep Fermi ni.scf0.NSP.out | cut -c 26-36`
a1=`grep 'b(1)' ni.scf0.NSP.out | cut -c 24-54`
a2=`grep 'b(2)' ni.scf0.NSP.out | cut -c 24-54`
a3=`grep 'b(3)' ni.scf0.NSP.out | cut -c 24-54`

cat > kvecs_FS.in < $a1
$a2
$a3
$nabc
$Sysname
EOF

$KVECS_COMMAND < kvecs_FS.in > kvecs_FS.out

cat > ni.fs_NSP.in << EOF
&control
   calculation='bands'   #【新版的非自洽计算统一用calculation='bands'代替老版的calculation='nscf'】
    prefix='ni',
    pseudo_dir = '$PSEUDO_DIR/',
    outdir='$TMP_DIR/'
    verbosity='high'
/
&system
    ibrav=2,
    celldm(1) =6.48,
    nat=1,
    ntyp=1,
    ecutwfc = 24.0,
    ecutrho = 288.0,
    nbnd=8
/
&electrons
    diagonalization='cg'
    conv_thr = 1.0e-10
    mixing_beta = 0.7
/
ATOMIC_SPECIES
Ni 58.69 Ni.pz-nd-rrkjus.UPF
ATOMIC_POSITIONS
Ni 0.0 0.0 0.0
K_POINTS
EOF

cat  kvecs_$Sysname >> ni.fs_NSP.in

# input file ni.fs.in ready
$ECHO "  running the Fermi Surface calculation ... \c"
$PW_COMMAND   < ni.fs_NSP.in > ni.fs_NSP.out
check_failure $?
$ECHO " done"

# prepare input data (input_FS, Bands.out) for bands_FS

mv ni.fs_NSP.out Bands_NSP.out

cat > input_FS < $n_start  $n_last
$E_Fermi
$Sysname
$nabc
$a1
$a2
$a3
EOF

$BANDS_COMMAND < Bands_NSP.out > bands_fs.out
check_failure $?
mv Bands_FS.bxsf  ni.fs_NSP.bxsf

$ECHO
$ECHO "  Fermi surface plot: use 'xcrysden --bxsf ni.fs_NSP.bxsf' to plot ...\c"
$ECHO " done"

$ECHO
$ECHO "$EXAMPLE_DIR: done"
15楼2013-03-16 04:34:41
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

gemucai

木虫 (正式写手)

引用回帖:
11楼: Originally posted by 刘仕晨 at 2013-03-15 14:56:10
您好,谢谢,也即是说测试赝势主要是看跑出来的结果和文献进行比对,相差不大即可;我昨天也找了下资料,总结了下,也就是说一般LDA包括PAW ,PZ ;GGA包括PBE、PW91、B88-P86、BLYP,然后不能混用,所有的元素要么都 ...

测试赝势主要指测试其收敛性:ecutrho、degauss、k mesh。后面有一点小错误,在这里纠正一下:
PAW是与模守恒和超软相提并论的,它既可能是LDA也可能是GGA。
16楼2013-03-16 15:31:10
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

刘仕晨

木虫 (正式写手)

引用回帖:
16楼: Originally posted by gemucai at 2013-03-16 15:31:10
测试赝势主要指测试其收敛性:ecutrho、degauss、k mesh。后面有一点小错误,在这里纠正一下:
PAW是与模守恒和超软相提并论的,它既可能是LDA也可能是GGA。...

谢谢,我看VASP里我们的pot文件夹就是PAW,那个我学习pwscf第一个学习的也是画fermi surface,我可以画出Ni和Cu的,但是我在重复楼主的Sc的时候,用xcrysden画图的时候报错了,我现在有几个问题,1:nbnd=?到底怎么确定,看到有人回复为电子占据能带数的1.2倍以上,这个电子能带数又怎么知道,我是这样判断的,我打开自洽计算的out文件,在每一个K点下面都会有一些band的能量,我和fermi energy比较,最后相差太大的舍去,然后确定nbnd=多少;2,n_start=?n_last=?又是怎么确定,我还是看out文件,看fermi energy在那些能带附件,然后确定他们的值,不知道对不对,我这样判断;3,产生密集K点应该试差值法产生K点阿,为什么example里产生密集K点直接写16*16*16就可以了么,难道直接是把自洽计算里K的加大就可以了么,谢谢,问题有点多了,谢谢您的帮助!
17楼2013-03-16 16:32:52
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

刘仕晨

木虫 (正式写手)

我贴出我的计算文件:
自洽计算的输入文件Sc.scf.in:
&control
    calculation='scf'
    restart_mode='from_scratch',
    prefix='Sc',
    pseudo_dir = '/home/liushichen/tools/codes/espresso-4.3.2/pseudo/',
    outdir='/home/liushichen/test/pwscf/Sc/tmp/'
/
&system
    ibrav=0,  nat=2, ntyp=1,
    ecutwfc = 90.0, ecutrho = 360.0,
    occupations='smearing',
    smearing='methfessel-paxton',
    degauss=0.02
/
&electrons
    conv_thr = 1.0e-10
    mixing_beta = 0.7
/
ATOMIC_SPECIES
Sc  44.9559  Sc.pbe-nsp-van.UPF
CELL_PARAMETERS {bohr}
6.254820382  0.00000000  0.00000000
-3.127410191  5.41683334  0.00000000
0.000000000  0.00000000  9.958412336
ATOMIC_POSITIONS
Sc 0.3333333333333286 0.6666666666666714 0.2500000000000000
Sc 0.6666666666666714 0.3333333333333286 0.7500000000000000
K_POINTS {automatic}
8 8 4 0 0 0
结果out文件Sc.scf.out:
  k = 0.5000-0.1443 0.3140 (  4850 PWs)   bands (ev):

   -40.4164 -40.1151 -20.1426 -19.6609 -19.0252 -18.6124 -18.3986 -18.1634
     7.2095   7.8539   8.8840   9.4878  10.0353  10.1131  11.4003

          k = 0.5000 0.0000 0.1570 (  4866 PWs)   bands (ev):

   -40.4904 -40.0394 -20.0570 -19.5507 -19.1466 -18.6097 -18.4595 -18.1934
     7.3593   7.9480   8.2176   9.2913   9.6094  10.2659  11.4677

     the Fermi energy is     8.7862 ev

!    total energy              =    -188.48683113 Ry
     Harris-Foulkes estimate   =    -188.48683113 Ry
     estimated scf accuracy    <          1.0E-11 Ry
没有全部给出,只给出部分,我就看的这部分的 Fermi energy和上面的K 点的band的能量,我就通过这里判断的,然后计算nbnd=14的,不知道对不对?
产生密集K点
Sysname='Sc'
nabc=' 16 16 8 '
n_start=9
n_last=14
#
E_Fermi=`grep Fermi Sc.scf.out | cut -c 26-36`
a1=`grep 'b(1)' Sc.scf.out | cut -c 24-54`
a2=`grep 'b(2)' Sc.scf.out | cut -c 24-54`
a3=`grep 'b(3)' Sc.scf.out | cut -c 24-54`

cat > kvecs_FS.in < $a1
$a2
$a3
$nabc
$Sysname
EOF
进行非自洽计算,Sc.fs.in:
Sysname='Sc'

cat > Sc.fs.in << EOF
&control
    calculation='nscf'
    prefix='Sc',
    pseudo_dir = '/home/liushichen/tools/codes/espresso-4.3.2/pseudo/',
    outdir='/home/liushichen/test/pwscf/Sc/tmp/'
/
&system
    ibrav=0,
    nat=2,
    ntyp=1,
    ecutwfc = 90.0,
    ecutrho = 360.0,
    nbnd=14

/
&electrons
    diagonalization='cg'
    conv_thr = 1.0e-10
    mixing_beta = 0.7
/
ATOMIC_SPECIES
Sc  44.9559  Sc.pbe-nsp-van.UPF
CELL_PARAMETERS {bohr}
6.254820382  0.00000000  0.00000000
-3.127410191  5.41683334  0.00000000
0.000000000  0.00000000  9.958412336
ATOMIC_POSITIONS
Sc 0.3333333333333286 0.6666666666666714 0.2500000000000000
Sc 0.6666666666666714 0.3333333333333286 0.7500000000000000
K_POINTS
EOF

cat  kvecs_$Sysname >> Sc.fs.in
然后进行计算,最后处理得出Bands_FS.bxsf文件,准备画图,然后xcrysden报错,ERROR: Error reading BANDGRID_3D_ section, while reading
贴出Bands_FS.bxsf文件的前部分:
BEGIN_INFO
   #
   # this is a Band-XCRYSDEN-Structure-File
   # aimed at Visualization of Fermi Surface
   #
   # Case:   Sc                                                                              
   #
Fermi Energy:          8.7862
END_INFO
BEGIN_BLOCK_BANDGRID_3D
band_energies
BANDGRID_3D_BANDS
    6
   17   17    9
  0.000000  0.000000  0.000000
  1.000000  0.577350 -0.000000
  0.000000  1.154701  0.000000
  0.000000 -0.000000  0.628094
帮忙看下,那里出了问题,你不是已经计算出来了么,谢谢了
18楼2013-03-16 16:42:14
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

gemucai

木虫 (正式写手)

★ ★
WDD880227: 金币+2, 多谢您的耐心指教 2013-03-27 10:23:42
引用回帖:
17楼: Originally posted by 刘仕晨 at 2013-03-16 16:32:52
谢谢,我看VASP里我们的pot文件夹就是PAW,那个我学习pwscf第一个学习的也是画fermi surface,我可以画出Ni和Cu的,但是我在重复楼主的Sc的时候,用xcrysden画图的时候报错了,我现在有几个问题,1:nbnd=?到底怎么 ...

1.nbnd的确定
首先电子是费米子,那么一条能带上只能呆两个电子,这个没问题吧?

然后看你的每种元素的赝势文件,里面给出一定数量的外层电子,将每个原子的外层电子相加,然后除以二,是不是就是总的有电子占据的能带数目?

其实对于绝缘体来说,能带数目取外层电子总数的一半就够了,除非你想算能隙,所以nbnd=体系外层电子数的一半

对于金属来说,最高能量的电子穿过好几条能带,它们很容易被激发,那么所选取的能带总数要大于一半的外层电子数,默认为电子数一半的1.2倍。你也可以取多一点,无妨。

2.n_start 和n_last
你的理解是对的,就是穿过费米面的能带。

3.k点的产生
我不懂什么是试差值法,故无法给出回答,抱歉!
19楼2013-03-17 11:00:41
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

xiaoqiu007

新虫 (小有名气)

引用回帖:
18楼: Originally posted by 刘仕晨 at 2013-03-16 16:42:14
我贴出我的计算文件:
自洽计算的输入文件Sc.scf.in:
&control
    calculation='scf'
    restart_mode='from_scratch',
    prefix='Sc',
    pseudo_dir = '/home/liushichen/tools/codes/espresso-4 ...

(1)应将calculation='nscf'中的nscf改为'band';
新版PWscf的要求。
(2)您可以尝试Ca的费米面计算,我算完后不能重现文献中的结果,非常诡异。
20楼2013-03-27 10:10:50
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 xiaoqiu007 的主题更新
信息提示
请填处理意见