File: test_python.py

package info (click to toggle)
libmbd 0.12.8-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 700 kB
  • sloc: f90: 7,222; python: 1,512; ansic: 127; makefile: 48; sh: 12
file content (16 lines) | stat: -rw-r--r-- 456 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import pytest
from pytest import approx

from pymbd import mbd_energy_species


@pytest.mark.no_scalapack
def test_ethylcarbamate(ethylcarbamate):
    enes = [
        mbd_energy_species(
            coords, species, vol_ratios, 0.83, lattice=lattice, k_grid=k_grid
        )
        for coords, lattice, k_grid, species, vol_ratios in ethylcarbamate
    ]
    ene_int = enes[0] - 2 * enes[1]
    assert ene_int == approx(-0.037040868610822564, rel=1e-10)