Skip to content

Commit 512d8ac

Browse files
authored
Merge pull request #147 from Exabyte-io/feature/SOF-7607
update: add test for SiC poscar
2 parents 8d81e81 + ee1edfd commit 512d8ac

File tree

5 files changed

+31
-4
lines changed

5 files changed

+31
-4
lines changed

express/properties/material.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def derived_properties(self):
8585
derived_properties.extend(self._p_norms())
8686
# TODO: Determine how to avoid an eternal pass when one derived property fails
8787
except Exception as e:
88-
logging.info(f"NOTE: derived properties array is empty due to failure to calculate values. Exception: {e} ")
88+
logging.info(f"NOTE: derived properties are empty due to failure to calculate values. Exception: {e} ")
8989
print("NOTE: derived properties array is empty due to failure to calculate values.", e)
9090
pass
9191
return sorted(derived_properties, key=lambda x: x["name"])

tests/fixtures/data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:c6dfc86c91e91091a18ae8006cb9ba5d6d7e0935111273d1396ca78be82297df
3-
size 23287
2+
oid sha256:1856a70b24c1282e38835fbfdcdcdcb2ec4dac9cd0081bf88b66141412eeacf1
3+
size 24072
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
SiC
2+
1.0
3+
3.094884000 0.000000000 0.000000000
4+
-1.547442000 2.680248000 0.000000000
5+
0.000000000 0.000000000 15.184530000
6+
Si C Si C
7+
4 5 2 1
8+
direct
9+
0.333333000 0.666667000 0.832986000 Si
10+
0.666667000 0.333333000 0.332986000 Si
11+
0.666667000 0.333333000 0.666509000 Si
12+
0.000000000 0.000000000 0.000000000 Si
13+
0.000000000 0.000000000 0.874352000 C
14+
0.000000000 0.000000000 0.374352000 C
15+
0.333333000 0.666667000 0.708004000 C
16+
0.666667000 0.333333000 0.208004000 C
17+
0.666667000 0.333333000 0.541526000 C
18+
0.333333000 0.666667000 0.166509000 Si
19+
0.000000000 0.000000000 0.499723000 Si
20+
0.333333000 0.666667000 0.041526000 C

tests/integration/parsers/test_structure.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22

33
from express.parsers.structure import StructureParser
4-
from tests.fixtures.data import SI, JVASP_677
4+
from tests.fixtures.data import JVASP_677, SI, SiC
55
from tests.integration import IntegrationTestBase
66

77

@@ -40,3 +40,6 @@ def test_structure_jarvis_db_entry_basis(self):
4040

4141
def test_structure_jarvis_db_entry_lattice_bravais(self):
4242
self.assertDeepAlmostEqual(self.parser.lattice_bravais(), JVASP_677["lattice"], places=2)
43+
44+
def test_material_vasp_structure_order_of_elements(self):
45+
self.assertDeepAlmostEqual(self.parser.basis(), SiC["basis"], places=2)

tests/manifest.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,10 @@ test_material_from_structure:
247247
structurePath: fixtures/espresso/v5_4/test-001/pw-scf.in
248248
structureFormat: espresso-in
249249

250+
test_material_vasp_structure_order_of_elements:
251+
structurePath: fixtures/structural/test-003/POSCAR
252+
structureFormat: poscar
253+
250254
test_material_serialize_and_validate:
251255
workDir: fixtures/vasp/test-001
252256
stdoutFile: fixtures/vasp/test-001/vasp.out

0 commit comments

Comments
 (0)