Skip to content

Commit

Permalink
update: fix nanoribbon armchair
Browse files Browse the repository at this point in the history
  • Loading branch information
VsevolodX committed Dec 28, 2024
1 parent bfd76c2 commit fb9210f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
33 changes: 16 additions & 17 deletions tests/py/unit/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,25 +547,24 @@
{"id": 15, "value": "C"},
],
"coordinates": [
{"id": 0, "value": [0.041666626, 0.35000005, 0.5]},
{"id": 1, "value": [0.208333376, 0.34999995, 0.5]},
{"id": 2, "value": [0.041666626, 0.55000005, 0.5]},
{"id": 3, "value": [0.208333376, 0.54999995, 0.5]},
{"id": 4, "value": [0.291666626, 0.45000005, 0.5]},
{"id": 5, "value": [0.458333376, 0.44999995, 0.5]},
{"id": 6, "value": [0.541666626, 0.35000005, 0.5]},
{"id": 7, "value": [0.708333376, 0.34999995, 0.5]},
{"id": 8, "value": [0.291666626, 0.65000005, 0.5]},
{"id": 9, "value": [0.458333376, 0.64999995, 0.5]},
{"id": 10, "value": [0.541666626, 0.55000005, 0.5]},
{"id": 11, "value": [0.708333376, 0.54999995, 0.5]},
{"id": 12, "value": [0.791666626, 0.45000005, 0.5]},
{"id": 13, "value": [0.958333376, 0.44999995, 0.5]},
{"id": 14, "value": [0.791666626, 0.65000005, 0.5]},
{"id": 15, "value": [0.958333376, 0.64999995, 0.5]},
{"id": 0, "value": [0.958333362, 0.35000006, 0.5]},
{"id": 1, "value": [0.791666617, 0.34999996, 0.5]},
{"id": 2, "value": [0.958333362, 0.550000054, 0.5]},
{"id": 3, "value": [0.791666617, 0.549999954, 0.5]},
{"id": 4, "value": [0.708333369, 0.450000057, 0.5]},
{"id": 5, "value": [0.541666624, 0.449999957, 0.5]},
{"id": 6, "value": [0.458333376, 0.35000006, 0.5]},
{"id": 7, "value": [0.291666631, 0.34999996, 0.5]},
{"id": 8, "value": [0.708333369, 0.650000051, 0.5]},
{"id": 9, "value": [0.541666624, 0.649999951, 0.5]},
{"id": 10, "value": [0.458333376, 0.550000054, 0.5]},
{"id": 11, "value": [0.291666631, 0.549999954, 0.5]},
{"id": 12, "value": [0.208333383, 0.450000057, 0.5]},
{"id": 13, "value": [0.041666638, 0.449999957, 0.5]},
{"id": 14, "value": [0.208333383, 0.650000051, 0.5]},
{"id": 15, "value": [0.041666638, 0.649999951, 0.5]},
],
"units": "crystal",
# "cell": [[8.546946738, 0.0, 0.0], [-0.0, 12.336455, 0.0], [0.0, 0.0, 20.0]],
"constraints": [],
"labels": [],
},
Expand Down
8 changes: 4 additions & 4 deletions tests/py/unit/test_tools_build_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def test_create_twisted_nanoribbon_interface():
builder = NanoRibbonTwistedInterfaceBuilder()
interface = builder.get_material(configuration)

exected_cell_vectors = [[10.990658, 0.0, 0.0], [-0.0, 11.549803, 0.0], [0.0, 0.0, 20.0]]
expected_coordinate = [0.552108738, 0.40054955, 0.65]
assertion_utils.assert_deep_almost_equal(exected_cell_vectors, interface.basis.cell.vectors_as_array)
expected_cell_vectors = [[15.102811, 0.0, 0.0], [0.0, 16.108175208, 0.0], [0.0, 0.0, 20.0]]
expected_coordinate = [0.704207885, 0.522108183, 0.65]
assertion_utils.assert_deep_almost_equal(expected_cell_vectors, interface.lattice.vectors)
assertion_utils.assert_deep_almost_equal(expected_coordinate, interface.basis.coordinates.values[42])


Expand All @@ -79,7 +79,7 @@ def test_create_commensurate_supercell_twisted_interface():
interfaces = builder.get_materials(config, post_process_parameters=config)
assert len(interfaces) == 1
interface = interfaces[0]
expected_cell_vectors =[[10.754672133, 0.0, 0.0],[5.377336066500001, 9.313819276550575, 0.0], [0.0, 0.0, 20.0]]
expected_cell_vectors = [[10.754672133, 0.0, 0.0], [5.377336066500001, 9.313819276550575, 0.0], [0.0, 0.0, 20.0]]
assertion_utils.assert_deep_almost_equal(expected_cell_vectors, interface.basis.cell.vectors_as_array)
expected_angle = 13.174
assert interface.metadata["build"]["configuration"]["actual_twist_angle"] == expected_angle

0 comments on commit fb9210f

Please sign in to comment.