Replies: 1 comment
-
There's no pre-built tool for you. But it shouldn't be difficult for you to calculate it yourself: After structural superposition of a trajectory frame (e.g., with the tools in analysis.align) you have access to all positions in from MDAnalysis.analysis.align import alignto
u = mda.Universe(PSF, DCD)
p = u.select_atoms("protein")
# need a different Universe for the reference so that coordinates are independent
ref = u.copy()
ref_p = ref.select_atoms("protein")
ref.trajectory[0] # use first frame of ref
u.trajectory[-1] # use last frame of trajectory
# superimpose current frame of u
alignto(p, ref_p) For each atom atom_distances = mda.lib.distances.calc_bonds(p, ref_p) If you want atoms by residues, you can, for example, use p_byres = p.groupby("resids")
ref_p_byres = ref_p.groupby("resids")
# for residue 10
from MDAnalysis.analysis.rms import rmsd
rmsd_residue_10 = rmsd(ref_p_byres[10].positions, p_byres[10].positions) You'll have to build your own loops over frames and residues but this should give you an idea what you can do. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am unsure if a per-atom RMSD calculation tool is available in MDAnalysis. I did find that a 2D RMSD calculation for trajectories is available. However, I want to calculate RMSD values either residue-wise or atom-wise between two PDB files or two frames.
Do you have any suggestions or guidance on how to approach this? Any help would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions