Coder Social home page Coder Social logo

lightdock / lightdock-python2.7 Goto Github PK

View Code? Open in Web Editor NEW
25.0 6.0 9.0 65.49 MB

Protein-protein, protein-peptide and protein-DNA docking framework based on the GSO algorithm

Home Page: https://lightdock.org/

License: GNU General Public License v3.0

Python 28.23% Shell 0.19% C++ 66.07% Objective-C 4.00% C 1.51%
gso pdb swarm-intelligence scientific-computing protein-protein-docking protein-protein protein-protein-interaction protein-structure swarm protein

lightdock-python2.7's Introduction

LightDock

⚠️ WARNING
This is a deprecated repository for the Python 2.7 series. Please visit https://lightdock.org or https://github.com/lightdock/lightdock for an updated version of this software (including Python 3 support)

Table of Contents

1. Introduction

LightDock is a protein-protein, protein-peptide and protein-DNA docking framework based on the Glowworm Swarm Optimization (GSO) algorithm.

The framework is written in the Python programming language (version 2.7) and allows the users to incorporate their own scoring function.

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, it supports residue restraints in both receptor and ligand partners and it has support for the use of pre-calculated conformers for both receptor and ligand.

2. Reference

LightDock protocol and the updates to make use of residue restraints have been published in Oxford Bioinformatics journal. Please cite these references if you use LightDock in your research:

LightDock: a new multi-scale approach to protein–protein docking
Brian Jiménez-García, Jorge Roel-Touris, Miguel Romero-Durana, Miquel Vidal, Daniel Jiménez-González and Juan Fernández-Recio
Bioinformatics, Volume 34, Issue 1, 1 January 2018, Pages 49–55, https://doi.org/10.1093/bioinformatics/btx555

LightDock goes information-driven
Jorge Roel-Touris, Alexandre M.J.J. Bonvin, Brian Jiménez-García
Bioinformatics, btz642; doi: https://doi.org/10.1093/bioinformatics/btz642

3. Installation

3.1. Dependencies

LightDock has the following dependencies:

3.1.1. Installing NumPy, Scipy, Cython, Biopython, Nose and MPI4py

NumPy, Scipy, Cython, Biopython, Nose and MPI4py libraries are usually available as packages in most of GNU/Linux distributions. For example, to install them in Ubuntu execute:

sudo apt-get update && apt-get install python-numpy python-scipy cython python-biopython python-nose python-nose2 python-mpi4py

Make sure all libraries are from the Python 2.7.x series.

3.1.2. Installing ProDy

To install ProDy library, the simplest way is to use pip (you can use sudo to install it system-wide):

pip install -U ProDy

You may also need to install pyparsing dependency:

pip install pyparsing

