|
7 | 7 | bohr2ang = LengthConversion("bohr", "angstrom").value()
|
8 | 8 |
|
9 | 9 |
|
10 |
| -class TestABACUSSinglePointEnergy: |
| 10 | +class TestABACUSLabeledOutput(unittest.TestCase): |
| 11 | + def setUp(self): |
| 12 | + shutil.copy("abacus.scf/INPUT.ok", "abacus.scf/INPUT") |
| 13 | + self.system_ch4 = dpdata.LabeledSystem("abacus.scf", fmt="abacus/scf") |
| 14 | + # self.system_h2o = dpdata.LabeledSystem('qe.scf/02.out',fmt='qe/pw/scf') |
| 15 | + self.system_ch4_unlabeled = dpdata.System( |
| 16 | + "abacus.scf/STRU.ch4", fmt="abacus/stru" |
| 17 | + ) |
| 18 | + |
| 19 | + def tearDown(self): |
| 20 | + if os.path.isfile("abacus.scf/INPUT"): |
| 21 | + os.remove("abacus.scf/INPUT") |
| 22 | + |
11 | 23 | def test_atom_names(self):
|
12 | 24 | self.assertEqual(self.system_ch4.data["atom_names"], ["C", "H"])
|
13 | 25 | # self.assertEqual(self.system_h2o.data['atom_names'], ['O','H'])
|
@@ -112,20 +124,6 @@ def test_energy(self):
|
112 | 124 | # self.assertAlmostEqual(self.system_h2o.data['energies'][0], ref_energy)
|
113 | 125 |
|
114 | 126 |
|
115 |
| -class TestABACUSLabeledOutput(unittest.TestCase, TestABACUSSinglePointEnergy): |
116 |
| - def setUp(self): |
117 |
| - shutil.copy("abacus.scf/INPUT.ok", "abacus.scf/INPUT") |
118 |
| - self.system_ch4 = dpdata.LabeledSystem("abacus.scf", fmt="abacus/scf") |
119 |
| - # self.system_h2o = dpdata.LabeledSystem('qe.scf/02.out',fmt='qe/pw/scf') |
120 |
| - self.system_ch4_unlabeled = dpdata.System( |
121 |
| - "abacus.scf/STRU.ch4", fmt="abacus/stru" |
122 |
| - ) |
123 |
| - |
124 |
| - def tearDown(self): |
125 |
| - if os.path.isfile("abacus.scf/INPUT"): |
126 |
| - os.remove("abacus.scf/INPUT") |
127 |
| - |
128 |
| - |
129 | 127 | class TestABACUSLabeledOutputFail(unittest.TestCase):
|
130 | 128 | def setUp(self):
|
131 | 129 | shutil.copy("abacus.scf/INPUT.fail", "abacus.scf/INPUT")
|
|
0 commit comments