-
Notifications
You must be signed in to change notification settings - Fork 1
Fix multi chain RMSD analysis #64
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
base: main
Are you sure you want to change the base?
Conversation
|
Check if this works for triclinic boxes. From Irfan: There might also be code in MDAnalysis that does the math also working for triclinic boxes. |
…e runners for the matrix
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #64 +/- ##
==========================================
- Coverage 88.16% 87.28% -0.89%
==========================================
Files 7 7
Lines 338 346 +8
==========================================
+ Hits 298 302 +4
- Misses 40 44 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
pre-commit.ci autofix |
| center = self.central_ag.center_of_mass() | ||
| box = self.central_ag.dimensions[:3] | ||
| center = self.reference.center_of_mass() | ||
| box = triclinic_vectors(ts.dimensions) |
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.
Nice this is great that it works with all boxes.
| # this only works for orthogonal boxes | ||
| ag.positions -= np.rint(vec / box) * box | ||
| frac = np.linalg.solve(box.T, vec) # fractional coordinates | ||
| shift = np.dot(np.round(frac), box) # nearest image |
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.
Maybe comment round to get the nearest image, then compute the shift
| for frag in prot.fragments: | ||
| make_whole(frag, reference_atom=frag[0]) |
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.
Showing the limits of my MDAnalysis knowledge, but does this not need to be added to the trajectory transformations?
After #70 (merged in that branch into this PR to fix tests)
Fixes #30