Reinstallation

41 views
Skip to first unread message

Suhad Jihad

unread,
Dec 1, 2015, 9:24:51 AM12/1/15
to od...@googlegroups.com
Hello again,
     I reinstall my Ubuntu 14.04.3(after many attempts to repair the Openbabel issue,but I fail) and now I am ready to install oddt from the first step but before I try I need some explanation
- I go to https://oddt.readthedocs.org/en/latest/ and follow the instruction but in the previous session I fail you see.Now My question does I install the requirements first then I install oddt or you have another advice??
- Openbabel  & openbabeI-python  from your repository I found them in synaptic (kindly find the screen shot) .Are they binary packages and don't need compilation and can I install they from  synaptic or you have another advice?

Thanks alot.
Regards.
Screenshot from 2015-12-01 03_39_15.png
Screenshot from 2015-12-01 03_40_32.png

Maciek Wójcikowski

unread,
Dec 1, 2015, 9:32:13 AM12/1/15
to Suhad Jihad, od...@googlegroups.com
Hello,

1) "pip install oddt" will install all the dependencies. Although it would be faster to install numpy scipy and sklearn  from Ubuntu: "sudo apt-get install python-numpy python-scipy python-sklearn"
2) Yes you can install them through synaptic or apt ("sudo apt-get install openbabel python-openbabel"). They are binary packages and no compilation is needed.

----
Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl

--
You received this message because you are subscribed to the Google Groups "Open Drug Discovery Toolkit Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to oddt+uns...@googlegroups.com.
To post to this group, send email to od...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/oddt/1246295014.13652787.1448979716357.JavaMail.yahoo%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.

Maciek Wójcikowski

unread,
Dec 7, 2015, 11:12:10 AM12/7/15
to Suhad Jihad, od...@googlegroups.com
Hello again,

I think I found a bug in ODDT connected with old OpenBabel. You need to update ODDT:
pip install -U --no-deps oddt
 
Confirm that you have latest ODDT. It should be 0.1.8:
python -c "import oddt;print oddt.__version__"
 
Now everything should work.

To make the upgrade of openbabel ensure you have added my PPA to your Apt's sources.list:
echo "deb http://ppa.launchpad.net/mwojcikowski/openbabel/ubuntu trusty main" >> /etc/apt/sources.list
echo "deb-src http://ppa.launchpad.net/mwojcikowski/openbabel/ubuntu trusty main" >> /etc/apt/sources.list
Then apt-get update and apt-get upgrade should do the trick.

----
Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl

2015-12-05 10:46 GMT+01:00 Suhad Jihad <suha...@yahoo.com>:
This is the error:

No pickle, training new scoring function.
Training RFScore v1
Test set: R**2: 0.584197162863  R: 0.764327915795
Train set: R**2: 0.927437071416  R: 0.963035342766 RMSE: 1.54338260421
No pickle, training new scoring function.
Test set: R**2: 0.625705716939  R: 0.791015623701
Train set: R**2: 0.821044776725  R: 0.906115211618
Traceback (most recent call last):
  File "test.py", line 10, in <module>
    pipeline.write_csv('test.csv')
  File "/usr/local/lib/python2.7/dist-packages/oddt/virtualscreening.py", line 250, in write_csv
    for mol in self.fetch():
  File "/usr/local/lib/python2.7/dist-packages/oddt/virtualscreening.py", line 184, in fetch
    for n, mol in enumerate(self._pipe):
  File "/usr/local/lib/python2.7/dist-packages/oddt/scoring/__init__.py", line 143, in predict_ligands
    for lig in ligands:
  File "/usr/local/lib/python2.7/dist-packages/oddt/scoring/__init__.py", line 144, in predict_ligands
    yield self.predict_ligand(lig)
  File "/usr/local/lib/python2.7/dist-packages/oddt/scoring/__init__.py", line 125, in predict_ligand
    score = self.predict([ligand])[0]
  File "/usr/local/lib/python2.7/dist-packages/oddt/scoring/__init__.py", line 90, in predict
    descs = self.descriptor_generator.build(ligands)
  File "/usr/local/lib/python2.7/dist-packages/oddt/scoring/descriptors/__init__.py", line 146, in build
    local_protein_dict = protein.atom_dict[(distance(protein.atom_dict['coords'], mol.atom_dict['coords']) <= self.cutoff.max()).any(axis=1)]
  File "/usr/local/lib/python2.7/dist-packages/oddt/toolkits/ob.py", line 121, in __getattr__
    raise AttributeError('Molecule has no such property: %s' % attr)
