File: interpolate.py

package info (click to toggle)
python-ase 3.17.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 16,340 kB
  • sloc: python: 117,348; makefile: 91
file content (11 lines) | stat: -rw-r--r-- 316 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
import numpy as np
from ase.dft.kpoints import monkhorst_pack_interpolate

eps = [0, 1, 2]
path = [[0, 0, 0], [-0.25, 0, 0]]
bz2ibz = [0, 1, 1, 2]
x = monkhorst_pack_interpolate(path, eps, np.eye(3), bz2ibz,
                               [2, 2, 1], [0.25, 0.25, 0])
print(x)
assert abs(x - [0, 0.5]).max() < 1e-10