Skip to content

Commit

Permalink
add deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kain88-de committed Dec 29, 2016
1 parent 12bfe14 commit 5f9ce2c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions package/MDAnalysis/analysis/align.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,9 @@ def alignto(mobile, reference, select="all", mass_weighted=None, weights=None,
strict=strict)

if mass_weighted is not None:
# TODO: print deprecation warnings for 0.17.0
warnings.warn("mass weighted is deprecated argument. Please use "
" 'weights=\"mass\" instead. Will be removed in 0.17.0",
category=DeprecationWarning)
if mass_weighted:
weights = 'mass'

Expand Down Expand Up @@ -586,7 +588,9 @@ def __init__(self, mobile, reference, select='all', filename=None,
self._writer = mda.Writer(self.filename, natoms)

if mass_weighted is not None:
# TODO: print depcreatoin message til 0.17.0
warnings.warn("mass weighted is deprecated argument. Please use "
" 'weights=\"mass\" instead. Will be removed in 0.17.0",
category=DeprecationWarning)
if mass_weighted:
weights = 'mass'

Expand Down
4 changes: 3 additions & 1 deletion package/MDAnalysis/analysis/rms.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,9 @@ def __init__(self, atomgroup, reference=None, select='all',
self.groupselections = ([process_selection(s) for s in groupselections]
if groupselections is not None else [])
if mass_weighted is not None:
# TODO: add depcreation
warnings.warn("mass weighted is deprecated argument. Please use "
" 'weights=\"mass\" instead. Will be removed in 0.17.0",
category=DeprecationWarning)
if mass_weighted:
weights = 'mass'
self.weights = weights
Expand Down

0 comments on commit 5f9ce2c

Please sign in to comment.