AttributeError: Molecule has no such property: atom_dict

*************************************************************************************************************************

 dpkg -l | grep 'openbabel'
ii  libopenbabel4                                         2.3.2+dfsg-1.1                                      amd64        Chemical toolbox library
ii  openbabel                                             2.3.2+dfsg-1.1                                      amd64        Chemical toolbox utilities (cli)
ii  python-openbabel                                      2.3.2+dfsg-1.1                                      amd64        Chemical toolbox library (python bindings)

but the version above not from your repository !!!!What can I do to add your version without the error of finding openbabel.



On Friday, December 4, 2015 2:43 PM, Maciek Wójcikowski <mac...@wojcikowski.pl> wrote:


libopenbabel4 is a dependency of both openbabel and python-openbabel
Just reinstall those packages:
sudo apt-get remove openbabel python-openbabel libopenbabel4 
sudo apt-get install openbabel python-openbabel libopenbabel4 

Make sure that all of them are in one verison:
dpkg -l | grep 'openbabel'

----
Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl

2015-12-03 23:52 GMT+01:00 Suhad Jihad <suha...@yahoo.com>:
OK sorry but I don't understand what you mean also I have this issue :
if I don't add your repository synaptic have only openbabel2.3.2+dfsg-1.1 with python-openbabel
and when I add your repository synaptic have only openbabel2.3.90 with python-openbabel

I am not sure but I guess that you want me to install  openbabel2.3.2+dfsg-1.1 with python-openbabel
and then add your repository and install openbabel2.3.90 with python-openbabel ????

please I want the sequence of installation bz there is nothing in the net help me to solve this conflict and I spent long time latch with it.

I appreciate your help.





On Friday, December 4, 2015 1:36 AM, Maciek Wójcikowski <mac...@wojcikowski.pl> wrote:


I have gave you full install instructions in previous mail.
03.12.2015 10:47 PM "Suhad Jihad" <suha...@yahoo.com> napisał(a):
now assume I have no openbabel installed (any version) also I delete your repository, what I do?



On Friday, December 4, 2015 12:39 AM, Maciek Wójcikowski <mac...@wojcikowski.pl> wrote:


You must have old libopenbabel4 package. Upgrade it or remove it and install once again. You have to have all openbabel packages in one version.
03.12.2015 10:32 PM "Suhad Jihad" <suha...@yahoo.com> napisał(a):
Thanks for your explanation.
But really I will become crazy why when I add your repository I get this error
>>> import openbabel
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/openbabel.py", line 39, in <module>
    _openbabel = swig_import_helper()
  File "/usr/lib/python2.7/dist-packages/openbabel.py", line 35, in swig_import_helper
    _mod = imp.load_module('_openbabel', fp, pathname, description)
ImportError: /usr/lib/python2.7/dist-packages/_openbabel.so: undefined symbol: _ZTVN9OpenBabel32OBMinimizingEnergyConformerScoreE

Note: I uninstall the previous one and select completely removal from synaptic .
*:( sad



On Friday, December 4, 2015 12:19 AM, Maciek Wójcikowski <mac...@wojcikowski.pl> wrote:


Third argument is passed to autodock_vina, for which you can check what it does here: https://github.com/oddt/oddt/blob/master/oddt/docking/autodock_vina.py#L20
Simply its a crystal ligand around which the docking box is formed.

----
Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl

2015-12-03 21:30 GMT+01:00 Suhad Jihad <suha...@yahoo.com>:
Hello,

When I install I get that I must install xnetwork and also gfortran I install them correctly but the only difference between I and you is : 
-when I install openbabel for the second time (after uninstallation) from synaptic I get the old version  bz I don't add your repository but I will try now to uninstall the old and add your repository.
-also the folder that you use in the github and the get clone is different I think you deal with the server but I am sure that my folders in the right place.

please I want to ask you a question?
1)when you load many ligands to dock them by Load_Ligands why in the dock function you use the third argument as a one ligand and what this mean to you?





Best Regard,



On Thursday, December 3, 2015 11:06 PM, Maciek Wójcikowski <mac...@wojcikowski.pl> wrote:


I tried ODDT on Ubuntu 14.04 and everything works fine for me. Here is what i did:

sudo add-apt-repository ppa:mwojcikowski/openbabel
sudo apt update
sudo apt install git python-scipy python-sklearn python-networkx gfortran python-pip
sudo apt install python-openbabel
sudo pip install oddt
git clone https://github.com/oddt/jcheminf.git
cd jcheminf
(save test.py to jcheminf)
time python test.py


Content of test.py file:

from oddt.virtualscreening import virtualscreening as vs
# Initiate virtual screening pipeline using 8 CPUs
pipeline = vs(n_cpu=2)
# Load ligands from a mol2 file
pipeline.load_ligands('mol2', 'ampc/actives_final.mol2.gz')
# Filter ligands by weight and solubility
pipeline.apply_filter('150 < mol.molwt < 350') 
pipeline.apply_filter('0 < mol.logp < 5')
# Dock entire library to receptor, autocenter docking box on  ligand
pipeline.dock('autodock_vina', 'ampc/receptor.pdbqt', 'ampc/crystal_ligand.mol2')
# Write docked ligands conformations to a file (including scores)
pipeline.write('mol2', 'ampc_docked.mol2', overwrite=True, opt={'c':None})
# Rescore docking results using RFscore NNscore
pipeline.score(function='rfscore', protein='ampc/receptor.pdbqt')
pipeline.score(function='nnscore', protein='ampc/receptor.pdbqt')
# Write computed scores to csv
pipeline.write_csv('ampc_docked.csv')

----
Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl

2015-12-02 15:48 GMT+01:00 Suhad Jihad <suha...@yahoo.com>:

But if I mentioned to a file that doesn't exist surly the error message is different and told me the file doesn't exist also these file that you sent to me now I have it from the paper and I put them in the path /home/suhad/test/  .

Despite that now I open test.py in Geany and get your folder ampc and wait for output to give you feedback.

On Wednesday, December 2, 2015 4:59 PM, Maciek Wójcikowski <mac...@wojcikowski.pl> wrote:


I have tested the code on Ubuntu 14.04 and everything is fine. My best guess is that you're pointing to files that don't exist. Can you test the "test.py". The zip archive contains all the files you need.

----
Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl

2015-12-02 11:39 GMT+01:00 Suhad Jihad <suha...@yahoo.com>:
Hello,
1) I use the same snippet code in the paper.
2)I use the same data that you give it with the paper bz I avoid my data in the first time to get a correct result and then if I get a result with your data I use my prepared data.

from oddt.virtualscreening import virtualscreening as vs
pipeline = vs(n_cpu=4) 
pipeline.load_ligands('mol2', '/home/suhad/test/actives_final.mol2.gz')
pipeline.apply_filter('150 < mol.molwt < 350')
pipeline.apply_filter('0 < mol.logp < 5')
pipeline.dock('autodock_vina', 'ampc/receptor.pdbqt', '/home/suhad/test/crystal_ligand.mol2')
pipeline.write('mol2', '/home/suhad/test/ampc_docked.mol2', overwrite=True, opt={'c':None})
pipeline.score(function='rfscore', protein='ampc/receptor.pdbqt')
pipeline.score(function='nnscore', protein='ampc/receptor.pdbqt')
I get the error here

I think if you go to the line of the error and follow it you can catch the problem.

Best Regards,






On Wednesday, December 2, 2015 12:27 PM, Maciek Wójcikowski <mac...@wojcikowski.pl> wrote:


Hi,

Can you send the script you're executing and the input ligands and receptor?

----
Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl

2015-12-02 1:19 GMT+01:00 Suhad Jihad <suha...@yahoo.com>:
I get the same error:

Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 338, in _handle_tasks
    for i, task in enumerate(taskseq):
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 260, in <genexpr>
    self._taskqueue.put((((result._job, i, func, (x,), {})
  File "/usr/local/lib/python2.7/dist-packages/oddt/virtualscreening.py", line 179, in <genexpr>
    self._pipe = self._pool.imap(_parallel_helper, ((sf, 'predict_ligand', {'ligand': lig}) for lig in self._pipe))
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 659, in next
    raise value
AttributeError: Molecule has no such property: atom_dict

Kindly can you trace it?
Reply all
Reply to author
Forward
0 new messages