Skip to content

Instantly share code, notes, and snippets.

View jbellamycarter's full-sized avatar
🔬
Working from somewhere

Jedd Bellamy-Carter jbellamycarter

🔬
Working from somewhere
View GitHub Profile
@jbellamycarter
jbellamycarter / all_atom_rmsd.py
Last active June 4, 2020 20:29
Snippets for useful calculations with atomic coordinates.
def all_atom_rmsd(ref, traj):
"""Calculate the all-atom RMSD for a trajectory against reference.
Assumes that the same structure is being compared with all atoms
in the same order. `traj` can be a single frame or a full trajectory.
Parameters
----------
ref : list or ndarray
xyz coordinates for the reference positions (Nx3)
traj : list or ndarray