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

producing pqr file for ligand only (not protein) - error message: ValueError: 'P' is not in list #360

Open
evelyne-deplazes opened this issue May 10, 2023 · 5 comments

Comments

@evelyne-deplazes
Copy link

Hi

I have used pdb2pqr before but only for proteins, never for ligands.

I want to produce a .pqr file and APBS input for a ligand only ie no protein.

I tried the following command

pdb2pqr -apbs-input --ligand Cage_fromMD_freeCageinWater_800ns.mol2 Cage_fromMD_freeCageinWater_800ns.pdb test.pqr

The .pdb and mol2 files are both just the ligand, as I don't have a protein

I get the error
File "/Users/evelyne/opt/anaconda3/lib/python3.9/site-packages/pdb2pqr/ligand/mol2.py", line 294, in formal_charge
p_atom = self.bonds[0].atoms[elements.index("P")]
ValueError: 'P' is not in list

My ligand does not have P atoms, only N.3, C.3, O.3 and H

I can find the section of code in mol2.py, but I am not sure how to fix the error. Or whether I am using the wrong command in the first place to deal with a ligand only.

thanks a lot
Evelyne


Files attached
ligand in pdb and mol2 format (.txt added as Github does not accept .pdb and .mol2 files)
test.log, output of pdb2pqr command
screendump.log, the full error message printed to the screen

Cage_fromMD_freeCageinWater_800ns.mol2.txt
Cage_fromMD_freeCageinWater_800ns.pdb.txt
screendump.log
test.log

@evelyne-deplazes
Copy link
Author

I forgot to say I got the same error when using the web server version.

I had a look at the files init.py, where I think the atoms are defined but not sure on how to fix (or whether the issue is how I use the --ligand flag and my mol2 file)
Evelyne

@sobolevnrm
Copy link
Member

Hello -- I am not sure when I will have time to look at this in detail. However, have you tried adding a protein to the system?
The protein does not necessarily need to interact with the ligand.

There was an issue in the past where PDB2PQR failed when a protein wasn't present. I thought we had fixed the bug but it is the first thing I would try when debugging the issue you're experiencing.

Thank you

@evelyne-deplazes
Copy link
Author

evelyne-deplazes commented May 15, 2023 via email

@evelyne-deplazes
Copy link
Author

evelyne-deplazes commented May 15, 2023 via email

@jbardhan
Copy link

jbardhan commented Dec 1, 2023

Hi,

It looks like mol2.py 's formal_charge expects that any atom of type O.3 with bond order 1 and formal_charge 1 will be connected to a phosphorus atom. The third atom in this ligand, name "O1", triggers that elif(), which then tries to find the P atom bonded to it. When it doesn't find such a P, the method raises the exception and dies.

I don't know how to fix this at the moment. In the meantime, @evelyne-deplazes, if you're still seeking a resolution, can you please re-confirm that all the oxygen atoms in your ligand are indeed the SYBYL sp3 oxygen (O.3)?

Thanks very much,
Jay

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

3 participants