-
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 1 #163
Merged
Merged
feature/SOF 7282 1 #163
Changes from 23 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
57fd8b5
feat: add commensurate supercells generation builder
VsevolodX 81e03bf
Merge branch 'feature/SOF-7282' into feature/SOF-7282-1
VsevolodX fe58e85
update: adjustments to make work
VsevolodX 07ff7c3
update: filter for angle
VsevolodX 54e14b0
Merge branch 'main' into feature/SOF-7282-1
VsevolodX e3e7967
update: add check for commensurability on lattice vectors and angle
VsevolodX 4ee4e53
chore: types and cleanups
VsevolodX e40d872
update: add check for pure rotation
VsevolodX 405d1fa
update: move mateices func to utils
VsevolodX e0a4f00
updaete: move matrix -> angle func to utils
VsevolodX f563b20
chore: cleanup imports
VsevolodX 693d946
update: move try loop into func
VsevolodX 71bcb7a
chore: cleanup commensurate lattices
VsevolodX 4ece86b
chore: type fix
VsevolodX e41c255
update: move configs to configs
VsevolodX cf8b0f5
update: create commlat pair file
VsevolodX 01fd927
use new structures + types
VsevolodX b7650e7
update: fix failed branching logic
VsevolodX da3a7e0
update: add test verified in nb
VsevolodX 4383c76
chore: fix test
VsevolodX 30f5a4c
chore: cleanups
VsevolodX 5ff26a9
chore: cleanups 2
VsevolodX f29463a
update: add actual angle metadata + test that
VsevolodX 7f803d2
chore: adjust description
VsevolodX 71b98a3
chore: add angle units
VsevolodX File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/py/mat3ra/made/tools/build/interface/commensurate_lattice_pair.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import numpy as np | ||
from pydantic import BaseModel | ||
|
||
from .configuration import TwistedInterfaceConfiguration | ||
|
||
|
||
class CommensurateLatticePair(BaseModel): | ||
""" | ||
Commensurate lattice pair model. | ||
|
||
Attributes: | ||
configuration (TwistedInterfaceConfiguration): The configuration of the twisted interface. | ||
matrix1 (np.ndarray): The supercell matrix for the first lattice. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2d supercell matrix |
||
matrix2 (np.ndarray): The supercell matrix for the second lattice. | ||
angle (float): The angle between the two lattices, in degrees. | ||
size_metric (float): The size metric of the resulting supercell, in arbitrary units. | ||
""" | ||
|
||
class Config: | ||
timurbazhirov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
arbitrary_types_allowed = True | ||
|
||
configuration: TwistedInterfaceConfiguration | ||
matrix1: np.ndarray | ||
matrix2: np.ndarray | ||
angle: float | ||
size_metric: float |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We should have a getter for this
film.lattice.a
,film.lattice.b
,film.lattice.c
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.
Ok. We're adding this across all the made during cleanup task.