我用的是蟒蛇。为了绘制波段结构,我遵循了下面的代码
#!/usr/bin/env python
'''
adapted from https://wiki.fysik.dtu.dk/dacapo/Examples#calculating-a-band-diagram
'''
from ase import *
from ase.calculators.jacapo import *
b = 3.61/2.
bulk = Atoms([Atom('Cu',(0,0,0))],
cell=[[0,b,b],
[b,0,b],
[b,b,0]])
calc = Jacapo('2.5.1-Cu.nc',
pw=340,
nbands=8,
symmetry=True,
kpts=(10,10,10),debug=100)
bulk.set_calculator(calc)
# run the calculation
energy = calc.get_potential_energy()请访问以下链接:
Plotting band Strucures
我安装了Atomic Simulation Environment (ASE)模块。但是当我运行它时,错误告诉我缺少名为Scientific的模块。
Traceback (most recent call last):
File "filename.py", line 6, in <module>
from ase.calculators.jacapo import *
File "/home/username/anaconda/lib/python2.7/site-packages/ase/calculators/jacapo/__init__.py", line 1, in <module>
import Scientific
ImportError: No module named Scientific如果有帮助,/home/username/anaconda/lib/python2.7/site-packages/ase/calculators/jacapo/中的__init__.py文件会显示为:
import Scientific
assert [int(x) for x in Scientific.__version__.split('.')] >= [2, 8]
from ase.calculators.jacapo.jacapo import *我一直试图找到真正的科学包并安装它,但都是徒劳的。任何帮助都是非常感谢的。
发布于 2016-04-12 06:10:19
我认为你可能需要安装Scientific,它不是随ASE一起提供的,因为它可能只依赖于某些计算器。Here is a link to Scientific python's installation page.
https://stackoverflow.com/questions/36554667
复制相似问题