lightdock / lightdock-python2.7

Protein-protein, protein-peptide and protein-DNA docking framework based on the GSO algorithm
https://lightdock.org/
GNU General Public License v3.0
26 stars 9 forks source link

Freesasa Error and KeyError 'LYSH1' #17

Closed Reybaj closed 5 years ago

Reybaj commented 5 years ago

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

2) 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?

JorgeRoel commented 5 years ago

Hi there,

freesasa is ONLY required if you decide to use pydockLITE (cpydock) as scoring function (i.e to calculate the accessible surface area for the desolvation term). However, I see that you chose DFIRE as scoring function (we advise to use the fast implementation of it "fastdfire", since it is several orders of magnitude faster). Please, note that DFIRE is a united-atom force-field, and it does not explicitly account for Hydrogens (KeyError: 'LYSH1'). This means that you need to remove all H atoms present in your structures prior to the setup. You can do so by using reduce command as follows (or any other option you like):

reduce -Trim input.pdb > output.pdb

Hope this fix the problem

brianjimenez commented 5 years ago

Could you please give us more details about the Cython version used in your system? Also it would be helpful to have Python details.

Reybaj commented 5 years ago

The Cython version was the one recommended in the set up manual and the python version we have version 3.7.2. Is this version perhaps the one causing us trouble? Also thanks for the fast answer, we will take out the hydrogens, but we are also interested in using freesasa besides the DFIRE score function. Any other details you need, we will be happy to provide

brianjimenez commented 5 years ago

Hi, You're mixing Cython (2.7 series) with Python version (3.7 series). Python3 is still not supported by LightDock, please use a Python interpreter from the 2.7 series (which has to match with the Cython version as well). Note that freesasa is used for calculating the buried surface area required by pyDockLite scoring function, but it's not a scoring function itself.