choderalab / kinalysis

Scripts for analyzing simulations of kinases!
2 stars 3 forks source link

Jumps in RMSD #16

Open juliebehr opened 8 years ago

juliebehr commented 8 years ago

Plotting of RMSD of the longest trajectory shows large jumps, even after replacing https://github.com/choderalab/kinalysis/blob/master/make_pdf_summary.py#L103 with

calphas = longest_traj.topology.select('name CA')
longest_traj.center_coordinates()
rmsd = md.rmsd(longest_traj,longest_traj,frame=0,atom_indices=calphas)

rmsd

juliebehr commented 8 years ago

Also, adding the precentered flag and changing that to

calphas = longest_traj.topology.select('name CA')
longest_traj.center_coordinates()
rmsd = md.rmsd(longest_traj,longest_traj,frame=0,atom_indices=calphas,precentered=True)

leads to:

Traceback (most recent call last):
  File "make_pdf_summary.py", line 401, in <module>
    longest_rmsd(longest_traj, time)
  File "make_pdf_summary.py", line 107, in longest_rmsd
    rmsd = md.rmsd(longest_traj,longest_traj,frame=0,atom_indices=calphas,precentered=True)
  File "mdtraj/rmsd/_rmsd.pyx", line 171, in _rmsd.rmsd (mdtraj/rmsd/_rmsd.c:2785)
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
jchodera commented 8 years ago

I think I know why this is happening! Just a moment.

jchodera commented 8 years ago

When visualizing the AurA trajectories with Tpx2 last night, I noticed that Tpx2 jumps around quite a bit unless the system is re-imaged back into the box in a manner that minimizes distances between AurA and Tpx2. Fortunately, MDTraj has an image_molecules command that tries to "do the right thing". It's slow, and it may not fix every single frame (it looked like there might still be some infrequent jumps) but I think this is the issue. You can find an example of its use in the IPython notebook in my AURKA_UMN PR.

If this is the problem, the easier thing to do might be to just make sure you only use the kinase selection (resi 123-388) for the RMSD calculation, and exclude the Tpx2. I think this would fix that.