-
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
Feature/SOF-7282 feat: add interface between twisted materials #162
Conversation
src/py/mat3ra/made/tools/analyze.py
Outdated
@@ -557,3 +557,26 @@ def calculate_on_xy_grid( | |||
results_matrix[i, j] = result | |||
|
|||
return x_values, y_values, results_matrix | |||
|
|||
|
|||
def calculate_moire_periodicity(lattice_a: float, lattice_b: float, twist_angle: float) -> Tuple[float, float]: |
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 go to Lattice
src/py/mat3ra/made/tools/analyze.py
Outdated
@@ -557,3 +557,26 @@ def calculate_on_xy_grid( | |||
results_matrix[i, j] = result | |||
|
|||
return x_values, y_values, results_matrix | |||
|
|||
|
|||
def calculate_moire_periodicity(lattice_a: float, lattice_b: float, twist_angle: float) -> Tuple[float, float]: |
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
######################################################################################## | ||
# Twisted Interface Builders # | ||
######################################################################################## | ||
|
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 newlines
for m in range(max_size + 1): | ||
for p in range(1, max_size + 1): | ||
for q in range(max_size + 1): | ||
angle = np.degrees(np.arctan2(n * q - m * p, n * p + m * q)) |
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 take into account the lattice
ribbon_length (int): Length of the nanoribbon in unit cells. | ||
distance_z (float): Vertical distance between layers in Angstroms. | ||
vacuum_x (int): Vacuum padding in x direction in unit cells. | ||
vacuum_y (int): Vacuum padding in y direction in unit cells. |
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.
Vacuum padding should be calculated based on the shape of the resulting material
TwsitedInterfaceConfiguration
TwsitedInterfaceBuilder