File: test_cutoffs.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-- 540 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
def test_cutoffs():
    from ase.neighborlist import natural_cutoffs
    from ase import Atoms
    import numpy as np

    atoms = Atoms("HCOPtAu")

    assert np.allclose(natural_cutoffs(atoms), [0.31, 0.76, 0.66, 1.36, 1.36])
    assert np.allclose(natural_cutoffs(atoms, mult=1.2), [0.372, 0.912, 0.792,
                                                          1.632, 1.632])
    assert np.allclose(natural_cutoffs(atoms, mult=1.2, Au=1), [0.372, 0.912,
                                                                0.792, 1.632, 1])