Skip to content

Commit

Permalink
updated CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushsuhane committed Aug 14, 2018
1 parent 4af0b30 commit 538187f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions package/CHANGELOG
Expand Up @@ -21,10 +21,13 @@ The rules for this file:

Enhancements


* Replaced multiple apply (_apply_distmat, _apply_kdtree)
methods in distance based selections with
lib.distances.capped_distance for automatic selection of
distance evaluation method. (PR #2035)
* Modified analysis.rdf.InterRDF to use lib.distances.capped_distance
to handle rdf calculations for large systems. (PR #2013)
* Added return_distances argument in lib.distances.capped_distances
to evaluate and return distances only when required. Modified
the optimization rules in lib.distances._determine_method for
Expand Down
17 changes: 17 additions & 0 deletions package/MDAnalysis/analysis/rdf.py
Expand Up @@ -235,6 +235,7 @@ def _conclude(self):

class InterRDF_s(AnalysisBase):
"""Site-specific intermolecular pair distribution function
Arguments
---------
u : Universe
Expand All @@ -253,32 +254,48 @@ class InterRDF_s(AnalysisBase):
step : int (optional)
The step size through the trajectory in frames (default is
every frame)
Example
-------
First create the :class:`InterRDF_s` object, by supplying one Universe and
one list of pairs of AtomGroups, then use the :meth:`~InterRDF_s.run`
method::
from MDAnalysisTests.datafiles import GRO_MEMPROT, XTC_MEMPROT
u = mda.Universe(GRO_MEMPROT, XTC_MEMPROT)
s1 = u.select_atoms('name ZND and resid 289')
s2 = u.select_atoms('(name OD1 or name OD2) and resid 51 and sphzone 5.0 (resid 289)')
s3 = u.select_atoms('name ZND and (resid 291 or resid 292)')
s4 = u.select_atoms('(name OD1 or name OD2) and sphzone 5.0 (resid 291)')
ags = [[s1, s2], [s3, s4]]
rdf = InterRDF_s(u, ags)
rdf.run()
Results are available through the :attr:`bins` and :attr:`rdf` attributes::
plt.plot(rdf.bins, rdf.rdf[0][0][0])
(Which plots the rdf between the first atom in ``s1`` and the first atom in
``s2``)
To generate the *cumulative distribution function* (cdf), use the
:meth:`~InterRDF_s.get_cdf` method ::
cdf = rdf.get_cdf()
Results are available through the :attr:'cdf' attribute::
plt.plot(rdf.bins, rdf.cdf[0][0][0])
(Which plots the cdf between the first atom in ``s1`` and the first atom in
``s2``)
.. versionadded:: 0.19.0
"""
def __init__(self, u, ags,
nbins=75, range=(0.0, 15.0), density=True, **kwargs):
Expand Down

0 comments on commit 538187f

Please sign in to comment.