Skip to content

Commit

Permalink
Fix docs for lineardensity (MDAnalysis#3616)
Browse files Browse the repository at this point in the history
* Fix issue with code block for lineardensity docs
* Also various other small changes in wording
  • Loading branch information
IAlibay authored Apr 9, 2022
1 parent 7c166c0 commit 8cd0a94
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions package/MDAnalysis/analysis/lineardensity.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class LinearDensity(AnalysisBase):
Example
-------
First create a ``LinearDensity`` object by supplying a selection,
First create a :class:`LinearDensity` object by supplying a selection,
then use the :meth:`run` method. Finally access the results
stored in results, i.e. the mass density in the x direction.
Expand All @@ -81,15 +81,18 @@ class LinearDensity(AnalysisBase):
print(ldens.results.x.pos)
Alternatively, the other types of groupings can be selected using the ``grouping``
keyword. For example to calculated the density based on the :class:`ResidueGroup`s
of the system:
Alternatively, other types of grouping can be selected using the
``grouping`` keyword. For example to calculate the density based on
a grouping of the :class:`~MDAnalysis.core.groups.ResidueGroup`
of the input :class:`~MDAnalysis.core.groups.AtomGroup`.
.. code-block:: python
ldens = LinearDensity(selection, grouping='residues', binsize=1.0)
ldens.run()
.. versionadded:: 0.14.0
.. versionchanged:: 1.0.0
Expand Down

0 comments on commit 8cd0a94

Please sign in to comment.