Skip to content

Commit 9a5c1a7

Browse files
authored
Merge pull request #26 from DeepRank/update_paper_doc
Update paper doc
2 parents 980e9cd + e52052f commit 9a5c1a7

4 files changed

Lines changed: 47 additions & 2 deletions

File tree

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Python API
3030
Interface <pdb2sql.interface>
3131
Structure Similarity <pdb2sql.StructureSimilarity>
3232
Structure Transformation <pdb2sql.transform>
33+
Utilities <pdb2sql.utils>
3334

3435
.. :caption: Python API
3536
..

docs/source/pdb2sql.utils.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
=========
2+
Utilities
3+
=========
4+
.. currentmodule:: pdb2sql.utils
5+
6+
PDB Tools
7+
~~~~~~~~~
8+
.. autosummary::
9+
:toctree: api/
10+
11+
fetch
12+
13+
..
14+
.. automodule:: pdb2sql.transform
15+
:members:
16+
:undoc-members:
17+
:show-inheritance:

docs/source/tutorial.rst

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,30 @@
1111

1212
This is a short introduction to pdb2sql.
1313

14-
First, we import as follows:
14+
15+
Download PDB files
16+
------------------
17+
18+
A handy tool `fetch` is provided to download PDB files from `PDB <https://www.rcsb.org>`_ website.
1519

1620
.. ipython:: python
1721
18-
from pdb2sql import pdb2sql
22+
from pdb2sql import fetch
23+
fetch('3CRO', './pdb/')
24+
ls ./pdb
1925
26+
For clear illustration, some `dummy PDB files <https://github.com/DeepRank/pdb2sql/tree/master/docs/pdb>`_
27+
are used in the following examples.
2028

2129
Get and set data
2230
----------------
2331

32+
First, we import as follows:
33+
34+
.. ipython:: python
35+
36+
from pdb2sql import pdb2sql
37+
2438
Create a SQL database instance:
2539

2640
.. ipython:: python

paper/paper.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,19 @@ atoms = pdb.get_contact_atoms(cutoff=6.0)
123123
res = pdb.get_contact_residues(cutoff=6.0)
124124
```
125125

126+
It is also possible to directly create an ``interface`` instance with a ``pdb2sql`` instance as input. In this case, all the changes in the ``pdb2sql`` instance before creating the new ``interface`` instance will be kept in the ``interface`` instance; afterwards, the two instances will be independent, which means changes in one will not affect the other.
127+
128+
```python
129+
from pdb2sql import pdb2sql
130+
from pdb2sql import interface
131+
132+
pdb = pdb2sql('1AK4.pdb')
133+
pdbitf = interface(pdb)
134+
atoms = pdbitf.get_contact_atoms(cutoff=6.0)
135+
res = pdbitf.get_contact_residues(cutoff=6.0)
136+
```
137+
138+
126139
## Computing Structure Similarity
127140

128141
The ``StructureSimilarity`` class allows to compute similarity measures between two protein-protein complexes. Several popular measures used to classify qualities of protein complex structures in the CAPRI (Critical Assessment of PRedicted Interactions) challenges [@capri] have been implemented: interface rmsd, ligand rmsd, fraction of native contacts and DockQ[@dockq]. The approach implemented to compute the interface rmsd and ligand rmsd is identical to the well-known package ``ProFit`` [@profit]. All the methods required to superimpose structures have been implemented in the ``transform`` class and therefore relies on no external dependencies. The following snippet shows how to compute these measures:

0 commit comments

Comments
 (0)