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.
Add
Structure.sublattices
andclass RandomStructureTransformation
tostandard_transformations.py
#3057New 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
base: master
Are you sure you want to change the base?
Add
Structure.sublattices
andclass RandomStructureTransformation
tostandard_transformations.py
#3057Changes from 4 commits
2398a05
72924bf
f77b6c0
450c47d
7a4815b
7d9cab8
eb793ae
dfc74e4
20928c7
5449ed0
84f7832
353da7f
47869a7
4e8fea7
e0f40f7
3a2ebc7
b72f962
24d9689
3285df6
5f0550a
81dd21b
a8defc1
9b84cc2
766f062
5d6f238
e32fd8f
4591156
5f1de0b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
is it necessary to store the structures on the transformation instance? might balloon mem usage if people create many of these
RandomStructureTransformation
s.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 used this syntax because there is an
is_one_to_many
property in the class; should it beFalse
by default? (I see it isTrue
for other classes)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 think there's no connection between
is_one_to_many
(that part is good) and storing the transformed structures on the transformation instance?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.
Could you elaborate more on this? I feel I'm not totally understanding. For example, the
apply_transformation
method ofOrderDisorderedTransformation
returns a list of structures as well (self._all_structures
). What is the issue with this approach?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.
Could you explain the need to store all structures for later? Why not just return them and let them be garbage collected if they go out of scope in the user's code? Currently they live as long as the
Transformation
instance which is not great given structures are notoriously mem hungry.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 see. This feature is here simply because I'm copying what's been written for the other transformations. If you think it's not a good approach, then I can modify it in my code accordingly.