24小时热门版块排行榜    

查看: 2856  |  回复: 6

weiyidan

新虫 (小有名气)

[求助] VASP2BOLTZTRAP求助

应用 vasp2boltztrap出现错误
/usr/local/lib/python2.7/dist-packages/ase/lattice/spacegroup.py:5: UserWarning: Moved to ase.spacegroup
  warnings.warn('Moved to ase.spacegroup')
Number of electrons not found. Please set the number manually in hte.intrans.
get_vasp_bandstructure(): could not find OUTCAR file <./OUTCAR>
Traceback (most recent call last):
  File "si.py", line 39, in <module>
    vasp2boltz.write_bandstructure_boltztrap(bs)
  File "/home/weiyidan/computing/电导率/vasp2boltz.py", line 100, in write_bandstructure_boltztrap
    if bandstructure['nspin']!=1:
TypeError: 'NoneType' object has no attribute '__getitem__'

poscar如下

NONDEFECT                              
   1.00000000000000     
     7.6802000999000004    0.0000000000000000    0.0000000000000000
     0.0000000000000000   10.8613996505999992    0.0000000000000000
     0.0000000000000000    0.0000000000000000    7.6802000999000004
   Si
    32
Direct
  0.0000000000000000  0.1250000000000000  0.5000000000000000
  0.7500000000000000  0.0000000000000000  0.0000000000000000
  0.0000000000000000  0.2500000000000000  0.7500000000000000
  0.0000000000000000  0.2500000000000000  0.2500000000000000
  0.2500000000000000  0.0000000000000000  0.0000000000000000
  0.0000000000000000  0.1250000000000000  0.0000000000000000
  0.2500000000000000  0.3750000000000000  0.7500000000000000
  0.5000000000000000  0.1250000000000000  0.0000000000000000
  0.2500000000000000  0.3750000000000000  0.2500000000000000
  0.2500000000000000  0.0000000000000000  0.5000000000000000
  0.5000000000000000  0.2500000000000000  0.2500000000000000
  0.5000000000000000  0.2500000000000000  0.7500000000000000
  0.7500000000000000  0.0000000000000000  0.5000000000000000
  0.7500000000000000  0.3750000000000000  0.7500000000000000
  0.5000000000000000  0.1250000000000000  0.5000000000000000
  0.7500000000000000  0.3750000000000000  0.2500000000000000
  0.0000000000000000  0.6250000000000000  0.5000000000000000
  0.7500000000000000  0.5000000000000000  0.0000000000000000
  0.0000000000000000  0.7500000000000000  0.7500000000000000
  0.0000000000000000  0.7500000000000000  0.2500000000000000
  0.2500000000000000  0.5000000000000000  0.0000000000000000
  0.0000000000000000  0.6250000000000000  0.0000000000000000
  0.2500000000000000  0.8750000000000000  0.7500000000000000
  0.5000000000000000  0.6250000000000000  0.0000000000000000
  0.2500000000000000  0.8750000000000000  0.2500000000000000
  0.2500000000000000  0.5000000000000000  0.5000000000000000
  0.5000000000000000  0.7500000000000000  0.2500000000000000
  0.5000000000000000  0.7500000000000000  0.7500000000000000
  0.7500000000000000  0.5000000000000000  0.5000000000000000
  0.7500000000000000  0.8750000000000000  0.7500000000000000
  0.5000000000000000  0.6250000000000000  0.5000000000000000
  0.7500000000000000  0.8750000000000000  0.2500000000000000
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

weiyidan

新虫 (小有名气)

我的 py
# Example of how to use vasp2boltz.py
# Create a .py file with a content similar to the following
# It is necessary to have ASE installed:
# https://wiki.fysik.dtu.dk/ase/

from ase import io
from ase.lattice.spacegroup import Spacegroup
import vasp2boltz

ao = io.read('POSCAR')
# If you do not have spglib installed, you need to add the spacegroup no.
# e.g. sg = Spacegroup(216) for the 'F -4 3 m' space group
# If you use the conventional cell rather than the primitive unit cell in your
# POSCAR file for e.g. I or F spacegroups, you need to add this information.

# Example 1:
sg = Spacegroup(10)
ao.info = {'spacegroup': sg}

# Example 2. Here the unit cell in the POSCAR file is cubic (conventional):
#sg = Spacegroup(10)
#ao.info = {'spacegroup': sg, 'unit_cell': 'conventional'}

# Read number of electrons from OUTCAR.
foundnelect = False
try:
    for line in open('OUTCAR', 'r'):
        if 'NELECT' in line:
            nelect = float(line.split()[2])
            foundnelect = True
except:
    pass
if not foundnelect:
    print 'Number of electrons not found. Please set the number manually in hte.intrans.'
    nelect = 1.0

# The remaining part takes care of writing the files required by BoltzTraP.
bs = vasp2boltz.get_vasp_bandstructure()
vasp2boltz.write_bandstructure_boltztrap(bs)
vasp2boltz.write_structure_boltztrap(ao)
vasp2boltz.write_intrans_boltztrap(n_electrons = nelect)
2楼2016-12-14 18:24:17
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

weiyidan

新虫 (小有名气)

去掉vasp2bolt中的289行一句话(and之后括号中)
3楼2016-12-15 13:43:44
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

weiyidan

新虫 (小有名气)

记得去除k的重复项
4楼2016-12-27 13:08:16
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

weiyidan

新虫 (小有名气)

记得去除k的重复项
5楼2016-12-27 13:09:32
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

weiyidan

新虫 (小有名气)

记得去除k的重复项
6楼2016-12-27 13:11:21
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

零耳朵

新虫 (小有名气)

k的重复项是啥?
7楼2017-12-22 09:20:06
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 weiyidan 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 265求调剂 +9 梁梁校校 2026-03-19 9/450 2026-03-20 12:33 by lature00
[考研] 【考研调剂】化学专业 281分,一志愿四川大学,诚心求调剂 +6 吃吃吃才有意义 2026-03-19 6/300 2026-03-20 10:47 by 尽舜尧1
[考研] 一志愿 南京航空航天大学大学 ,080500材料科学与工程学硕 +4 @taotao 2026-03-20 4/200 2026-03-20 10:37 by EBSD
[考研] 0817 化学工程 299分求调剂 有科研经历 有二区文章 +20 rare12345 2026-03-18 20/1000 2026-03-20 08:42 by 无际的草原
[考研] 294求调剂材料与化工专硕 +14 陌の森林 2026-03-18 14/700 2026-03-19 22:38 by 学员8dgXkO
[考研] 本人考085602 化学工程 专硕 +17 不知道叫什么! 2026-03-15 19/950 2026-03-19 15:06 by 尽舜尧1
[考研] 求调剂,一志愿:南京航空航天大学大学 ,080500材料科学与工程学硕,总分289分 +3 @taotao 2026-03-19 3/150 2026-03-19 14:07 by peike
[考研] 一志愿天大材料与化工(085600)总分338 +5 蔡大美女 2026-03-13 5/250 2026-03-19 10:44 by 是小刘呀~
[教师之家] 焦虑 +9 水冰月月野兔 2026-03-13 13/650 2026-03-19 09:50 by otani
[考研] 0703化学 305求调剂 +4 FY_yy 2026-03-14 4/200 2026-03-19 05:54 by anny19840123
[考研] 328求调剂,英语六级551,有科研经历 +3 生物工程调剂 2026-03-17 7/350 2026-03-18 20:41 by Wangjingyue
[考研] 一志愿武理材料305分求调剂 +5 想上岸的鲤鱼 2026-03-18 6/300 2026-03-18 17:53 by 无际的草原
[考研] 297求调剂 +8 戏精丹丹丹 2026-03-17 8/400 2026-03-18 14:30 by laoshidan
[考研] 收复试调剂生 +4 雨后秋荷 2026-03-18 4/200 2026-03-18 14:16 by elevennnne
[考研] 278求调剂 +5 烟火先于春 2026-03-17 5/250 2026-03-18 08:43 by 星空星月
[考研] 308求调剂 +4 是Lupa啊 2026-03-16 4/200 2026-03-17 17:12 by ruiyingmiao
[考研] 085601求调剂 +4 Du.11 2026-03-16 4/200 2026-03-17 17:08 by ruiyingmiao
[考研] 中科院材料273求调剂 +4 yzydy 2026-03-15 4/200 2026-03-16 15:59 by Gaodh_82
[考研] 085601材料工程315分求调剂 +3 yang_0104 2026-03-15 3/150 2026-03-15 10:58 by peike
[考研] 招收0805(材料)调剂 +3 18595523086 2026-03-13 3/150 2026-03-14 00:33 by 123%、
信息提示
请填处理意见