Skip to main content

PyPOSTB

从 POSCAR 文件直接计算紧束缚模型能带结构的 Python 包。

快速开始

1. 准备 POSCAR 文件

POSCAR 文件第一行需要包含参数:

dimr=3 dimk=3 hopping_decay=1.0
   1.00000000000000
     5.8896136042106519    0.0000000000000000    0.0000000000000000
     0.0000000000000000    7.7193960717810146    0.0000000000000000
     0.0000000000000000    0.0000000000000000    5.5735571936146364
   Mn   La   O
     4     4    12
Direct
  0.0000000000000000  0.0000000000000000  0.5000000000000000     1
  0.5000000000000000  0.5000000000000000  0.0000000000000000    -1
  ...

说明:

  • 第1行:dimr=3 dimk=3 hopping_decay=1.0 或 3 3 1(dimk dimr hopping_decay)
  • 第4列(可选):磁矩值

2. 准备 k 路径文件

创建 KPATH.in 或 KPOINTS 文件(必需,否则程序会报错):

K-Path Generated by VASPKIT.
   20
Line-Mode
Reciprocal
   0.0000000000   0.0000000000   0.0000000000     GAMMA
   0.5000000000   0.0000000000   0.0000000000     M
 ...

3. 运行计算

pypostb --poscar POSCAR --output band_structure

主要特性

  • ✅ 无需配置文件:所有参数从 POSCAR 文件读取
  • ✅ 自动计算最大距离:最大跃迁距离 = 最大晶格常数
  • ✅ 磁矩支持:从 POSCAR 坐标行读取磁矩
  • ✅ k 路径必需:从 KPATH.in 或 KPOINTS 读取(无则报错)

固定参数

  • min_distance: 0.1 埃
  • max_R_range: 2
  • max_distance: 自动设置为最大晶格常数

依赖

  • pythtb
  • numpy
  • matplotlib

更多信息

详细文档请参考 pyamtb.md。

Metadata

Release files for pypostb 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pypostb 0.3.0
File Size Uploaded
pypostb-0.3.0.tar.gz 20.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pypostb 0.3.0
File Interpreter ABI Platform
pypostb-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 36.6 kB

Release files / pypostb-0.3.0.tar.gz

Download URL pypostb-0.3.0.tar.gz
Size 20.2 kB
Tags Source
SHA-256 checksum
How to use checksums
269c46be4b5e56b576b1bfab8dac2c699b8a1304a7491b28383331383957bbaa
BLAKE2b-256 checksum
How to use checksums
a6763df217ce183da3a11b398adc87cf3c12db6e1c599182bb020503fb85441b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / pypostb-0.3.0-py3-none-any.whl

Download URL pypostb-0.3.0-py3-none-any.whl
Size 16.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ed06b1996b9f1f9f9ccde9ffc3f697fb164ffcb0403163e31d0552bc819c7e2
BLAKE2b-256 checksum
How to use checksums
dc72739371f1a9955676024092fe527b8fc07fa328c41866faa913f4ec192692
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page