From 9ffa67ae4e2a52f65978b5e34974d425b0d56f47 Mon Sep 17 00:00:00 2001 From: Stefan Bienert <stefan.bienert@unibas.ch> Date: Mon, 6 Feb 2012 17:33:46 +0100 Subject: [PATCH] Extended documentation of DSSP bindings --- examples/dssp_sa.py | 7 +++++++ modules/bindings/doc/dssp.rst | 29 +++++++++++++++++++++++++---- modules/bindings/pymod/dssp.py | 5 ++++- 3 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 examples/dssp_sa.py diff --git a/examples/dssp_sa.py b/examples/dssp_sa.py new file mode 100644 index 000000000..23369a99e --- /dev/null +++ b/examples/dssp_sa.py @@ -0,0 +1,7 @@ +from ost.bindings import dssp +ent=io.LoadMMCIF('1ake.cif') +dssp.AssignDSSP(ent, extract_burial_status=True) +for chain in ent.chains: + if chain.is_polypeptide: + for res in chain.residues: + print res.GetFloatProp('relative_solvent_accessibility') diff --git a/modules/bindings/doc/dssp.rst b/modules/bindings/doc/dssp.rst index 61de495e3..bb9d2b57b 100644 --- a/modules/bindings/doc/dssp.rst +++ b/modules/bindings/doc/dssp.rst @@ -2,19 +2,22 @@ ================================================================================ .. module:: ost.bindings.dssp - :synopsis: Interface to the DSSP commandline utility + :synopsis: Interface to the DSSP command line utility Introduction -------------------------------------------------------------------------------- -DSSP is a program developed by Wolfgang Kabsch and Chris Sander to assign secondary structure states to protein structures. The assignment is based on hydrogen bonding patterns and geometric features. +DSSP is a program developed by Wolfgang Kabsch and Chris Sander to assign +secondary structure states to protein structures. The assignment is based on +hydrogen bonding patterns and geometric features. The program can be downloaded from `<http://swift.cmbi.ru.nl/gv/dssp/>`_. -Example +Examples -------------------------------------------------------------------------------- -The following example assigns secondary structure states to an entity by using the DSSP program. +The following example assigns secondary structure states to an entity by using +the DSSP program. .. code-block:: python @@ -23,9 +26,27 @@ The following example assigns secondary structure states to an entity by using t ent=io.LoadPDB('1ake.pdb') dssp.AssignDSSP(ent) + +Now we fetch structure information plus solvent accessibility for an entity +using the mmCIF interface. + + +.. code-block:: python + + from ost.bindings import dssp + ent=io.LoadMMCIF('1ake.cif') + dssp.AssignDSSP(ent, extract_burial_status=True) + for chain in ent.chains: + if chain.is_polypeptide: + for res in chain.residues: + print res.GetFloatProp('relative_solvent_accessibility') + + DSSP bindings Usage -------------------------------------------------------------------------------- .. autofunction:: ost.bindings.dssp.AssignDSSP .. autofunction:: ost.bindings.dssp.LoadDSSP + +.. LocalWords: dssp AssignDSSP ent GetFloatProp autofunction diff --git a/modules/bindings/pymod/dssp.py b/modules/bindings/pymod/dssp.py index 1cb1db3aa..f27aa9db9 100644 --- a/modules/bindings/pymod/dssp.py +++ b/modules/bindings/pymod/dssp.py @@ -88,7 +88,10 @@ def AssignDSSP(ent, pdb_path="", extract_burial_status=False, tmp_dir=None, :param ent: The entity for which the secondary structure should be calculated :type ent: :class:`~ost.mol.EntityHandle` or :class:`~ost.mol.EntityView` - :param extract_burial_status: If true, also extract burial status + :param extract_burial_status: If true, also extract burial status and store + as float-property + ``relative_solvent_accessibility`` at residue + level :param tmp_dir: If set, overrides the default tmp directory of the operating system :param dssp_bin: The path to the DSSP executable -- GitLab