From d950a309c6767dca6df934f9f9f1cbfdcad40ced Mon Sep 17 00:00:00 2001 From: Jan Domanski Date: Thu, 25 Feb 2016 12:20:23 -0500 Subject: [PATCH] Upated CHANGELOG, brought back the old ContactAnalysis class --- package/MDAnalysis/analysis/contacts.py | 50 ++----------------------- 1 file changed, 4 insertions(+), 46 deletions(-) diff --git a/package/MDAnalysis/analysis/contacts.py b/package/MDAnalysis/analysis/contacts.py index 23c92c04b98..559c7b429a1 100644 --- a/package/MDAnalysis/analysis/contacts.py +++ b/package/MDAnalysis/analysis/contacts.py @@ -1070,7 +1070,6 @@ def _conclude(self): for frame, q1, n1 in self.timeseries: f.write("{frame:4d} {q1:8.6f} {n1:5d}\n".format(**vars())) -<<<<<<< 0b318502a33fc222a7621937cfc96541788ce84d def contact_matrix(self, d, out=None): """Return distance array with True for contacts. @@ -1093,31 +1092,6 @@ def contact_matrix(self, d, out=None): Note ---- This method is typically only used internally. -======= - def qarray(self, d, out=None): - """Return array with ``True`` for contacts. - - Note - ---- - This method is typically only used internally. - - Arguments - --------- - d : array - 2D array of distances. The method uses the value of - :attr:`radius` to determine if a ``distance < radius`` - is considered a contact. - out : array, optional - If `out` is supplied as a pre-allocated array of the correct - shape then it is filled instead of allocating a new one in - order to increase performance. - - Returns - ------- - array - contact matrix - ->>>>>>> doc string upgrades in analysis.contacts """ if out: out[:] = (d <= self.radius) @@ -1128,7 +1102,6 @@ def qarray(self, d, out=None): def fraction_native(q, out=None): """Calculate native contacts relative to reference state. -<<<<<<< 0b318502a33fc222a7621937cfc96541788ce84d Parameters ---------- q: array @@ -1168,9 +1141,11 @@ def fraction_native(q, out=None): contacts : integer total number of contacts fraction : float - fraction of contacts relative to the reference state + Fraction of native contacts (Q) calculated from a contact matrix ->>>>>>> doc string upgrades in analysis.contacts + Note + ---- + This method is typically only used internally. """ if out: np.logical_and(q, self.mask, out) @@ -1180,7 +1155,6 @@ def fraction_native(q, out=None): return contacts, float(contacts) / self.mask.sum() def plot(self, filename=None, **kwargs): -<<<<<<< 0b318502a33fc222a7621937cfc96541788ce84d """Plot q(t). Parameters @@ -1212,7 +1186,6 @@ def plot(self, filename=None, **kwargs): fig.show() def plot_qavg(self, filename=None, **kwargs): -<<<<<<< 0b318502a33fc222a7621937cfc96541788ce84d """Plot `Contacts.qavg`, the matrix of average contacts. Parameters @@ -1223,21 +1196,6 @@ def plot_qavg(self, filename=None, **kwargs): keyword arguments are passed on to `pylab.imshow`. **kwargs Arbitrary keyword arguments for the plotting function -======= - """Plot the matrix of average contacts. - - Convenience function to plot :attr:`qavg`. - - Arguments - --------- - filename : string, optional - If `filename` is supplied then the figure is also written - to file (the suffix determines the file type, e.g. pdf, - png, eps, ...). - **kwargs - All other keyword arguments are passed on to - :func:`matplotlib.pyplot.imshow`. ->>>>>>> doc string upgrades in analysis.contacts """ if not self.contact_matrix : raise ValueError("No timeseries data; do 'Contacts.run()' first.")