Skip to content

Commit f0af521

Browse files
committed
Version 0.4.0
0 parents  commit f0af521

File tree

610 files changed

+2072441
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

610 files changed

+2072441
-0
lines changed

.gitignore

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
48+
# Translations
49+
*.mo
50+
*.pot
51+
52+
# Django stuff:
53+
*.log
54+
55+
# Sphinx documentation
56+
docs/_build/
57+
58+
# PyBuilder
59+
target/
60+
61+
#Ipython Notebook
62+
.ipynb_checkpoints
63+
64+
# Cython temporary C files
65+
**/cython/*.c
66+
67+
# PyCharm
68+
.idea/*
69+
70+
# Lightdock specific
71+
sandbox/

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
LightDock Software
2+
Academic License Agreement
3+
4+
The LightDock software ("Software") has been developed by the contributing researchers of the Protein Interactions and Docking group ("Developers"). The Software is made available through the Barcelona Supercomputing Center ("BSC") for your internal, non-profit research use.
5+
BSC and the Developers allow researchers at your institution to run, display, copy and modify Software on the following conditions:
6+
7+
1. The Software remains at your institution and is not published, distributed, or otherwise transferred or made available to other than institution employees and students involved in research under your supervision, excluding institution employees that might be sub-contracted by for-profit organizations.
8+
9+
2. You agree to make results generated using Software available to other academic researchers for non-profit research purposes. If you wish to obtain Software for any commercial purposes, including fee-based service projects, you will need to execute a separate licensing agreement and pay a fee. In that case, please contact: [email protected].
10+
11+
3. You retain in Software and any modifications to Software, the copyright, trademark, or other notices pertaining to Software as provided by BSC and Developers.
12+
13+
4. You provide the Developers with feedback on the use of the Software in your research, and that the Developers and BSC are permitted to use any information you provide in making changes to the Software. All bug reports and technical questions shall be sent to the email address: [email protected].
14+
15+
5. You acknowledge that the Developers, BSC and its licensees may develop modifications to Software that may be substantially similar to your modifications of Software, and that the Developers, BSC and its licensees shall not be constrained in any way by you in Developer's, BSC's or its licensees' use or management of such modifications. You acknowledge the right of the Developers and BSC to prepare and publish modifications to Software that may be substantially similar or functionally equivalent to your modifications and improvements, and if you obtain patent protection for any modification or improvement to Software you agree not to allege or enjoin infringement of your patent by the Developers, BSC or by any of BSC's licensees obtaining modifications or improvements to Software from the BSC or the Developers.
16+
17+
6. You agree to acknowledge the contribution Developers and Software make to your research, and cite appropriate references about the Software in your publications.
18+
19+
7. Any risk associated with using the Software at your institution is with you and your institution. Software is experimental in nature and is made available as a research courtesy "AS IS," without obligation by BSC to provide accompanying services or support.
20+
21+
8. BSC AND THE DEVELOPERS EXPRESSLY DISCLAIM ANY AND ALL WARRANTIES REGARDING THE SOFTWARE, WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES PERTAINING TO NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

README.md

+170
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
# LightDock
2+
## Protein-protein docking framework
3+
Protein Interactions and Docking Group <http://life.bsc.es/pid/pidweb/>
4+
5+
Life Sciences Department - Barcelona Supercomputing Center <http://www.bsc.es/>
6+
7+
## 1. Introduction
8+
LightDock is a protein-protein docking framework based on the Glowworm Swarm Optimization (GSO) algorithm.
9+
10+
**The framework is written in the Python programming language (version 2.7) and allows the users to incorporate their own scoring function.**
11+
12+
The LightDock framework is highly versatile, with many options that can be further developed and optimized by the users: it can accept any user-defined scoring function, can use local gradient-free minimization, the simulation can be restrained from the beginning to focus on user-assigned interacting regions, and it has support for the use of pre-calculated conformers for both receptor and ligand.
13+
14+
## 2. Installation
15+
### 2.1. Dependencies
16+
LightDock has the following dependencies:
17+
18+
* Python 2.7.x
19+
* Nose (<http://nose.readthedocs.io/en/latest/>)
20+
* NumPy (<http://www.numpy.org/>)
21+
* Scipy (<http://www.scipy.org/>)
22+
* Cython (<http://cython.org/>)
23+
* BioPython (<http://biopython.org>)
24+
* MPI4py (<http://pythonhosted.org/mpi4py/>)
25+
* ProDy (<http://prody.csb.pitt.edu/>)
26+
* Freesasa (only if PyDock scoring function is used, <http://freesasa.github.io/>)
27+
28+
NumPy, Scipy, Cython, Biopython, Nose and MPI4py libraries are usually available as packages in most of GNU/Linux distributions. To install them in Ubuntu execute:
29+
30+
`sudo apt-get update && apt-get install python-numpy python-scipy cython python-biopython python-nose2 python-mpi4py`
31+
32+
Make sure all libraries are from Python 2.7.x series.
33+
34+
To install ProDy library, the simplest way is to use pip:
35+
36+
`pip install -U ProDy`
37+
38+
More instructions on how to install it can be found in the official documentation (<http://prody.csb.pitt.edu/downloads/>).
39+
40+
In case of using PyDock scoring function, **Freesasa** library has to be installed and compiled with the python-binding options.
41+
Please, check the instructions for installing it on its Github (<https://github.com/mittinatten/freesasa>). Tested version in
42+
LightDock is 1.1 (<https://github.com/mittinatten/freesasa/tree/1.1>).
43+
44+
### 2.2. Compilation of high-intensive calculation source code
45+
Once the library dependencies are installed, a compilation of some high-intensive calculation parts is required. To do so, a script is provided:
46+
47+
```
48+
cd bin/setup
49+
./setup.sh
50+
```
51+
52+
### 2.3. Testing the framework
53+
LightDock makes use of nosetests library for testing the different parts of the framework. There are two levels of testing: unitary and regression. Before running the tests, please add LightDock folder to your path environment variable.
54+
55+
In bash (**complete the LIGHTDOCK_HOME variable according to the path where you have downloaded and unpacked LightDock**):
56+
57+
```
58+
export LIGHTDOCK_HOME=/path/to/lightdock/folder
59+
export PATH=$PATH:$LIGHTDOCK_HOME/bin:$LIGHTDOCK_HOME/lightdock/bin/post
60+
export PYTHONPATH=$PYTHONPATH:$LIGHTDOCK_HOME/lightdock/:$LIGHTDOCK_HOME/lightdock/lightdock
61+
```
62+
63+
Then you will be able to run the tests. To do so:
64+
65+
Library unit tests:
66+
67+
```
68+
./run_tests.sh lib
69+
```
70+
71+
Regression short tests:
72+
73+
```
74+
./run_tests.sh reg
75+
```
76+
77+
Regression long tests (this may take several minutes):
78+
79+
```
80+
export LIGHTDOCK_LONG_TEST=true
81+
./run_tests.sh reg
82+
```
83+
84+
## 3. Executing LightDock
85+
The simplest way to perform a protein-protein docking in LightDock is to use default parameters and to only provide two [PDB](http://www.rcsb.org/pdb/static.do?p=file_formats/pdb/index.html) files for both receptor and ligand proteins.
86+
87+
### 3.1. Simplest example
88+
You fill find in the [examples](examples/) a folder [2UUY](examples/2UUY/) with a PDB file for the receptor [2UUY_rec.pdb](examples/2UUY/2UUY_rec.pdb) and the ligand [2UUY_lig.pdb](examples/2UUY/2UUY_lig.pdb).
89+
90+
Execute LightDock with the default parameters and only calculating 1 initial glowworm group with 10 glowworms and for 5 steps of the algorithm:
91+
92+
<code>
93+
lightdock 2UUY_rec.pdb 2UUY_lig.pdb 1 10 5
94+
</code>
95+
96+
By default, LightDock makes use of the DFIRE scoring function. The output of the execution should be something similar to this:
97+
98+
```
99+
[lightdock] INFO: Parameters are:
100+
[lightdock] INFO: Receptor: 2UUY_rec.pdb
101+
[lightdock] INFO: Ligand: 2UUY_lig.pdb
102+
[lightdock] INFO: Number of clusters: 1
103+
[lightdock] INFO: Number of glowworms per cluster: 10
104+
[lightdock] INFO: Simulation steps: 5
105+
[lightdock] INFO: GSO seed: 324324
106+
[lightdock] INFO: Starting points seed: 324324
107+
[lightdock] INFO: Translation step: 0.5
108+
[lightdock] INFO: Rotation step: 0.5
109+
[lightdock] INFO: lightdock parameters saved to ./lightdock.info
110+
[lightdock] INFO: Reading 2UUY_rec.pdb receptor PDB file...
111+
[lightdock] INFO: 1628 atoms, 223 residues read.
112+
[lightdock] INFO: Reading 2UUY_lig.pdb ligand PDB file...
113+
[lightdock] INFO: 415 atoms, 55 residues read.
114+
[lightdock] INFO: Saving processed structures to PDB files...
115+
[lightdock] INFO: Done.
116+
[lightdock] INFO: Calculating starting positions...
117+
[lightdock] INFO: Generated 1 positions files
118+
[lightdock] INFO: Done.
119+
[lightdock] INFO: Loading scoring function...
120+
[lightdock] INFO: Using DFIRE scoring function
121+
[lightdock] INFO: Done.
122+
[lightdock] INFO: Preparing environment
123+
[lightdock] INFO: Done.
124+
[kraken] WARNING: Number of cores has not been specified or is incorrect. Using available cores.
125+
[kraken] INFO: Kraken has 4 tentacles (cpu cores)
126+
[kraken] INFO: Tentacle ready with 1 tasks
127+
[kraken] INFO: Tentacle ready with 0 tasks
128+
[kraken] INFO: Tentacle ready with 0 tasks
129+
[kraken] INFO: Tentacle ready with 0 tasks
130+
[kraken] INFO: 1 ships ready to be smashed
131+
[lightdock] INFO: Monster spotted
132+
[kraken] INFO: Release the Kraken!
133+
[kraken] INFO: folding tentacle Tentacle-2
134+
[kraken] INFO: folding tentacle Tentacle-3
135+
[0] step 1
136+
[kraken] INFO: folding tentacle Tentacle-4
137+
[0] step 2
138+
[0] step 3
139+
[0] step 4
140+
[0] step 5
141+
[kraken] INFO: folding tentacle Tentacle-1
142+
[kraken] INFO: 1 ships destroyed
143+
[lightdock] INFO: Finished.
144+
```
145+
146+
There is a warning on the number of CPU cores used. By default, LightDock will look for the total number of cores. If you want to specify a different number, use the flag <code>-c NUMBER_CORES</code>.
147+
148+
For each of the initial glowworm groups, there is a folder called <code>cluster_X</code>. In our example, we use only one initial glowworm group so there is only a folder <code>cluster_0</code>. Inside, we can find the file containing the result of the simulation: [gso_5.out](examples/2UUY/cluster_0/gso_5.out).
149+
150+
In this file, every line corresponds to a glowworm agent in the algorithm:
151+
152+
```
153+
#Coordinates RecID LigID Luciferin Neighbor's number Vision Range Scoring
154+
(31.4171143, 1.8570079, -6.3956223, -0.1058407, -0.4849369, 0.5997430, -0.6276482) 0 0 10.79432165 0 2.200 7.52191884
155+
```
156+
157+
Finally, to generate the final docked PDB structures, we will use the script **generate_conformations.py**:
158+
159+
```
160+
generate_conformations.py 2UUY_rec.pdb 2UUY_lig.pdb cluster_0/gso_5.out 10
161+
@> ProDy is configured: verbosity='info'
162+
[generate_conformations] INFO: Reading lightdock_2UUY_rec.pdb receptor PDB file...
163+
[generate_conformations] INFO: 1628 atoms, 223 residues read.
164+
[generate_conformations] INFO: Reading lightdock_2UUY_lig.pdb ligand PDB file...
165+
[generate_conformations] INFO: 415 atoms, 55 residues read.
166+
[generate_conformations] INFO: Read 10 coordinate lines
167+
[generate_conformations] INFO: Generated 10 conformations
168+
```
169+
170+
In the <code>cluster_0</code> folder we will find the 10 structures corresponding to the 10 glowworm agents used in the example.

bin/__init__.py

Whitespace-only changes.

bin/controller.py

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
"""Execution controller
2+
3+
Depending on the environment, executes a MPI or multiprocessing version.
4+
"""
5+
6+
# Check if Python interpreter version is suitable
7+
import platform
8+
import traceback
9+
py_version = float(platform.python_version()[:3])
10+
if py_version < 2.7:
11+
raise SystemExit("lightdock [ERROR] required Python version is 2.7.x")
12+
13+
from lightdock.util.logger import LoggingManager
14+
from lightdock.util.parser import CommandLineParser
15+
16+
17+
log = LoggingManager.get_logger('lightdock')
18+
19+
20+
if __name__ == "__main__":
21+
22+
try:
23+
parser = CommandLineParser()
24+
mpi_support = parser.args.mpi
25+
if mpi_support:
26+
from docking_mpi import run_simulation as mpi_simulation
27+
mpi_simulation(parser)
28+
else:
29+
from docking_multiprocessing import run_simulation as multiprocessing_simulation
30+
multiprocessing_simulation(parser)
31+
32+
except Exception, e:
33+
log.error("Lightdock has failed, please check traceback:")
34+
traceback.print_exc()

0 commit comments

Comments
 (0)