陶豫 发表于 2022-6-9 13:22:17

vaspkit可视化KPATH出错

本帖最后由 陶豫 于 2022-6-9 13:32 编辑

大家好,我试图用vaspkit的功能 309) Visualize K-Path in First Brillouin Zone 可视化KPATH时出错,报错信息为:
Traceback (most recent call last):
File "/nfs-share/home/2001110394/vaspkit.1.3.3/utilities/vbz.py", line 221, in <module>
    visualize_BZ_matplotlib(bz,reciprocal_lattice_vectors,kpts,klabels,kpaths)
File "/nfs-share/home/2001110394/vaspkit.1.3.3/utilities/vbz.py", line 198, in visualize_BZ_matplotlib
    ax.set_box_aspect()
AttributeError: 'Axes3DSubplot' object has no attribute 'set_box_aspect'
相关输入文件如下:

POSCAR
C1 H7 Br3 N2 Pb1
1.0
      5.9509000778         0.0000000000         0.0000000000
      0.0000000000      11.7903003693         0.0000000000
       -0.4967546246         0.0000000000      11.8029513575
   Pb   Br    C    N    H
    4   12    4    8   28
Direct
(Atom positions omitted)

KPATH.in(与KPOINTS文件内容相同)
K-Path Generated by VASPKIT.
   20
Line-Mode
Reciprocal
   0.0000000000   0.0000000000   0.5000000000   B
   0.0000000000   0.0000000000   0.0000000000   GAMMA

   0.0000000000   0.0000000000   0.0000000000   GAMMA
   0.0000000000   0.5000000000   0.0000000000   Z

-0.5000000000   0.0000000000   0.0000000000   Y_2
   0.0000000000   0.0000000000   0.0000000000   GAMMA

   0.0000000000   0.0000000000   0.0000000000   GAMMA
-0.5000000000   0.0000000000   0.5000000000   A
系利用vaspkit自动生成之后只留下自己感兴趣的KPATH、删除其余KPATH得到的。

HIGH_SYMMETRY_POINTS
High-symmetry points (in fractional coordinates).
   0.00   0.00   0.00   GAMMA
   0.00   0.00   0.50   B
   0.00   0.50   0.00   Z
-0.50   0.00   0.00   Y_2
-0.50   0.00   0.50   A


If you use this module, please cite the following work:
V. Wang, N. Xu, J.-C. Liu, G. Tang, W.-T. Geng, VASPKIT: A User-friendly Interface Facilitating High-throughput Computing and Analysis Using VASP Code, Computer Physics Communications 267, 108033 (2021).
A. Togo and I. Tanaka, Spglib: a software library for crystal symmetry search, arXiv:1808.015900.
Y. Hinuma, G. Pizzi, Y. Kumagai, F. Oba, I. Tanaka, Band structure diagram paths based on crystallography, Computational Materials Science 128, 140 (2017).
请问如何解决?非常感谢!

vaspkit 发表于 2022-6-9 14:22:41

可先可视化VASPKIT直接生成的KPATH.文件(未改动)排除操作问题,如果依然有错误可能是由于matplotlib版本过高导致的兼容问题,降低matplotlib试试,运行比如pip3 install matplotlib==3.3.4 -i https://pypi.tuna.tsinghua.edu.cn/simple。

陶豫 发表于 2022-6-9 15:00:43

谢谢开发者,在他们的帮助下搞定了。
就是 matplotlib 版本问题。
pip install matplotlib==3.3.4

之后就全好了。
页: [1]
查看完整版本: vaspkit可视化KPATH出错