From ec114889918c9c9625e70207f554a8eeba999aa5 Mon Sep 17 00:00:00 2001 From: ojeda-e Date: Wed, 28 Jul 2021 12:24:08 -0600 Subject: [PATCH] Docstrings updated --- membrane_curvature/base.py | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/membrane_curvature/base.py b/membrane_curvature/base.py index 41023ef..8f9f642 100644 --- a/membrane_curvature/base.py +++ b/membrane_curvature/base.py @@ -36,7 +36,7 @@ class MembraneCurvature(AnalysisBase): The selection string of an atom selection to use as a reference to derive a surface. wrap : bool, optional - Apply coordinate wrapping. + Apply coordinate wrapping to pack atoms into the primary unit cell. n_x_bins : int, optional, default: '100' Number of bins in grid in the x dimension. n_y_bins : int, optional, default: '100' @@ -68,8 +68,20 @@ class MembraneCurvature(AnalysisBase): Each array has shape (`n_x_bins`, `n_y_bins`) + See also + -------- + `MDAnalysis.transformations.wrap + `_ + Notes ----- + Use `wrap=True` when `mda.Universe` contains the raw trajectory, and + `wrap=False` for processed trajectories. For more details on when to use + `wrap=True`, check the `Usage + `_ + page. + + The derived surface and calculated curvatures are available in the :attr:`results` attributes. @@ -95,8 +107,10 @@ class MembraneCurvature(AnalysisBase): mean_curvature = mc.results.average_mean_curvature gaussian_curvature = mc.results.average_gaussian_curvature - The respective 2D curvature plots can be obtained using the `matplotlib` package for - data visualization via `imshow`. We recommend using the `gaussian` interpolation. + The respective 2D curvature plots can be obtained using the `matplotlib` + package for data visualization via `imshow`. We recommend using the + `gaussian` interpolation. + """ @@ -132,9 +146,11 @@ def __init__(self, universe, select='all', if self.wrap: self.ag.wrap() else: - warnings.warn(" `wrap == False` may result in inaccurate calculation " - "of membrane curvature. Surfaces will be derived from " - "a reduced number of atoms.") + msg = (" `wrap == False` may result in inaccurate calculation " + "of membrane curvature. Surfaces will be derived from " + "a reduced number of atoms.") + warnings.warn(msg) + logger.warn(msg) def _prepare(self): # Initialize empty np.array with results