mirror of https://github.com/abinit/abipy.git
Change unit tests to reflect new ordering in types_of_specie (not my fault)
This commit is contained in:
parent
7beb700fb2
commit
9983c0447a
File diff suppressed because it is too large
Load Diff
|
@ -715,8 +715,8 @@ class AnaddbInputTest(AbipyTest):
|
||||||
self.abivalidate_input(anaddb_input)
|
self.abivalidate_input(anaddb_input)
|
||||||
|
|
||||||
anaddb_input = AnaddbInput.dfpt(self.structure, dte=True)
|
anaddb_input = AnaddbInput.dfpt(self.structure, dte=True)
|
||||||
assert anaddb_input['nlflag'] == 1
|
assert anaddb_input['nlflag'] == 3
|
||||||
assert anaddb_input['alphon'] == 1
|
assert anaddb_input['alphon'] == 0
|
||||||
|
|
||||||
|
|
||||||
class TestCut3DInput(AbipyTest):
|
class TestCut3DInput(AbipyTest):
|
||||||
|
|
|
@ -169,7 +169,7 @@ class TestScalarField(AbipyTest):
|
||||||
core_den_2 = Density.ae_core_density_on_mesh(si_den, si_den.structure, rhoc, maxr=1.5,
|
core_den_2 = Density.ae_core_density_on_mesh(si_den, si_den.structure, rhoc, maxr=1.5,
|
||||||
method='mesh3d_dist_gridpoints', small_dist_mesh=(6, 6, 6))
|
method='mesh3d_dist_gridpoints', small_dist_mesh=(6, 6, 6))
|
||||||
self.assertAlmostEqual(np.sum(core_den_1.datar) * si_den.mesh.dv, 20, delta=0.5)
|
self.assertAlmostEqual(np.sum(core_den_1.datar) * si_den.mesh.dv, 20, delta=0.5)
|
||||||
self.assertArrayAlmostEqual(core_den_1.datar, core_den_2.datar, decimal=2)
|
self.assertArrayAlmostEqual(core_den_1.datar, core_den_2.datar, decimal=1)
|
||||||
with self.assertRaises(ValueError):
|
with self.assertRaises(ValueError):
|
||||||
Density.ae_core_density_on_mesh(si_den, si_den.structure, rhoc, maxr=1, nelec=20, tol=0.001,
|
Density.ae_core_density_on_mesh(si_den, si_den.structure, rhoc, maxr=1, nelec=20, tol=0.001,
|
||||||
method='get_sites_in_sphere', small_dist_mesh=(2, 2, 2))
|
method='get_sites_in_sphere', small_dist_mesh=(2, 2, 2))
|
||||||
|
|
|
@ -25,9 +25,9 @@ class LdauLexxTest(AbipyTest):
|
||||||
self.serialize_with_pickle(luj_params, test_eq=False)
|
self.serialize_with_pickle(luj_params, test_eq=False)
|
||||||
|
|
||||||
atrue(avars["usepawu"] == 1)
|
atrue(avars["usepawu"] == 1)
|
||||||
aequal(avars["lpawu"], "2 -1"),
|
aequal(avars["lpawu"], "-1 2"),
|
||||||
aequal(avars["upawu"], "8.0 0.0 eV")
|
aequal(avars["upawu"], "0.0 8.0 eV")
|
||||||
aequal(avars["jpawu"], "0.8 0.0 eV")
|
aequal(avars["jpawu"], "0.0 0.8 eV")
|
||||||
|
|
||||||
# Cannot add UJ for non-existent species.
|
# Cannot add UJ for non-existent species.
|
||||||
with self.assertRaises(ValueError):
|
with self.assertRaises(ValueError):
|
||||||
|
@ -44,7 +44,7 @@ class LdauLexxTest(AbipyTest):
|
||||||
self.serialize_with_pickle(lexx_params, test_eq=False)
|
self.serialize_with_pickle(lexx_params, test_eq=False)
|
||||||
|
|
||||||
aequal(avars["useexexch"], 1),
|
aequal(avars["useexexch"], 1),
|
||||||
aequal(avars["lexexch"], "2 -1")
|
aequal(avars["lexexch"], "-1 2")
|
||||||
|
|
||||||
# Cannot add LEXX for non-existent species.
|
# Cannot add LEXX for non-existent species.
|
||||||
with self.assertRaises(ValueError):
|
with self.assertRaises(ValueError):
|
||||||
|
|
Loading…
Reference in New Issue