More instructions on how to install it can be found in the official documentation (http://prody.csb.pitt.edu/downloads/).

3.1.3. Installing FreeSASA (optional)

In case of using cpydock scoring function or to execute the tests, Freesasa library has to be installed and compiled with the python-binding options. Tested version in LightDock is 1.1 (https://github.com/mittinatten/freesasa/tree/1.1). To install freesasa 1.1, please follow these instructions (change path/to/install):

git clone https://github.com/mittinatten/freesasa.git
cd freesasa
git checkout tags/1.1
autoreconf -i
./configure --enable-python-bindings --prefix=path/to/install
make
make install

For more recent versions of freesasa, please check the instructions for installing it on its Github (https://github.com/mittinatten/freesasa).

3.2. Download LightDock

The fastest way to install LightDock is to use git to clone the repository from GitHub:

git clone https://github.com/lightdock/lightdock-python2.7.git

A directory called lightdock-python2.7 is now available. This is the path necessary for setting the enviroment variable LIGHTDOCK_HOME in your bash. Change your ~/.bashrc accordingly (add the following lines to your ~/.bashrc):

export LIGHTDOCK_HOME=/path/to/lightdock/folder
export PATH=$PATH:$LIGHTDOCK_HOME/bin:$LIGHTDOCK_HOME/bin/post:$LIGHTDOCK_HOME/bin/support
export PYTHONPATH=$PYTHONPATH:$LIGHTDOCK_HOME

3.3. Compilation of high-intensive calculation source code

Once the library dependencies are installed, a compilation of some high-intensive calculation parts is required. To do so, a script is provided:

cd ${LIGHTDOCK_HOME}/bin/setup
./setup.sh

3.4. Testing the framework (optional)

LightDock makes use of nosetests library for testing the different parts of the framework. There are two levels of testing: unitary and regression.

Library unit tests. To run them execute:

cd $LIGHTDOCK_HOME
./run_tests.sh lib

Regression short tests. To run them execute:

cd $LIGHTDOCK_HOME
./run_tests.sh reg

Regression long tests. To run them execute (this may take several minutes):

cd $LIGHTDOCK_HOME
export LIGHTDOCK_LONG_TEST=true
./run_tests.sh reg

NOTE: some tests may fail depending on float accuracy in your installation. This is probably not relevant unless you plan to run lightdock using that piece of code. Please, open an issue in this GitHub repository to get help.

4. Documentation

This GitHub README.md file is intended only as an installation guide.

The complete documentation about how to run the LightDock protocol can be found at https://lightdock.org.

5. Get Help

Please visit the official website for instructions.

lightdock-python2.7's People

Contributors

brianjimenez avatar jorgeroel avatar mvidalpinol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lightdock-python2.7's Issues

OOM prevents program completion

Issue tracker is ONLY used for reporting bugs.

Expected Behavior

If a thread exceeds memory, one of two actions would be expected:

  • the program handles it gracefully, and reduces the number of cores used
  • the program immediately terminates, suggesting the user reduce the number of threads

Current Behavior

The threads cannot continue ("OSError: [Errno 12] Cannot allocate memory" followed by "MemoryError"), but the program continues until completion of the currently-running threads, then reports "[lightdock] ERROR: Lightdock has failed, please check traceback:"

Possible Solution

Automatically reduce the number of threads if one of them dies.

Steps to Reproduce

  1. Download 1Y64_r_u.pdb and 1Y64_l_u.pdb from Zlab benchmark 5, remove all HETATM
  2. lightdock_setup -anm 1Y64_r_u.pdb 1Y64_l_u.pdb 400 300
  3. lightdock setup.json -c 100 100
  4. failure

Context (Environment)

Current supercomputer nodes have 48 cores, with two hardware threads per core, leading to 96 hardware threads per node. The amount of ram is 192GB, but this is apparently insufficient for 96 threads, so the program crashes. I've tried reducing this to 10 cores, but this still finishes unsuccessfully. I could try only a single core, but then I imagine this would take too long to even finish and I'm not sure I want to do this.

Ideally, this would complete without having to restart the job (on a supercomuting environment, re-submitting the job takes 12-24 hours, so the turnaround is extremely slow).

Detailed Description

Possible Implementation

MPI using two or more nodes for one process

Hi again, Bryan

I would like to know how to put a uniq process to run in two or more nodes, using two or more threads? I've seen mpi4py is one of the dependences.

Thank you

ANM is not using parsed PDB structure

When ANM mode is activated, LightDock is not using the parsed structure to calculate normal modes. This is detected for example when --noh flag is used during setup.

pyDockLite?

Hi Brian again

I'm new in docking protein and from biology area, learning starting things yet..

Why I can't find/use pyDockLite scoring function in LightDock?

Problem with Pip3 Install

Expected Behavior

lightdock should install and place binaries or .py files properly

Current Behavior

/usr/local/lib/python3.7/dist-packes/lightdock has no binaries or lightdock.py file. Instead, lightdock3.py and lightdock3_setup.py are located in /usr/local/bin and when trying to run setup.json, the script cannot find the setup files.

Steps to Reproduce

Used the command sudo pip3 install lightdock on Ubuntu Server 19.10, received no installation errors.

Context (Environment)

Renders the software unusable because the python file can't find the install directory.

Output of sudo pip3 show lightdock:

Name: lightdock
Version: 0.8.0a1
Summary: A macromolecular docking framework
Home-page: https://lightdock.org/
Author: None
Author-email: None
License: GPLv3 License
Location: /usr/local/lib/python3.7/dist-packages
Requires: freesasa, biopython, scipy, pyparsing, cython, prody, numpy
Required-by:

Resume docking

Hi

Is there a way to resume docking process? Any command?

Thank you

Cannot allocate memory

I am trying to test lightdock performance on my case. I have a successful run with 200 swarms with 100 glowworms (step 100) in each swarm. Now I want to another set running with 500 swarms and 200 glowworms in each swarm (step 200). But it fails with error "Cannot allocate memory" very quickly.

So, How to solve this problem? Thanks!!

Check atoms in PDB parser

To improve the current PDB parser in order to, once all the residues have been read, check for each residue if it contains all the expected atoms. This should avoid errors after setup (ANM from ProDy for example).

Test frameworks: 0 ran

Probably test didn't work.

 ./run_tests.sh lib
******* Library tests *******

----------------------------------------------------------------------
Ran 0 tests in 0.002s

OK

./run_tests.sh: line 38: nosetests-2.7: command not found

After install, when trying to run the tests, I get the following error:
./run_tests.sh: line 38: nosetests-2.7: command not found

Expected Behavior

Tests should run

Current Behavior

Trying ./run_tests.sh in the lightdock home results in the following error:
./run_tests.sh: line 38: nosetests-2.7: command not found

Steps to Reproduce

Followed install guide. Ran:
pip install numpy scipy cython biopython nose nose2 mpi4py ProDy pyparsing
cloned and built lightdock without any errors, added the paths to my .bashrc, and ran the setup.sh file for high intensive calculations. When I run the tests, I get that error.

Context (Environment)

Running on Manjaro

Freesasa Error and KeyError 'LYSH1'

We are trying to finish installing lightdock and launch a quick test, but some error seem to pop up and we can´t find the reason:

  1. We can not configure Freesasa:
    When following the steps:
    git clone https://github.com/mittinatten/freesasa.git
    cd freesasa
    git checkout tags/1.1
    autoreconf -i
    ./configure --enable-python-bindings --prefix=path/to/install
    make <---
    make install

But when trying to use the command make:

Error compiling Cython file:

------------------------------------------------------------
...
      # @return array of x, y, and z coordinates
      # @exception AssertionError if index out of range or Structure not properly initialized
      def coord(self, i):
            assert(i >= 0 and i < self.nAtoms())
            assert(self._c_structure is not NULL)
            cdef const double *coord = freesasa_structure_coord_array(self._c_structure);
                                                                                       ^
------------------------------------------------------------

freesasa.pyx:475:88: Syntax error in C variable declaration
Traceback (most recent call last):
  File "setup.py", line 21, in <module>
    ext_modules = cythonize(extensions)
  File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 798, in cythonize
    cythonize_one(*args[1:])
  File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 915, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: freesasa.pyx
make[2]: *** [pylib] Error 1
make[2]: Leaving directory `/home/software/lightdock/freesasa/bindings'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/software/lightdock/freesasa'
make: *** [all] Error 2
  1. After the set up, lightdock still finds an error:
    When selecting a Receptor and a Ligand as a test run, the set up was done correctly, and the
    setup.json was created correctly, but when launching the docking, the following error appear:

@> ProDy is configured: verbosity='info'
[lightdock] INFO: simulation parameters saved to ./lightdock.info
[lightdock_setup] INFO: Reading structure from R1.pdb PDB file...
[lightdock_setup] INFO: 4513 atoms, 279 residues read.
[lightdock_setup] INFO: Reading structure from L1.pdb PDB file...
[lightdock_setup] INFO: 59 atoms, 1 residues read.
[lightdock] INFO: Loading scoring function...
[lightdock] INFO: Using DFIRE scoring function
[lightdock] ERROR: Lightdock has failed, please check traceback:
Traceback (most recent call last):
File "/home/software/lightdock/bin/simulation/controller.py", line 30, in
multiprocessing_simulation(parser)
File "/home/software/lightdock/bin/simulation/docking_multiprocessing.py", line 141, in run_simulation
scoring_functions, adapters = set_scoring_function(parser, receptor, ligand)
File "/home/software/lightdock/bin/simulation/docking_multiprocessing.py", line 81, in set_scoring_function
adapter = CurrentModelAdapter(receptor, ligand, receptor_restraints, ligand_restraints)
File "/home/software/lightdock/lightdock/scoring/functions.py", line 40, in init
self.receptor_model = self._get_docking_model(receptor, receptor_restraints)
File "/home/software/lightdock/lightdock/scoring/dfire/driver.py", line 152, in _get_docking_model
anuma = atomnumber[rec_atom_type]
KeyError: 'LYSH1'

The error seems to be with the atoms of the receptor, so we tried different format files and recpetors but the error still appears, any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.