Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧬 helanal refactor 🧬 #2622

Merged
merged 18 commits into from
Jul 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Fixes
empty AtomGroup (Issue #2848)

Enhancements
* Refactored analysis.helanal into analysis.helix_analysis
(Issue #2452, PR #2622)
* Improved MSD code to accept `AtomGroup` and reject `UpdatingAtomGroup`
and improved docs (Issue #2784)
* Added the RDKitParser which creates a `core.topology.Topology` object from
Expand Down Expand Up @@ -276,6 +278,7 @@ Changes
function calls. (Issue #782)

Deprecations
* analysis.helanal is deprecated in 1.0 (remove in 2.0)
* analysis.hole is deprecated in 1.0 (remove in 2.0)
* analysis.hbonds.HydrogenBondAnalysis is deprecated in 1.0 (remove in 2.0)
* analysis.density.density_from_Universe() (remove in 2.0)
Expand Down
27 changes: 25 additions & 2 deletions package/MDAnalysis/analysis/helanal.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,19 @@


"""
HELANAL --- analysis of protein helices
=======================================
HELANAL (Deprecated) --- analysis of protein helices
====================================================

:Author: Benjamin Hall <[email protected]>, Oliver Beckstein, Xavier Deupi
:Year: 2009, 2011, 2013
:License: GNU General Public License v2 (or higher)

.. note::

This module was deprecated in 1.0 and will be removed in 2.0.
Please use MDAnalysis.analysis.helix_analysis instead.


The :mod:`MDAnalysis.analysis.helanal` module is a Python implementation of the
HELANAL_ algorithm [Bansal2000]_ in `helanal.f`_, which is also available
through the `HELANAL webserver`_.
Expand Down Expand Up @@ -128,6 +134,11 @@
import logging
logger = logging.getLogger("MDAnalysis.analysis.helanal")

warnings.warn("This module is deprecated as of MDAnalysis version 1.0. "
"It will be removed in MDAnalysis version 2.0."
"Please use MDAnalysis.analysis.helix_analysis instead.",
category=DeprecationWarning)

def center(coordinates):
"""Return the geometric center (centroid) of the coordinates.

Expand Down Expand Up @@ -241,6 +252,12 @@ def helanal_trajectory(universe, select="name CA",
.. versionchanged:: 1.0.0
Changed `selection` keyword to `select`
"""

warnings.warn("This function is deprecated as of MDAnalysis version 1.0. "
"It will be removed in MDAnalysis version 2.0. Please use "
"MDAnalysis.analysis.helix_analysis.HELANAL instead.",
category=DeprecationWarning)

if ref_axis is None:
ref_axis = np.array([0., 0., 1.])
else:
Expand Down Expand Up @@ -580,6 +597,12 @@ def helanal_main(pdbfile, select="name CA", ref_axis=None):

"""

warnings.warn("This function is deprecated as of MDAnalysis version 1.0. "
"It will be removed in MDAnalysis version 2.0. Please use "
"MDAnalysis.analysis.helix_analysis.helix_analysis on "
"a Universe instead.",
category=DeprecationWarning)

universe = MDAnalysis.Universe(pdbfile)
ca = universe.select_atoms(select)

Expand Down
Loading