-
Notifications
You must be signed in to change notification settings - Fork 28
[WIP] Fix for LPRMSD after mdtraj merge #427
base: master
Are you sure you want to change the base?
Conversation
…D.TheoData from msmbuilder.metrics, which no longer exists since we moved to mdtraj. I don't know what the permanent fix should be since, it would be best to just have all of the original LPRMSD functionality in mdtraj somewhere.
… using lprmsd now...
.... But, unfortunately that wasn't good enough because I'm segfaulting all over the place. Not sure why |
I tried to fix this before, but I only spent ~2 hours on it and didn't succeed. Can I take a look @ it when I come back? |
You ran into the same seg fault? On Tue, Jun 17, 2014 at 8:39 PM, Lee-Ping [email protected] wrote:
|
Using mdtraj.lprmsd, you can trivially get the former alt_indices behavior i.e
On Tue, Jun 17, 2014 at 10:48 PM, Christian Schwantes <
|
Ok that's an easy enough way to implement it. @leeping @mlawrenz @cxhernandez and anyone else, what features in LPRMSD do you need. There are multiple "align to density," or "align to moments" functions. Do you need that? |
Hi Christian, Thanks; I don't need those other features. When I installed msmbuilder 2.8, LPRMSD was broken and it wasn't using the MDTraj implementation, so I reverted to msmbuilder 2.7. Is the situation different now? |
I'm working on translating it now. It slipped through the cracks during the transfer to mdtraj. It will have this functionality:
|
Cool. Can we implement code to get the actual aligned structures using LPRMSD? That was a feature we had before that I don't want to lose - I actually use it. I think What do you think is the best way to do it? |
So, as robert pointed out, that is in the mdtraj.lprmsd function. If you pass |
Oh, cool. :) This is something I could add to |
Lee-Ping is right in pointing out that we want more alignment features to be supported and added to MDTraj. Ideally, RMSD, LPRMSD, |
It is a bit messy but I think this could be due to the small number of metrics that can do alignments. RMSD and LPRMSD are the two I can think of - what other metrics are there? |
In MDTraj, there is no concept of metric. |
…rks now (I think)
@leeping do you have any data from the old version that I could use to test the implementation? I need a simple test for making sure the permute groups are working and that the alt indices are working. |
…ementation of lprmsd...
nevermind, I came up with some simple examples. There seems to be a bug right now. I think it's in mdtraj though. |
There's no bug, I assumed the default for permute_groups was different than it is |
…g messed up in theobald_rmsd... where the rotation matrix is not calculated correctly. Just calling md.lprmsd works. but trying to get the superposed positions does not...
This test fails: https://gist.github.com/schwancr/648d2955b2315835234f The distance is correct at zero, but the superpose isn't working because the rotation matrix cannot be converged. The warning is printed here: https://github.com/rmcgibbo/mdtraj/blob/master/MDTraj/rmsd/src/theobald_rmsd.c#L267-L319 This region is computing a rotation matrix for a given quaternion, which I think can be done many ways (though I don't know where these lines of code are coming from), since in @leeping's initial code, there was a series of nested if statements checking for this "non-convergence" and then solving the problem in a different way. See here: https://github.com/SimTk/msmbuilder/blob/998dfdaf22946dd81a8617442adbd155498a6e93/Extras/LPRMSD/src/qcprot.c#L272-L319 @rmcgibbo or @leeping does any of this sound familiar? I don't know the math to be able to figure this out at the moment. |
Ok, so I found the reference code and put it in a new branch in mdtraj (rmcgibbo/mdtraj#503), but it still doesn't fix this test. |
Hi Christian, I'm not sure if even the reference code would pass the test you proposed. There's a lot of degeneracy in the rotation matrix for aligning a system of linear atoms that isn't there for the calculations that I ran. Thanks,
|
Yea, I think you're right, it seems to be working otherwise though. |
Do you think we should fix the case of linear atoms or come up with a different test case (e.g. a cube of atoms)? |
I think a different test case is easiest. Right now I fixed the issues with |
LPRMSD no longer worked when we moved mdtraj into msmbuilder.
It's still necessary because the
altindices
behavior is not available in mdtraj (at least to my knowledge).I attempted to fix it by just appending the old RMSD.TheoData class into lprmsd.py