forked from npshub/mantid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AbinsLoadCRYSTALTest.py
57 lines (44 loc) · 2.6 KB
/
AbinsLoadCRYSTALTest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
import unittest
import abins.test_helpers
import abins.input
from abins.input import CRYSTALLoader
class AbinsLoadCRYSTALTest(unittest.TestCase, abins.input.Tester):
def tearDown(self):
abins.test_helpers.remove_output_files(list_of_names=["_LoadCRYSTAL"])
# *************************** USE CASES *********************************************
# ===================================================================================
# | Use cases: Gamma point calculation for CRYSTAL |
# ===================================================================================
_gamma_crystal = "crystalB3LYP_LoadCRYSTAL"
_set_crystal = "crystal_set_key_LoadCRYSTAL"
# ===================================================================================
# | Use case: Molecular calculation for CRYSTAL |
# ===================================================================================
_molecule = "toluene_molecule_LoadCRYSTAL"
# ===================================================================================
# | Use case: Molecular calculation with CRYSTAL17 |
# ===================================================================================
_molecule17 = "toluene_molecule_LoadCRYSTAL17"
# ===================================================================================
# | Use cases: Phonon dispersion calculation for CRYSTAL |
# ===================================================================================
_phonon_dispersion_v1 = "mgo-GX_LoadCRYSTAL"
_phonon_dispersion_v2 = "MgO-222-DISP_LoadCRYSTAL"
def test_gamma_crystal(self):
self.check(name=self._gamma_crystal, loader=CRYSTALLoader)
self.check(name=self._set_crystal, loader=CRYSTALLoader)
def test_molecule(self):
self.check(name=self._molecule, loader=CRYSTALLoader)
def test_molecule17(self):
self.check(name=self._molecule17, loader=CRYSTALLoader)
def test_phonon_dispersion_crystal(self):
self.check(name=self._phonon_dispersion_v1, loader=CRYSTALLoader)
self.check(name=self._phonon_dispersion_v2, loader=CRYSTALLoader)
if __name__ == '__main__':
unittest.main()