ValueError: could not convert string to float
kexul opened this issue · 4 comments
When specify an ref ligand with it's ID in pdbbank , this error occured: ValueError: could not convert string to float: 'I1'
.
Here is the code to reproduce the error:
protein = Protein('3eyg', ligand_ref='MI1')
Here is the corresponding ligand part in the pdb file:
Is that a wrong usage of ligand_ref parameter? I've noticed that in the example, a residual name was required, when I use protein = Protein('3eyg', ligand_ref='1')
, the error was ValueError: Molecule ID not found: 1
. I tried A1
and the same error occured.
What should be the correct representation for this ligand?
My current solution is extract the ligand from the cocrystal and save it as a sdf file, create a Ligand
object and pass it to the Protein
function.
Thanks!
Hi,
The correct way is indeed to specify it as ligand_ref='A1'
or ligand_ref='1'
. However, there used to be a small bug regarding regex detection, which I fixed some updates ago. If you update your version of ProtoCaller, it should hopefully fix it, as your example seems to be working for me.
Hi, How can I install the latest version of protocaller which has the patch you mentioned? I've tried install it by mamba install -c conda-forge -c omnia -c michellab -c essexlab/label/dev protocaller
and mamba install -c conda-forge -c omnia -c michellab -c essexlab protocaller
, no upgrade happened.
My current version of protocaller is:
# Name Version Build Channel
protocaller 1.1.2 40_gf92127e essexlab
Should I clone the dev branch from github and install it manually?
Since the packages differ only by build numbers, I would uninstall protocaller and clean the cache before installing it again. I think conda
caches the build numbers, so it won't update it, even when it should.
I have also now released version 1.2.0
, which changes the pdb2pqr
dependency, and uses the latest propka
, so you might want to try it out. It will be easier to update with conda install -c conda-forge -c omnia -c michellab -c essexlab protocaller=1.2.0
as well.