-
Notifications
You must be signed in to change notification settings - Fork 663
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
Refactor Transformations from closure into class #2859
Merged
Merged
Changes from 3 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
05f2ddd
refactor transformations into class
yuxuanzhuang 92a9653
pep8 and test fix
yuxuanzhuang 9fc5071
move fit prep toinit
yuxuanzhuang 6b7c45b
move rotate prep to init
yuxuanzhuang ae51c5b
move translate prep to init
yuxuanzhuang a542792
move wrap prep to init
yuxuanzhuang 1729ee6
pep8
yuxuanzhuang 26950b2
pep
yuxuanzhuang 5aa8d2b
test pickle
yuxuanzhuang 1c5bbdb
pep
yuxuanzhuang b09bef6
doc for each module
yuxuanzhuang 235e8a9
read_offset issue?
yuxuanzhuang 4447869
Merge remote-tracking branch 'mda_origin/develop' into new_transforma…
yuxuanzhuang 5ef7d3f
change to dcd
yuxuanzhuang f6331d3
doc transformation
yuxuanzhuang 1ebcc33
note revise
yuxuanzhuang c412104
doc for transformation
yuxuanzhuang 3b1c470
changelog
yuxuanzhuang 6e87625
Merge remote-tracking branch 'mda_origin/develop' into new_transforma…
yuxuanzhuang 11f3644
enable universe pickle
yuxuanzhuang 7c857f6
merge to develop
yuxuanzhuang 58f6e4e
transformation doc
yuxuanzhuang 26dab2f
Merge branch 'develop' into new_transformation
orbeckst 648c9b0
merge to develop
yuxuanzhuang 3f083ae
change universe pickle to reduce
yuxuanzhuang 9ae7f83
remove pure pickle/unpickle tests
yuxuanzhuang 26f68bc
Merge branch 'new_transformation' of https://github.com/yuxuanzhuang/…
yuxuanzhuang ae8a2a2
pep
yuxuanzhuang 499efc1
example
yuxuanzhuang 2793ba2
doc
yuxuanzhuang acb4488
Merge branch 'develop' into new_transformation
yuxuanzhuang 1080678
Update package/MDAnalysis/transformations/__init__.py
yuxuanzhuang 0655275
change snippet
yuxuanzhuang 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
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
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.
You showed the abstract class. Now show a concrete example to address @richardjgowers comment. For instance
I currently can't get nglview to work in my notebook so you'll need to check that this actually works... or come up with another example.
EDIT: forgot to increment
phi
...EDIT 2: yes, it's pretty dumb that the phi angle just keeps incrementing, no matter what you do with the trajectory. Perhaps better to do something like
phi = ts.frame * self.dphi
EDIT 3: changed it to
phi = ts.frame * self.dphi
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.
Thanks! it works. And I think it makes sense to just rotate by a fixed angle. (for visualization perhaps)
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 changed the snippet.