Skip to content
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

Merged
merged 15 commits into from
Oct 5, 2024
Merged

Update/SOF-7461 Update: various cleanups #165

merged 15 commits into from
Oct 5, 2024

Conversation

VsevolodX
Copy link
Member

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

@VsevolodX VsevolodX changed the base branch from main to feature/SOF-7433-1 September 28, 2024 03:31
Base automatically changed from feature/SOF-7433-1 to main October 1, 2024 16:03
@VsevolodX VsevolodX marked this pull request as ready for review October 3, 2024 01:43
@@ -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:
Copy link
Member

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

Copy link
Member Author

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

"configuration": SI_SLAB_CONFIGURATION,
"termination": "Si_P4/mmm_1",
"termination": "Si_P6/mmm_1",
"configuration": {
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

@@ -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].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces after ,

@VsevolodX VsevolodX merged commit 8196b75 into main Oct 5, 2024
9 checks passed
@VsevolodX VsevolodX deleted the update/SOF-7461 branch October 5, 2024 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants