Skip to main content

用于解析 vasp 输入和输出的工具集合

项目描述

工具

vasp 工具

构建状态 派皮

安装

pip install vasptools

命令行模式

$ vasptools -h
usage: vasptools [-h] [-p] [-ppath PATH] [-t] [-td PATH] [-s] [-D] [-V]
                 subcommand ...

VASPTOOLS

positional arguments:
  subcommand
    potcar              POTCAR
    incar               INCAR
    LISTSUBCOMMAND      list all sub commands, just for test

optional arguments:
  -h, --help            show this help message and exit
  -p, --preview         preview
  -ppath PATH, --potpath PATH
                        set vasppot_path, you could also set env VASPPOT
  -t, --test            run test
  -td PATH, --test_dir PATH
                        test_dir
  -s, --shell           shell mode, exec shell script
  -D, --DEBUG           debug
  -V                    show program's version number and exit
$ vasptools potcar -h
usage: vasptools potcar [-h] [-i PATH] [-d PATH] [-p PTYPE] [-l]
                        [pp_names [pp_names ...]]

positional arguments:
  pp_names

optional arguments:
  -h, --help            show this help message and exit
  -i PATH, --input PATH
                        Generate POTCAR with POSCAR
  -d PATH, --dirname PATH
                        directory to generate file
  -p PTYPE, --ptype PTYPE
                        potcar type, avail: ['potcar', 'potcarGGA', 'potpaw',
                        'potpaw_GGA', 'potpaw_PBE']
  -l, --list            list available potcar

波斯卡

>>> from vasptools import potcar
>>> potcar.get_potcar_content(pp_names=['H', 'He', 'Li', pp_type='potpaw_PBE')
' PAW_PBE H 15Jun2001\n 1.00000000000000000\n parameters from PSCTR are:\n   VRHFIN =H: ultrasoft test\n '
>>> potcar.gen_potcar(pp_names=['H'], pp_type='potpaw_PBE')

在车里

>>> from vasptools import incar
>>> incar_dict = incar.parse_incar(incarfile)
>>> print(incar_dict)
OrderedDict([('system', 'si series'), ('prec', 'accurate'), ('encut', '245.345'), ('ibrion', '-1'), ('nsw', '0'), ('nelmin', '2'), ('ediff', '1.0e-05'), ('ediffg', '-0.02'), ('voskown', '1'), ('nblock', '1'), ('lvtot', '.true.'), ('nelm', '60'), ('algo', 'fast   (blocked davidson)'), ('gga', 'pe'), ('ispin', '1'), ('iniwav', '1'), ('istart', '0'), ('icharg', '2'), ('lwave', '.false.'), ('lcharg', '.true.'), ('addgrid', '.false.'), ('lhyperfine', '.false.'), ('ismear', '0'), ('sigma', '0.2'), ('rwigs', '1.11')])
>>> print(output_incar(incar_dict))
system = si series
prec = accurate
encut = 245.345
ibrion = -1
nsw = 0
nelmin = 2

去做

  • 在车里
  • 波斯卡
  • 关键点
  • OUTCAR
  • 多斯卡
  • 中车
  • CHG
  • 波车

...

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

vasptools-0.6.1.tar.gz (19.0 kB 查看哈希

已上传 source

内置发行版

vasptools-0.6.1-py3.6.egg (58.2 kB 查看哈希

已上传 3 6

vasptools-0.6.1-py2.py3-none-any.whl (27.3 kB 查看哈希

已上传 py2 py3