Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem running test_run.sh #20

Open
jbujons opened this issue Sep 1, 2023 · 0 comments
Open

problem running test_run.sh #20

jbujons opened this issue Sep 1, 2023 · 0 comments

Comments

@jbujons
Copy link

jbujons commented Sep 1, 2023

Hello,
I have just download and tried DLScore. When trying to run the test file to check that everything is ok, I got the following error:


bash test_run.sh
Using TensorFlow backend.
setting PYTHONHOME environment
setting PYTHONHOME environment
adding gasteiger charges to peptide
Command-line parameters used:
Receptor: samples/10gs/10gs_protein.pdbqt
Ligand: samples/10gs/10gs_ligand.pdbqt
Vina executable: /mnt/sda1/Shared_folder/DLSCORE-master/autodock_vina_1_1_2_linux_x86/bin/vina

Traceback (most recent call last):
File "dlscore.py", line 2467, in
output = ds.get_output()
File "dlscore.py", line 2408, in get_output
score=calculate_score(lig_array, receptor, input_parameters, self.nb_nets, temp_filename, rec, "\t")
File "dlscore.py", line 2289, in calculate_score
for dl_net in dl_nets(nb_nets):
File "dlscore.py", line 152, in dl_nets
loaded_model.load_weights(os.path.join(networks_dir, weight))
File "/mnt/sda1/Shared_folder/DLSCORE-master/.venv/lib/python3.6/site-packages/keras/engine/network.py", line 1180, in load_weights
f, self.layers, reshape=reshape)
File "/mnt/sda1/Shared_folder/DLSCORE-master/.venv/lib/python3.6/site-packages/keras/engine/saving.py", line 875, in load_weights_from_hdf5_group
original_keras_version = f.attrs['keras_version'].decode('utf8')
AttributeError: 'str' object has no attribute 'decode'

Lines 874-881 of file "saving.py" show:


:
if 'keras_version' in f.attrs:
original_keras_version = f.attrs['keras_version'].decode('utf8')
else:
original_keras_version = '1'
if 'backend' in f.attrs:
original_backend = f.attrs['backend'].decode('utf8')
else:
original_backend = None
:

but if I change both if statements to


:
if 'keras_version' in f.attrs:
original_keras_version = '1'
else:
original_keras_version = '1'
if 'backend' in f.attrs:
original_backend = None
else:
original_backend = None
:

then the calculation gets to the end giving the output:


bash test_run.sh
Using TensorFlow backend.
setting PYTHONHOME environment
setting PYTHONHOME environment
adding gasteiger charges to peptide
Command-line parameters used:
Receptor: samples/10gs/10gs_protein.pdbqt
Ligand: samples/10gs/10gs_ligand.pdbqt
Vina executable: /mnt/sda1/Shared_folder/DLSCORE-master/autodock_vina_1_1_2_linux_x86/bin/vina

DLSCORE OUTPUT: [{'vina_output': -6.7202, 'nnscore': 4.810024302277946, 'dlscore': 5.851217412948609}]

which I guess is OK.

My question: the changes made to the file saving.py might alter or affect the results of DLScore in any way or can I safely use the software in this way? I understand that the modified lines are only querying the keras and backend versions, so it might be that this is not so important for DLScore execution, is it?

Thanks for your comments.

Jordi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant