Skip to content
Snippets Groups Projects
Commit e4f218f8 authored by Bienchen's avatar Bienchen
Browse files

Extended documentation of AddChain() according to BZDNG-285.

parent d8f6c1d5
Branches
Tags
No related merge requests found
...@@ -856,19 +856,35 @@ The View Classes ...@@ -856,19 +856,35 @@ The View Classes
Returns a copy of this entity. Provided for `duck-typing <http://en.wikipedia.org/wiki/Duck_typing>` purposes. Returns a copy of this entity. Provided for `duck-typing <http://en.wikipedia.org/wiki/Duck_typing>` purposes.
:rtype: EntityView :rtype: :class:`EntityView`
.. method:: AddChain(chain_handle[, view_add_flags]) .. method:: AddChain(chain_handle[, view_add_flags])
Add chain to view. By default, only the chain is added to the view, but not Add chain to view. By default, only the chain is added to the view, but not
its residues and atoms. This behavior can be changed by passing in an its residues and atoms. This behaviour can be changed by passing in an
appropriate set of `view_add_flags` appropriate set of `view_add_flags`.
The following example just adds a chain without residues and atoms:
.. code-block:: python
pdb = ost.io.LoadPDB(<PDB file name>)
v = pdb.CreateEmptyView()
v.AddChain(pdb.chains[0])
To **copy** a whole chain, go like:
.. code-block:: python
pdb = ost.io.LoadPDB(<PDB file name>)
v = pdb.CreateEmptyView()
v.AddChain(pdb.chains[0], ost.mol.INCLUDE_ALL)
:param chain_handle: :param chain_handle:
:type chain_handle: ChainHandle :type chain_handle: ChainHandle
:param view_add_flags: An ORed together combination of `view_add_flags`. :param view_add_flags: An ORed together combination of `view_add_flags`.
:type view_add_flags: int :type view_add_flags: :class:`int`
:rtype: class:`ChainView` :rtype: :class:`ChainView`
.. method:: AddResidue(residue_handle[, view_add_flags]) .. method:: AddResidue(residue_handle[, view_add_flags])
...@@ -881,7 +897,7 @@ The View Classes ...@@ -881,7 +897,7 @@ The View Classes
:type residue_handle: ResidueHandle :type residue_handle: ResidueHandle
:param view_add_flags: :param view_add_flags:
:type view_add_flags: int :type view_add_flags: int
:rtype: class:`ResidueView` :rtype: :class:`ResidueView`
.. method:: AddAtom(atom_handle[, view_add_flags]) .. method:: AddAtom(atom_handle[, view_add_flags])
...@@ -1617,4 +1633,3 @@ ChainType functions ...@@ -1617,4 +1633,3 @@ ChainType functions
:raises: :class:`runtime_error` if **type** is unrecognised. :raises: :class:`runtime_error` if **type** is unrecognised.
:returns: :class:`str` :returns: :class:`str`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment