24小时热门版块排行榜    

查看: 3153  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 投票:  有多少人是今天查系统知道结果的? +16 爱看书的可乐 2026-08-26 18/900 2026-08-29 10:18 by winsaint
[基金申请] 我就是申请一个面上项目而已,这评审意见是按照杰青的条件评的吧? +6 gouxfjh 2026-08-28 9/450 2026-08-29 09:59 by jklily
[考研] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +5 ASdOkHsho7FD 2026-08-28 8/400 2026-08-29 09:17 by G6APbkg8SA6w
[基金申请] 2026年叶企孙基金 +4 bud_bud 2026-08-27 7/350 2026-08-29 07:23 by foolishmani
[博后之家] 售SCI文章,我:8O.5.5.1O.54,科目全,可十急 +3 ASdOkHsho7FD 2026-08-28 4/200 2026-08-29 05:45 by gy1nBQXYQJqL
[基金申请] 国自然面上复盘~欢迎讨论 (金币+15) +13 晴天加油 2026-08-26 14/700 2026-08-28 18:36 by huagongfeihu
[基金申请] 系统查不到 +11 董八千 2026-08-26 11/550 2026-08-28 18:06 by Leogzhya
[基金申请] 申请删除本帖 +6 lyz123lyz 2026-08-27 7/350 2026-08-27 17:31 by 宁静致远sy
[基金申请] 基金未中,这种答复是模板吗? +5 zhaosm1982 2026-08-27 6/300 2026-08-27 16:00 by lfy8008
[基金申请] 我不理解! +15 Edward_pc 2026-08-26 23/1150 2026-08-26 20:34 by zzuzxg
[基金申请] 范进中举一文的中心思想 +9 炎黄贵胄 2026-08-22 10/500 2026-08-26 15:40 by semaglutide
[基金申请] 能否退出参与的面上项目解除限项 +23 koalala 2026-08-24 26/1300 2026-08-26 14:29 by 宝贝虫子
[基金申请] 出来了 +9 trojank 2026-08-26 9/450 2026-08-26 14:25 by 宝贝虫子
[基金申请] 为什么国自然不能直接公布 +4 bjdxyxy 2026-08-26 4/200 2026-08-26 13:12 by qingmu1201
[基金申请] 国合现在查不到了吗? +10 chengyan1220 2026-08-24 20/1000 2026-08-26 08:57 by peasantsprig
[基金申请] 牛来!米来!面来! +8 beefly 2026-08-26 8/400 2026-08-26 08:37 by xuzhipiao
[基金申请] 在坚冰还盖着北海的时候,我看到了怒放的梅花。 (金币+10) +6 ziyangfang 2026-08-25 9/450 2026-08-25 20:26 by huagongfeihu
[基金申请] 明天应该可查了!? +6 chengyan1220 2026-08-23 6/300 2026-08-25 19:45 by zfd97
[基金申请] 某些机构,以效率低为荣,以效率低作为存在感 +9 yuleib84 2026-08-25 10/500 2026-08-25 17:14 by alexon
[基金申请] 没有任何消息-是不是就凉了 +9 图啦图啦 2026-08-24 10/500 2026-08-25 11:59 by 南海小哥
信息提示
请填处理意见