File: test_interpolate.py

package info (click to toggle)
python-ase 3.26.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,484 kB
  • sloc: python: 148,112; xml: 2,728; makefile: 110; javascript: 47
file content (15 lines) | stat: -rw-r--r-- 381 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# fmt: off
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