-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update/SOF-7461 Update: various cleanups #165
Conversation
src/py/mat3ra/made/tools/analyze.py
Outdated
@@ -492,6 +492,8 @@ def get_local_extremum_atom_index( | |||
Returns: | |||
int: id of the atom with the minimum or maximum z-coordinate. | |||
""" | |||
if len(coordinate) == 2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be handled before invoking the function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll use decorator
@@ -174,7 +175,11 @@ def create_adatom( | |||
def _calculate_coordinate_from_position_and_distance( | |||
self, material: Material, position_on_surface: List[float], distance_z: float | |||
) -> List[float]: | |||
max_z = get_atomic_coordinates_extremum(material, use_cartesian_coordinates=False) | |||
# max_z = get_atomic_coordinates_extremum(material, use_cartesian_coordinates=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
tests/py/unit/fixtures.py
Outdated
"configuration": SI_SLAB_CONFIGURATION, | ||
"termination": "Si_P4/mmm_1", | ||
"termination": "Si_P6/mmm_1", | ||
"configuration": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep SI_SLAB_CONFIGURATION
@@ -109,7 +107,9 @@ def test_create_crystal_site_adatom(): | |||
|
|||
assert defect.basis.elements.values[-1] == "Si" | |||
assertion_utils.assert_deep_almost_equal( | |||
[0.083333333, 0.458333333, 0.352272727], defect.basis.coordinates.values[-1] | |||
# TO pass on GHA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explain what's happening here in a comment
] | ||
expected_coordinate_15 = [0.777190818, 0.0, 0.083333333] | ||
# To pass on GHA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
xy_supercell_matrix=[[1, 0], [0, 1]], | ||
use_orthogonal_z=True, | ||
make_primitive=True, | ||
) | ||
termination = get_terminations(slab_config)[0] | ||
slab = create_slab(slab_config, termination) | ||
print(slab.to_json()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
f6d4253
to
74f58e1
Compare
@@ -42,6 +42,35 @@ def wrapper(*args, **kwargs): | |||
return wrapper | |||
|
|||
|
|||
def decorator_convert_position_to_coordinate(func: Callable) -> Callable: | |||
""" | |||
A decorator that converts a 2D position [x,y] to a 3D coordinate [x,y,0.0]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spaces after ,
update functions in modify to reflect the type of operand - material, interface - as the first or last word in the name feature/SOF-7426
Setup logging function(s) per https://github.com/Exabyte-io/made/pull/163/files#diff-e4a26d8b67b5aeea2b22353665f197977c0e02fc72c85eaf083509447df8bf11R316
create_xxx in every init alongside imports of configs, builders and params
Functionality:
Use local max z detection in Adatom placement (to place on terrace or non-orthogonal surface)
Hetero material island