1import pytest 2from ase.build import bulk 3from numpy.testing import assert_allclose 4 5 6@pytest.mark.calculator_lite 7@pytest.mark.calculator('nwchem') 8def test_main(factory): 9 atoms = bulk('C') 10 11 calc = factory.calc( 12 theory='pspw', 13 label='stress_test', 14 nwpw={'lmbfgs': None, 15 'tolerances': '1e-9 1e-9'}, 16 ) 17 atoms.calc = calc 18 19 assert_allclose(atoms.get_stress(), calc.calculate_numerical_stress(atoms), 20 atol=1e-3, rtol=1e-3) 21