Skip to content

Commit

Permalink
bring back DLSVolumePredictor unit test on small cells. The only way …
Browse files Browse the repository at this point in the history
…to bring this test <5 seconds is to reduce distance cutoff on small cells, which produces the same results in much less time.
  • Loading branch information
computron committed Sep 18, 2018
1 parent a41f292 commit f8463f2
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -89,6 +89,7 @@ class DLSVolumePredictorTest(PymatgenTest):

def test_predict(self):
p = DLSVolumePredictor()
p_fast = DLSVolumePredictor(cutoff=0.0) # for speed on compressed cells

fen = Structure.from_file(os.path.join(dir_path, "FeN_mp-6988.cif"))
self.assertAlmostEqual(p.predict(fen), 18.2252568873)
Expand All @@ -100,8 +101,8 @@ def test_predict(self):
lfpo = PymatgenTest.get_structure("LiFePO4")
lfpo.scale_lattice(10.1)
self.assertAlmostEqual(p.predict(lfpo), 291.62094410192924)
# lfpo.scale_lattice(0.2)
# self.assertAlmostEqual(p.predict(lfpo), 291.62094410192924)
lfpo.scale_lattice(0.2)
self.assertAlmostEqual(p_fast.predict(lfpo), 291.62094410192924)
lmpo = PymatgenTest.get_structure("LiFePO4")
lmpo.replace_species({"Fe": "Mn"})
self.assertAlmostEqual(p.predict(lmpo), 290.795329052)
Expand Down

0 comments on commit f8463f2

Please sign in to comment.