Included utils from mdtraj to avoid dependency.