diff --git a/package/MDAnalysis/analysis/rms.py b/package/MDAnalysis/analysis/rms.py index 4e00c2b7eb8..639220196de 100644 --- a/package/MDAnalysis/analysis/rms.py +++ b/package/MDAnalysis/analysis/rms.py @@ -83,7 +83,7 @@ import matplotlib.pyplot as plt rmsd = R.rmsd.T # transpose makes it easier for plotting - time = rmsd[1]facebook.com + time = rmsd[1] fig = plt.figure(figsize=(4,4)) ax = fig.add_subplot(111) ax.plot(time, rmsd[2], 'k-', label="all") @@ -351,12 +351,13 @@ def __init__(self, traj, reference=None, select='all', self.ref_atoms = self.reference.select_atoms(*self.select['reference']) self.traj_atoms = self.universe.select_atoms(*self.select['mobile']) if len(self.ref_atoms) != len(self.traj_atoms): - logger.exception('SelectionError: ref_atoms, traj_atoms unequal') - raise SelectionError("Reference and trajectory atom selections do " + errmsg = "Reference and trajectory atom selections do " "not contain the same number of atoms: " "N_ref={0:d}, N_traj={1:d}".format( self.ref_atoms.n_atoms, - self.traj_atoms.n_atoms)) + self.traj_atoms.n_atoms) + logger.exception(errmsg) + raise SelectionError(errormsg) logger.info("RMS calculation for {0:d} atoms.".format(len(self.ref_atoms))) mass_mismatches = (np.absolute(self.ref_atoms.masses - self.traj_atoms.masses) > self.tol_mass) if np.any(mass_mismatches): @@ -366,7 +367,8 @@ def __init__(self, traj, reference=None, select='all', if ar.name != at.name: logger.error("{0!s:>4} {1:3d} {2!s:>3} {3!s:>3} {4:6.3f} | {5!s:>4} {6:3d} {7!s:>3} {8!s:>3} {9:6.3f}".format(ar.segid, ar.resid, ar.resname, ar.name, ar.mass, at.segid, at.resid, at.resname, at.name, at.mass)) - errmsg = "Inconsistent selections, masses differ by more than {0:f}; mis-matching atoms are shown above.".format( \ + errmsg = "Inconsistent selections, masses differ by more than" + + "{0:f}; mis-matching atoms are shown above.".format( self.tol_mass) logger.error(errmsg) raise SelectionError(errmsg)