Skip to content

Commit

Permalink
update: cartesian by deafult
Browse files Browse the repository at this point in the history
  • Loading branch information
VsevolodX committed Sep 9, 2024
1 parent be5d67e commit f3a3216
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/py/mat3ra/made/tools/modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def displace_interface(
interface: Material,
displacement: List[float],
label: InterfacePartsEnum = InterfacePartsEnum.FILM,
use_cartesian_coordinates=False,
use_cartesian_coordinates=True,
) -> Material:
"""
Displace atoms in an interface along a certain direction.
Expand Down
4 changes: 3 additions & 1 deletion tests/py/unit/test_tools_modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ def test_displace_interface():
{"id": 4, "value": [0.766666667, 0.866666667, 0.911447347]},
]
expected_labels = GRAPHENE_NICKEL_INTERFACE["basis"]["labels"]
displaced_material = displace_interface(material, [0.1, 0.2, 0.3], InterfacePartsEnum.FILM)
displaced_material = displace_interface(
material, [0.1, 0.2, 0.3], InterfacePartsEnum.FILM, use_cartesian_coordinates=False
)
assertion_utils.assert_deep_almost_equal(expected_coordinates, displaced_material.basis.coordinates.to_dict())
assertion_utils.assert_deep_almost_equal(expected_labels, displaced_material.basis.labels.to_dict())

0 comments on commit f3a3216

Please sign in to comment.