Skip to content

Commit

Permalink
Docstrings updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ojeda-e committed Jul 30, 2021
1 parent de7191e commit ec11488
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions membrane_curvature/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -68,8 +68,20 @@ class MembraneCurvature(AnalysisBase):
Each array has shape (`n_x_bins`, `n_y_bins`)
See also
--------
`MDAnalysis.transformations.wrap
<https://docs.mdanalysis.org/1.0.0/documentation_pages/transformations/wrap.html>`_
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
<https://membrane-curvature.readthedocs.io/en/latest/source/pages/Usage.html>`_
page.
The derived surface and calculated curvatures are available in the
:attr:`results` attributes.
Expand All @@ -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.
"""

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ec11488

Please sign in to comment.