Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fiona-naughton committed Jun 25, 2024
1 parent c5e1713 commit 5aaf292
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 6 deletions.
6 changes: 1 addition & 5 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
API Documentation
=================

.. autosummary::
:toctree: autosummary
:recursive:

helanal
.. automodule:: helanal.helanal
36 changes: 35 additions & 1 deletion docs/source/getting_started.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,38 @@
Getting Started
===============

This page details how to get started with helanal.
Installation
------------
*TBA*


Example use
-----------
Import MDAnalysis and helanal::

import MDAnalysis as mda
from MDAnalysis.tests.datafiles import PSF, DCD
import helanal

You can pass in a single selection::

u = mda.Universe(PSF, DCD)
hel = helanl.HELANAL(u, select='name CA and resnum 161-187')
hel.run()

All computed properties are available in ``.results``::

print(hel.results.summary)

Alternatively, you can analyse several helices at once by passing
in multiple selection strings::

hel2 = helanal.HELANAL(u, select=('name CA and resnum 100-160',
'name CA and resnum 200-230'))

The :func:`helix_analysis` function will carry out helix analysis on
atom positions, treating each row of coordinates as an alpha-carbon
equivalent::

hel_xyz = helanal.helix_analysis(u.atoms.positions, ref_axis=[0, 0, 1])

20 changes: 20 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@
Welcome to helanal's documentation!
=========================================================

This module contains code to analyse protein helices using the
HELANAL_ algorithm
([Bansal2000]_ , [Sugeta1967]_ ).

HELANAL_ quantifies the geometry of helices in proteins on the basis of their
Cα atoms. It can determine local structural features such as the local
helical twist and rise, virtual torsion angle, local helix origins and
bending angles between successive local helix axes.

.. _HELANAL: https://pubmed.ncbi.nlm.nih.gov/10798526/

.. [Sugeta1967] Sugeta, H. and Miyazawa, T. 1967. General method for
calculating helical parameters of polymer chains from bond lengths, bond
angles and internal rotation angles. *Biopolymers* 5 673 - 679
.. [Bansal2000] Bansal M, Kumar S, Velavan R. 2000.
HELANAL - A program to characterise helix geometry in proteins.
*J Biomol Struct Dyn.* 17(5):811-819.
.. toctree::
:maxdepth: 2
:caption: Contents:
Expand Down
40 changes: 40 additions & 0 deletions helanal/helanal.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
#
# MDAnalysis --- https://www.mdanalysis.org
# Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
# Released under the GNU Public Licence, v2 or any higher version
#
# Please cite your use of MDAnalysis in published work:
#
# R. J. Gowers, M. Linke, J. Barnoud, T. J. E. Reddy, M. N. Melo, S. L. Seyler,
# D. L. Dotson, J. Domanski, S. Buchoux, I. M. Kenney, and O. Beckstein.
# MDAnalysis: A Python package for the rapid analysis of molecular dynamics
# simulations. In S. Benthall and S. Rostrup editors, Proceedings of the 15th
# Python in Science Conference, pages 102-109, Austin, TX, 2016. SciPy.
# doi: 10.25080/majora-629e541a-00e
#
# N. Michaud-Agrawal, E. J. Denning, T. B. Woolf, and O. Beckstein.
# MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics Simulations.
# J. Comput. Chem. 32 (2011), 2319--2327, doi:10.1002/jcc.21787
#

"""
HELANAL --- analysis of protein helices
=======================================
Expand All @@ -21,6 +45,22 @@
HELANAL - A program to characterise helix geometry in proteins.
*J Biomol Struct Dyn.* 17(5):811-819.
Classes
-------
.. autoclass:: HELANAL
Functions
---------
.. autofunction:: helix_analysis
.. autofunction:: vector_of_best_fit
.. autofunction:: local_screw_angles
"""

import warnings
Expand Down

0 comments on commit 5aaf292

Please sign in to comment.