File: test_interpolate.py

package info (click to toggle)
python-ase 3.24.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 15,448 kB
  • sloc: python: 144,945; xml: 2,728; makefile: 113; javascript: 47
file content (14 lines) | stat: -rw-r--r-- 370 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import numpy as np

from ase.dft.kpoints import monkhorst_pack_interpolate


def test_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