File: test_interpolate.py

package info (click to toggle)
python-ase 3.21.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,936 kB
  • sloc: python: 122,428; xml: 946; makefile: 111; javascript: 47
file content (12 lines) | stat: -rw-r--r-- 376 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
def test_interpolate():
    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