File: things.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 (14 lines) | stat: -rw-r--r-- 567 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from ase.dft.kpoints import monkhorst_pack

assert [0, 0, 0] in  monkhorst_pack((1, 3, 5)).tolist()
assert [0, 0, 0] not in  monkhorst_pack((1, 3, 6)).tolist()
assert len(monkhorst_pack((3, 4, 6))) == 3 * 4 * 6

from ase.units import Hartree, Bohr, kJ, mol, kcal, kB, fs
print(Hartree, Bohr, kJ/mol, kcal/mol, kB*300, fs, 1/fs)

from ase.build import bulk
hcp = bulk('X', 'hcp', a=1) * (2, 2, 1)
assert abs(hcp.get_distance(0, 3, mic=True) - 1) < 1e-12
assert abs(hcp.get_distance(0, 4, mic=True) - 1) < 1e-12
assert abs(hcp.get_distance(2, 5, mic=True) - 1) < 1e-12