Skip to content

Commit

Permalink
fix docs and default parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
kain88-de committed Jan 27, 2017
1 parent 0299873 commit cffa207
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
7 changes: 4 additions & 3 deletions package/MDAnalysis/analysis/align.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,10 @@ def alignto(mobile, reference, select="all", mass_weighted=None, weights=None,
When using 2. or 3. with *sel1* and *sel2* then these selections can
also each be a list of selection strings (to generate a AtomGroup with
defined atom order as described under :ref:`ordered-selections-label`).
mass_weighted : boolean, optional, deprecated
mass_weighted : boolean, optional (deprecated)
``True`` uses the masses :meth:`reference.masses` as weights for the
RMSD fit.
weights : str/array_like (optional)
weights : str/array_like, optional
weights to be used for fit. Can be either 'mass' or an array_like
tol_mass: float, optional
Reject match if the atomic masses for matched atoms differ by more than
Expand Down Expand Up @@ -395,6 +395,7 @@ def alignto(mobile, reference, select="all", mass_weighted=None, weights=None,
old_rmsd
RMSD before spatial alignment
new_rmsd
RMSD after spatial alignment
See Also
--------
Expand All @@ -411,7 +412,7 @@ def alignto(mobile, reference, select="all", mass_weighted=None, weights=None,
the old behavior was the equivalent of *strict* = ``True``.
.. versionchanged:: 0.16.0
new general 'weights' kwarg replace mass_weights
new general 'weights' kwarg replace mass_weights, deprecated 'mass_weights'
"""
if select in ('all', None):
# keep the EXACT order in the input AtomGroups; select_atoms('all')
Expand Down
4 changes: 2 additions & 2 deletions package/MDAnalysis/analysis/encore/covariance.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def shrinkage_covariance_estimator( coordinates,
def covariance_matrix(ensemble,
selection="name CA",
estimator=shrinkage_covariance_estimator,
weights=None,
weights='mass',
reference=None):
"""
Calculates (optionally mass weighted) covariance matrix
Expand All @@ -190,7 +190,7 @@ def covariance_matrix(ensemble,
of frames and M the number of atoms). See ml_covariance_estimator and
shrinkage_covariance_estimator for reference.
weights : str/array_like (optional)
specify optional weights. If ``mass`` then chose masses of ensemble atoms
specify weights. If ``'mass'`` then chose masses of ensemble atoms, if ``None`` chose uniform weights
reference : MDAnalysis.Universe object (optional)
Use the distances to a specific reference structure rather than the
distance to the mean.
Expand Down
8 changes: 4 additions & 4 deletions package/MDAnalysis/analysis/rms.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ def rmsd(a, b, weights=None, center=False, superposition=False):
if center or superposition:
# make copies (do not change the user data!)
# weights=None is equivalent to all weights 1
a = a - np.average(a, axis=0, weights=weights)
b = b - np.average(b, axis=0, weights=weights)
a -= np.average(a, axis=0, weights=weights)
b -= np.average(b, axis=0, weights=weights)

if weights is not None:
if len(weights) != len(a):
Expand Down Expand Up @@ -328,9 +328,9 @@ def __init__(self, atomgroup, reference=None, select='all',
.. Note:: Experimental feature. Only limited error checking
implemented.
filename : str (optional)
filename : str, optional
write RSMD into file file :meth:`RMSD.save`
mass_weighted : bool deprecated
mass_weighted : bool (deprecated)
do a mass-weighted RMSD fit
weights : str/array_like (optional)
choose weights. If 'str' uses masses as weights
Expand Down

0 comments on commit cffa207

Please sign in to comment.